Modeling Data - Add Geom2dGridEval package for batch 2D curve evaluation#1079
Merged
dpasukhi merged 3 commits intoOpen-Cascade-SAS:IRfrom Feb 13, 2026
Merged
Modeling Data - Add Geom2dGridEval package for batch 2D curve evaluation#1079dpasukhi merged 3 commits intoOpen-Cascade-SAS:IRfrom
dpasukhi merged 3 commits intoOpen-Cascade-SAS:IRfrom
Conversation
…tch 2D curve evaluation Add new Geom2dGridEval package in TKG2d providing batch evaluation of 2D curves at multiple parameter values, mirroring the existing 3D GeomGridEval package in TKG3d. Specialized evaluators use analytical formulas for conics and cache-based evaluation for BSpline/Bezier curves, with a unified std::variant dispatcher for automatic type-based dispatch. New classes: - Geom2dGridEval_Line (header-only), _Circle, _Ellipse, _Hyperbola, _Parabola, _BezierCurve, _BSplineCurve, _OffsetCurve, _OtherCurve - Geom2dGridEval_Curve: unified dispatcher with Initialize() from Adaptor2d_Curve2d or occ::handle<Geom2d_Curve> - Geom2dGridEval.hxx: CurveD1/D2/D3 result structures BSplCLib_Cache changes: - Add D0Local/D1Local/D2Local/D3Local overloads for gp_Pnt2d/gp_Vec2d - Refactor existing 2D D0/D1/D2/D3 methods to delegate to D*Local, consistent with the existing 3D delegation pattern
…om2dGridEval classes
…al for evaluation methods
83f4e2f to
45fc54b
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds a new Geom2dGridEval package to TKG2d for efficient batch evaluation of 2D curves at multiple parameter values, mirroring the existing 3D GeomGridEval package in TKG3d. The implementation uses analytical formulas for conics and cache-based evaluation for BSpline/Bezier curves, with a unified std::variant dispatcher for automatic type-based dispatch.
Changes:
- New Geom2dGridEval package with 9 specialized curve evaluators (Line, Circle, Ellipse, Hyperbola, Parabola, BezierCurve, BSplineCurve, OffsetCurve, OtherCurve)
- Unified Geom2dGridEval_Curve dispatcher using std::variant for type-safe automatic dispatch
- BSplCLib_Cache enhancements: added D0Local/D1Local/D2Local/D3Local methods for 2D, refactored existing 2D D0/D1/D2/D3 to delegate to these new methods
- Comprehensive GTest coverage for all evaluator types
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/ModelingData/TKG2d/PACKAGES.cmake | Adds Geom2dGridEval package to TKG2d toolkit |
| src/ModelingData/TKG2d/Geom2dGridEval/FILES.cmake | Lists all source and header files for the new package |
| src/ModelingData/TKG2d/Geom2dGridEval/Geom2dGridEval.hxx | Defines CurveD1/D2/D3 result structures |
| src/ModelingData/TKG2d/Geom2dGridEval/Geom2dGridEval_*.hxx/cxx | Specialized evaluators for each curve type |
| src/ModelingData/TKG2d/Geom2dGridEval/Geom2dGridEval_Curve.hxx/cxx | Unified dispatcher with std::variant |
| src/FoundationClasses/TKMath/BSplCLib/BSplCLib_Cache.hxx/cxx | Added 2D D*Local methods and refactored delegation |
| src/ModelingData/TKG2d/GTests/*.cxx | Comprehensive test coverage for all evaluators |
| src/ModelingData/TKG2d/GTests/FILES.cmake | Registers new test files |
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.
Add new Geom2dGridEval package in TKG2d providing batch evaluation of 2D curves at multiple parameter values, mirroring the existing 3D GeomGridEval package in TKG3d. Specialized evaluators use analytical formulas for conics and cache-based evaluation for BSpline/Bezier curves, with a unified std::variant dispatcher for automatic type-based dispatch.
New classes:
BSplCLib_Cache changes: