Modeling Data - Integrate EvalRep descriptors and dispatch for Geom/Geom2d#1089
Merged
dpasukhi merged 3 commits intoOpen-Cascade-SAS:IRfrom Feb 15, 2026
Merged
Conversation
…eom2d Introduce EvalRep descriptors for selected Geom and Geom2d curve/surface classes and add inline EvalRep utilities for evaluation dispatch with fallback to native paths. - add per-class Set/Get/Clear EvalRepresentation API and storage - support full, derivative-bounded and mapped descriptors - validate mapped parameter transforms in SetEvalRepresentation() - migrate Geom_OffsetSurface equivalent-surface path to EvalRep - clone EvalRep descriptors in copy constructors and Copy() paths - update adaptors to use EvalRep in supported branches - keep EvalRep invalidation in geometry mutators and fix regressions
There was a problem hiding this comment.
Pull request overview
This pull request introduces an evaluation representation (EvalRep) system for Geom and Geom2d curve/surface classes. The feature allows attaching alternative geometric representations to curves and surfaces for optimized evaluation, with support for parameter mapping, derivative bounds, and domain restrictions.
Changes:
- Adds EvalRep descriptor class hierarchy (Full, DerivBounded, Mapped) with validation and cloning utilities
- Integrates Set/Get/ClearEvalRepresentation API into Bezier, BSpline, Offset, Revolution, and Extrusion classes
- Migrates Geom_OffsetSurface from equivSurf field to EvalRep system
- Updates adaptors to dispatch to EvalRep when available with fallback to native evaluation
- Ensures EvalRep invalidation on geometry mutations
Reviewed changes
Copilot reviewed 38 out of 38 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Geom_EvalRepCurveDesc.hxx | Defines 3D curve descriptor hierarchy with Map1d and Domain1d helpers |
| Geom_EvalRepSurfaceDesc.hxx | Defines 3D surface descriptor hierarchy with Map2d and Domain2d helpers including UV swap |
| Geom2d_EvalRepCurveDesc.hxx | Defines 2D curve descriptor hierarchy (parallel to 3D version) |
| Geom_EvalRepUtils.pxx | Implements validation, cloning, and dispatch utilities for 3D curves/surfaces |
| Geom2d_EvalRepUtils.pxx | Implements validation, cloning, and dispatch utilities for 2D curves |
| Geom_BezierCurve.{hxx,cxx} | Adds EvalRep API, storage, cloning, and dispatch with mutator invalidation |
| Geom_BSplineCurve.{hxx,cxx} | Adds EvalRep API, storage, cloning, and dispatch with mutator invalidation |
| Geom_BezierSurface.{hxx,cxx} | Adds EvalRep API, storage, cloning, and dispatch with mutator invalidation |
| Geom_BSplineSurface.{hxx,cxx} | Adds EvalRep API, storage, cloning, and dispatch with mutator invalidation |
| Geom_OffsetCurve.{hxx,cxx} | Adds EvalRep API, storage, cloning, and dispatch with mutator invalidation |
| Geom_OffsetSurface.{hxx,cxx} | Migrates from equivSurf to EvalRep with helper functions |
| Geom_SurfaceOfRevolution.{hxx,cxx} | Adds EvalRep API, storage, cloning, and dispatch with mutator invalidation |
| Geom_SurfaceOfLinearExtrusion.{hxx,cxx} | Adds EvalRep API, storage, cloning, and dispatch with mutator invalidation |
| Geom2d_BezierCurve.{hxx,cxx} | Parallel 2D implementation with EvalRep support |
| Geom2d_BSplineCurve.{hxx,cxx} | Parallel 2D implementation with EvalRep support |
| Geom2d_OffsetCurve.{hxx,cxx} | Parallel 2D implementation with EvalRep support |
| GeomAdaptor_Curve.{hxx,cxx} | Adds EvalRep field to BezierData/BSplineData/OffsetData with dispatch logic |
| GeomAdaptor_Surface.{hxx,cxx} | Adds EvalRep field to all surface data variants with dispatch logic |
| Geom2dAdaptor_Curve.{hxx,cxx} | Parallel 2D adaptor implementation with EvalRep support |
| FILES.cmake (Geom, Geom2d) | Registers new descriptor and utility header files |
Comments suppressed due to low confidence (2)
src/ModelingData/TKG3d/Geom/Geom_SurfaceOfLinearExtrusion.cxx:256
- The unused parameter
Vin the original EvalDN signature has been replaced with a used parameter. This changes the function signature semantically. While the parameter is now properly used in the EvalRep path (line 263), verify that this doesn't break any existing callers that may have relied on the parameter being ignored.
src/ModelingData/TKG3d/Geom/Geom_OffsetSurface.hxx:372 - The removed field
equivSurfwas used in multiple locations (UIso, VIso, TransformParameters, DumpJson). Verify that all these usages have been correctly migrated to use thedirectRepSurface()helper which extracts the equivalent surface from the EvalRep descriptor. Missing migrations could cause runtime failures.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce EvalRep descriptors for selected Geom and Geom2d curve/surface classes and add inline EvalRep utilities for evaluation dispatch with fallback to native paths.