Skip to content

Modeling Data - Add Eval geometry classes and integrate EvalRep dispatch#1104

Merged
dpasukhi merged 11 commits intoOpen-Cascade-SAS:IRfrom
dpasukhi:new_geometry
Feb 23, 2026
Merged

Modeling Data - Add Eval geometry classes and integrate EvalRep dispatch#1104
dpasukhi merged 11 commits intoOpen-Cascade-SAS:IRfrom
dpasukhi:new_geometry

Conversation

@dpasukhi
Copy link
Copy Markdown
Member

Introduce new evaluation-focused geometry classes in TKG2d/TKG3d:

  • Geom2dEval_AHTBezierCurve
  • Geom2dEval_TBezierCurve
  • Geom2dEval_SineWaveCurve
  • Geom2dEval_ArchimedeanSpiralCurve
  • Geom2dEval_LogarithmicSpiralCurve
  • Geom2dEval_CircleInvoluteCurve
  • GeomEval_AHTBezierCurve
  • GeomEval_TBezierCurve
  • GeomEval_SineWaveCurve
  • GeomEval_CircularHelixCurve
  • GeomEval_AHTBezierSurface
  • GeomEval_TBezierSurface
  • GeomEval_CircularHelicoidSurface
  • GeomEval_EllipsoidSurface
  • GeomEval_HyperboloidSurface
  • GeomEval_ParaboloidSurface
  • GeomEval_HypParaboloidSurface

Move and rename EvalRep descriptors/utilities to Geom2dEval/GeomEval
packages and wire EvalRep dispatch into Geom2d/Geom entities and adaptor
EvalD* paths.

Harden Eval API contracts by throwing Standard_NotImplemented for unsupported
operations (Reverse/ReversedParameter, U/VReverse/U/VReversedParameter,
Transform, UIso/VIso where applicable). Align behavioral checks and invariants,
including non-periodic sine-wave behavior and stricter parameter validation
(e.g. hyperboloid radii).

- Removed the GeomEval_GregorySurface class entirely as it is no longer needed.
- Updated GeomEval_HypParaboloidSurface, GeomEval_HyperboloidSurface, GeomEval_ParaboloidSurface, GeomEval_SineWaveCurve, GeomEval_TBezierCurve, and GeomEval_TBezierSurface classes to throw Standard_NotImplemented exceptions for UIso and VIso methods, indicating that these methods are not implemented.
- Modified the conditions in GeomEval_HyperboloidSurface and GeomEval_ParaboloidSurface to check for non-positive radii, changing from '<' to '<=' to prevent invalid construction.
- Updated the Reverse and ReversedParameter methods in GeomEval_SineWaveCurve and GeomEval_TBezierCurve to throw Standard_NotImplemented exceptions, indicating that these functionalities are not yet implemented.
- Cleaned up the UReverse and VReverse methods in GeomEval_TBezierSurface to throw Standard_NotImplemented exceptions instead of containing commented-out code.
…ot supported

- Updated Geom2dEval_AHTBezierCurve, Geom2dEval_SineWaveCurve, and Geom2dEval_TBezierCurve to throw Standard_NotImplemented for Reverse and ReversedParameter methods.
- Modified GeomEval_CircularHelicoidSurface, GeomEval_EllipsoidSurface, GeomEval_HypParaboloidSurface, GeomEval_HyperboloidSurface, and GeomEval_ParaboloidSurface to implement UReverse, VReverse, UReversedParameter, and VReversedParameter methods with Standard_NotImplemented exceptions.
- Adjusted GeomEval_AHTBezierSurface and GeomEval_TBezierSurface to reflect similar changes for reversal methods.
…c basis evaluations

- Introduced NCollection_LocalArray for managing basis derivatives and evaluations, improving memory management and performance.
- Added inline functions for calculating integer powers and evaluating trigonometric derivatives.
- Replaced std::pow with a custom powInt function for better performance in integer exponentiation.
- Updated evalTrigAxisDerivs and evalTrigAxisNthDeriv functions to streamline derivative calculations.
- Modified EvalD0, EvalD1, EvalD2, and EvalD3 methods to utilize new local array structures for basis evaluations.
- Enhanced overall code readability and maintainability by reducing repetitive code patterns.
- Updated the Transform method in multiple geometry evaluation classes (e.g., GeomEval_SineWaveCurve, GeomEval_TBezierCurve, GeomEval_AHTBezierCurve, etc.) to throw Standard_NotImplemented exceptions, indicating that transformations are not supported for these geometries.
- Removed existing transformation logic that was previously implemented, ensuring that the code reflects the current design decision.
- Updated corresponding header files to document the change in functionality for the Transform method.
- Adjusted unit tests to verify that calling Transform on these geometries correctly throws the expected exception.
@dpasukhi dpasukhi changed the base branch from master to IR February 21, 2026 17:10
@dpasukhi dpasukhi requested a review from Copilot February 21, 2026 17:21
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces comprehensive evaluation-focused geometry classes for both 2D and 3D domains (TKG2d/TKG3d), including specialized curves and surfaces such as sine waves, spirals, helices, and various analytical surfaces. The changes rename and relocate EvalRep descriptor utilities from Geom_EvalRep* to GeomEval_RepCurveDesc/GeomEval_RepSurfaceDesc and Geom2d_EvalRep* to Geom2dEval_RepCurveDesc, integrating EvalRep dispatch throughout existing Geom and adaptor classes. The PR hardens API contracts by throwing Standard_NotImplemented for unsupported operations on eval geometries.

Changes:

  • Added 17 new GeomEval evaluation geometry classes (curves and surfaces) and 7 new Geom2dEval curve classes
  • Moved and renamed EvalRep descriptors from Geom/Geom2d packages to GeomEval/Geom2dEval packages
  • Updated all references to use the new namespace/package names throughout Geom, Geom2d, GeomAdaptor, and Geom2dAdaptor
  • Added comprehensive test coverage for new evaluation geometry classes

Reviewed changes

Copilot reviewed 90 out of 98 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
GeomEval_RepSurfaceDesc.hxx Updated header guard and namespace from Geom_EvalRepSurfaceDesc to GeomEval_RepSurfaceDesc
GeomEval_RepCurveDesc.hxx Updated header guard and namespace from Geom_EvalRepCurveDesc to GeomEval_RepCurveDesc
GeomEval_ParaboloidSurface.hxx New paraboloid surface class with parameter validation and eval methods
GeomEval_HyperboloidSurface.hxx New hyperboloid surface class supporting one-sheet and two-sheet modes
GeomEval_HypParaboloidSurface.hxx New hyperbolic paraboloid (saddle) surface class
GeomEval_EllipsoidSurface.hxx New triaxial ellipsoid surface class
GeomEval_CircularHelixCurve.hxx New circular helix curve class with radius and pitch parameters
GeomEval_CircularHelixCurve.cxx Implementation with derivative calculations and reversal restrictions
GeomEval_CircularHelicoidSurface.hxx New ruled helicoid surface class
GeomEval_AHTBezierSurface.hxx New algebraic-hyperbolic-trigonometric Bezier surface class
GeomEval_AHTBezierCurve.hxx New AHT Bezier curve class with mixed basis functions
GeomEval/FILES.cmake Added all new GeomEval source files to build configuration
GeomAdaptor_Surface.hxx Updated EvalRep descriptor references to new namespace
GeomAdaptor_Curve.hxx Updated EvalRep descriptor references to new namespace
Geom_SurfaceOfRevolution.hxx/.cxx Updated to use GeomEval_RepSurfaceDesc namespace
Geom_SurfaceOfLinearExtrusion.hxx/.cxx Updated to use GeomEval_RepSurfaceDesc namespace
Geom_OffsetSurface.hxx/.cxx Updated to use GeomEval_RepSurfaceDesc namespace and utilities
Geom_OffsetCurve.hxx/.cxx Updated to use GeomEval_RepCurveDesc namespace and utilities
Geom_BezierSurface.hxx/.cxx Updated to use GeomEval_RepSurfaceDesc namespace
Geom_BezierCurve.hxx/.cxx Updated to use GeomEval_RepCurveDesc namespace
Geom_BSplineSurface.hxx/.cxx Updated to use GeomEval_RepSurfaceDesc namespace
Geom_BSplineCurve.hxx/.cxx Updated to use GeomEval_RepCurveDesc namespace
Geom/FILES.cmake Removed moved EvalRep files from Geom package
GeomEval_*_Test.cxx Added comprehensive test suites for all new geometry classes
TKG3d/GTests/FILES.cmake Added test files for new GeomEval classes
TKG2d/PACKAGES.cmake Added Geom2dEval package to TKG2d module
Geom2dEval_TBezierCurve.hxx New trigonometric Bezier curve class for 2D
Geom2dEval_SineWaveCurve.hxx/.cxx New 2D sine wave curve with amplitude and frequency
Geom2dEval_RepCurveDesc.hxx Updated header guard and namespace from Geom2d_EvalRepCurveDesc to Geom2dEval_RepCurveDesc
Geom2dEval_LogarithmicSpiralCurve.hxx New 2D logarithmic spiral curve
Geom2dEval_CircleInvoluteCurve.hxx/.cxx New 2D circle involute curve for gear profiles
Geom2dEval_ArchimedeanSpiralCurve.hxx/.cxx New 2D Archimedean spiral curve
Geom2dEval_AHTBezierCurve.hxx New 2D AHT Bezier curve class
Geom2dEval/FILES.cmake Added all Geom2dEval source files to build
Geom2dAdaptor_Curve.hxx Updated to use Geom2dEval_RepCurveDesc namespace
Geom2d_OffsetCurve.hxx/.cxx Updated to use Geom2dEval_RepCurveDesc namespace and utilities
Geom2d_BezierCurve.hxx/.cxx Updated to use Geom2dEval_RepCurveDesc namespace
Geom2d_BSplineCurve.hxx/.cxx Updated to use Geom2dEval_RepCurveDesc namespace
Geom2d/FILES.cmake Removed moved EvalRep files from Geom2d package
Geom2dEval_*_Test.cxx Added test suites for 2D evaluation geometry classes
TKG2d/GTests/FILES.cmake Added test files for Geom2dEval classes
Comments suppressed due to low confidence (1)

src/ModelingData/TKG3d/GeomEval/GeomEval_CircularHelixCurve.cxx:1

  • The variable anAx2 is used for both the input parameter of type gp_Ax2 (line 28) and is being constructed here, which creates ambiguity. The constructed object should have a different name such as anAx2Copy or aLocalAx2.
// Copyright (c) 2025 OPEN CASCADE SAS

Comment thread src/ModelingData/TKG3d/GTests/GeomEval_CircularHelixCurve_Test.cxx Outdated
…se occ::handle

- Updated instances of Handle to occ::handle for Geom_Circle, Geom_Ellipse, and Geom_SphericalSurface in the GeomEval_TBezierCurve_Test and GeomEval_TBezierSurface_Test files.
- Removed the GeomEval_TBezierSurface_Perf_Test file as it was deemed unnecessary.
- Ensured consistency in the test cases for evaluating T-Bezier surfaces and curves against their geometric counterparts.
@dpasukhi dpasukhi requested a review from Copilot February 21, 2026 20:04
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 89 out of 92 changed files in this pull request and generated 4 comments.

Comment thread src/ModelingData/TKG3d/GeomEval/GeomEval_CircularHelixCurve.hxx Outdated
Comment thread src/ModelingData/TKG3d/GeomEval/GeomEval_SineWaveCurve.cxx
Comment thread src/ModelingData/TKG3d/GeomEval/GeomEval_CircularHelixCurve.cxx
Comment thread src/ModelingData/TKG3d/GeomEval/GeomEval_SineWaveCurve.cxx
… exceptions with standard range errors and improve consistency in error handling.
@dpasukhi dpasukhi merged commit a816f8a into Open-Cascade-SAS:IR Feb 23, 2026
18 checks passed
@dpasukhi dpasukhi deleted the new_geometry branch February 23, 2026 12:44
@github-project-automation github-project-automation bot moved this from Todo to Done in Maintenance Feb 23, 2026
@dpasukhi
Copy link
Copy Markdown
Member Author

Dear @pieterhijma

If you have any ideas about some new relevant parametric or trigonometric geometry types - it would be pleasure to hear.
The idea of new types - speedup the evaluation of BSplines/Bezier/Offset/Rotation/Extrusion without modification of the original geometry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants