Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions
GeomGridEval_Curve Class Reference

Unified grid evaluator for any 3D curve. More...

#include <GeomGridEval_Curve.hxx>

Public Types

using EvaluatorVariant
 Variant type holding all possible curve evaluators.
 

Public Member Functions

 GeomGridEval_Curve (const Adaptor3d_Curve &theCurve)
 Construct from adaptor reference (auto-detects curve type). For GeomAdaptor_Curve, extracts underlying Geom_Curve for optimized evaluation. For other adaptors, stores reference for fallback evaluation.
 
 GeomGridEval_Curve (const occ::handle< Geom_Curve > &theCurve)
 Construct from geometry handle (auto-detects curve type).
 
 GeomGridEval_Curve (const GeomGridEval_Curve &)=delete
 Non-copyable and non-movable.
 
GeomGridEval_Curveoperator= (const GeomGridEval_Curve &)=delete
 
 GeomGridEval_Curve (GeomGridEval_Curve &&)=delete
 
GeomGridEval_Curveoperator= (GeomGridEval_Curve &&)=delete
 
NCollection_Array1< gp_PntEvaluateGrid (const NCollection_Array1< double > &theParams) const
 Evaluate grid points at all parameters.
 
NCollection_Array1< GeomGridEval::CurveD1EvaluateGridD1 (const NCollection_Array1< double > &theParams) const
 Evaluate grid points with first derivative.
 
NCollection_Array1< GeomGridEval::CurveD2EvaluateGridD2 (const NCollection_Array1< double > &theParams) const
 Evaluate grid points with first and second derivatives.
 
NCollection_Array1< GeomGridEval::CurveD3EvaluateGridD3 (const NCollection_Array1< double > &theParams) const
 Evaluate grid points with first, second, and third derivatives.
 
NCollection_Array1< gp_VecEvaluateGridDN (const NCollection_Array1< double > &theParams, int theN) const
 Evaluate Nth derivative at all grid points.
 
GeomAbs_CurveType GetType () const
 Returns the detected curve type.
 

Protected Member Functions

void initialization (const Adaptor3d_Curve &theCurve)
 Initialize from adaptor reference (auto-detects curve type).
 
void initialization (const occ::handle< Geom_Curve > &theCurve)
 Initialize from geometry handle (auto-detects curve type).
 

Detailed Description

Unified grid evaluator for any 3D curve.

Uses std::variant for compile-time type safety and zero heap allocation for the evaluator itself. Automatically detects curve type from Adaptor3d_Curve and dispatches to the appropriate specialized evaluator.

Supported curve types with optimized evaluation:

Usage:

// OR
NCollection_Array1<gp_Pnt> aGrid = anEval.EvaluateGrid(myParams);
Unified grid evaluator for any 3D curve.
Definition GeomGridEval_Curve.hxx:60
STL input iterator that wraps an OCCT More()/Next() iterator.
Definition NCollection_ForwardRange.hxx:142

Member Typedef Documentation

◆ EvaluatorVariant

Initial value:
std::variant<std::monostate,
Efficient batch evaluator for B-spline curve grid points.
Definition GeomGridEval_BSplineCurve.hxx:38
Efficient batch evaluator for Bezier curve grid points.
Definition GeomGridEval_BezierCurve.hxx:34
Efficient batch evaluator for circle grid points.
Definition GeomGridEval_Circle.hxx:33
Efficient batch evaluator for ellipse grid points.
Definition GeomGridEval_Ellipse.hxx:34
Efficient batch evaluator for hyperbola grid points.
Definition GeomGridEval_Hyperbola.hxx:34
Efficient batch evaluator for line grid points.
Definition GeomGridEval_Line.hxx:32
Batch evaluator for offset curve grid points.
Definition GeomGridEval_OffsetCurve.hxx:38
Fallback evaluator for unknown curve types.
Definition GeomGridEval_OtherCurve.hxx:39
Efficient batch evaluator for parabola grid points.
Definition GeomGridEval_Parabola.hxx:34

Variant type holding all possible curve evaluators.

Constructor & Destructor Documentation

◆ GeomGridEval_Curve() [1/4]

GeomGridEval_Curve::GeomGridEval_Curve ( const Adaptor3d_Curve & theCurve)

Construct from adaptor reference (auto-detects curve type). For GeomAdaptor_Curve, extracts underlying Geom_Curve for optimized evaluation. For other adaptors, stores reference for fallback evaluation.

Note
The curve adaptor reference must remain valid during the lifetime of this evaluator when using fallback evaluation.
Parameters
[in]theCurvecurve adaptor reference to evaluate

◆ GeomGridEval_Curve() [2/4]

GeomGridEval_Curve::GeomGridEval_Curve ( const occ::handle< Geom_Curve > & theCurve)

Construct from geometry handle (auto-detects curve type).

Parameters
[in]theCurvegeometry to evaluate

◆ GeomGridEval_Curve() [3/4]

GeomGridEval_Curve::GeomGridEval_Curve ( const GeomGridEval_Curve & )
delete

Non-copyable and non-movable.

◆ GeomGridEval_Curve() [4/4]

GeomGridEval_Curve::GeomGridEval_Curve ( GeomGridEval_Curve && )
delete

Member Function Documentation

◆ EvaluateGrid()

NCollection_Array1< gp_Pnt > GeomGridEval_Curve::EvaluateGrid ( const NCollection_Array1< double > & theParams) const

Evaluate grid points at all parameters.

Parameters
theParamsarray of parameter values
Returns
array of 3D points (1-based indexing)

◆ EvaluateGridD1()

NCollection_Array1< GeomGridEval::CurveD1 > GeomGridEval_Curve::EvaluateGridD1 ( const NCollection_Array1< double > & theParams) const

Evaluate grid points with first derivative.

Parameters
theParamsarray of parameter values
Returns
array of CurveD1 (1-based indexing)

◆ EvaluateGridD2()

NCollection_Array1< GeomGridEval::CurveD2 > GeomGridEval_Curve::EvaluateGridD2 ( const NCollection_Array1< double > & theParams) const

Evaluate grid points with first and second derivatives.

Parameters
theParamsarray of parameter values
Returns
array of CurveD2 (1-based indexing)

◆ EvaluateGridD3()

NCollection_Array1< GeomGridEval::CurveD3 > GeomGridEval_Curve::EvaluateGridD3 ( const NCollection_Array1< double > & theParams) const

Evaluate grid points with first, second, and third derivatives.

Parameters
theParamsarray of parameter values
Returns
array of CurveD3 (1-based indexing)

◆ EvaluateGridDN()

NCollection_Array1< gp_Vec > GeomGridEval_Curve::EvaluateGridDN ( const NCollection_Array1< double > & theParams,
int theN ) const

Evaluate Nth derivative at all grid points.

Parameters
theParamsarray of parameter values
theNderivative order (N >= 1)
Returns
array of derivative vectors (1-based indexing)

◆ GetType()

GeomAbs_CurveType GeomGridEval_Curve::GetType ( ) const
inline

Returns the detected curve type.

◆ initialization() [1/2]

void GeomGridEval_Curve::initialization ( const Adaptor3d_Curve & theCurve)
protected

Initialize from adaptor reference (auto-detects curve type).

Parameters
[in]theCurvecurve adaptor reference to evaluate

◆ initialization() [2/2]

void GeomGridEval_Curve::initialization ( const occ::handle< Geom_Curve > & theCurve)
protected

Initialize from geometry handle (auto-detects curve type).

Parameters
[in]theCurvegeometry to evaluate

◆ operator=() [1/2]

GeomGridEval_Curve & GeomGridEval_Curve::operator= ( const GeomGridEval_Curve & )
delete

◆ operator=() [2/2]

GeomGridEval_Curve & GeomGridEval_Curve::operator= ( GeomGridEval_Curve && )
delete

The documentation for this class was generated from the following file: