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

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

#include <GeomGridEval_Surface.hxx>

Public Types

using EvaluatorVariant
 Variant type holding all possible surface evaluators.
 

Public Member Functions

 GeomGridEval_Surface (const Adaptor3d_Surface &theSurface)
 Construct from adaptor reference (auto-detects surface type). For GeomAdaptor_Surface, extracts underlying Geom_Surface for optimized evaluation. For other adaptors, stores reference for fallback evaluation.
 
 GeomGridEval_Surface (const occ::handle< Geom_Surface > &theSurface)
 Construct from geometry handle (auto-detects surface type).
 
 GeomGridEval_Surface (const GeomGridEval_Surface &)=delete
 Non-copyable and non-movable.
 
GeomGridEval_Surfaceoperator= (const GeomGridEval_Surface &)=delete
 
 GeomGridEval_Surface (GeomGridEval_Surface &&)=delete
 
GeomGridEval_Surfaceoperator= (GeomGridEval_Surface &&)=delete
 
NCollection_Array2< gp_PntEvaluateGrid (const NCollection_Array1< double > &theUParams, const NCollection_Array1< double > &theVParams) const
 Evaluate grid points at all specified parameters.
 
NCollection_Array2< GeomGridEval::SurfD1EvaluateGridD1 (const NCollection_Array1< double > &theUParams, const NCollection_Array1< double > &theVParams) const
 Evaluate grid points with first partial derivatives.
 
NCollection_Array2< GeomGridEval::SurfD2EvaluateGridD2 (const NCollection_Array1< double > &theUParams, const NCollection_Array1< double > &theVParams) const
 Evaluate grid points with first and second partial derivatives.
 
NCollection_Array2< GeomGridEval::SurfD3EvaluateGridD3 (const NCollection_Array1< double > &theUParams, const NCollection_Array1< double > &theVParams) const
 Evaluate grid points with derivatives up to third order.
 
NCollection_Array2< gp_VecEvaluateGridDN (const NCollection_Array1< double > &theUParams, const NCollection_Array1< double > &theVParams, int theNU, int theNV) const
 Evaluate partial derivative d^(NU+NV)S/(dU^NU dV^NV) at all grid points.
 
GeomAbs_SurfaceType GetType () const
 Returns the detected surface type.
 
bool HasTransformation () const
 Returns true if a transformation is applied.
 
const std::optional< gp_Trsf > & GetTransformation () const
 Returns the transformation (empty if not set).
 

Protected Member Functions

void initialization (const Adaptor3d_Surface &theSurface)
 Initialize from adaptor reference (auto-detects surface type).
 
void initialization (const occ::handle< Geom_Surface > &theSurface)
 Initialize from geometry handle (auto-detects surface type).
 

Detailed Description

Unified grid evaluator for any 3D surface.

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

Supported surface types with optimized evaluation:

Usage:

// OR
// Grid evaluation
NCollection_Array2<gp_Pnt> aGrid = anEval.EvaluateGrid(myUParams, myVParams);
Unified grid evaluator for any 3D surface.
Definition GeomGridEval_Surface.hxx:70
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 surface points.
Definition GeomGridEval_BSplineSurface.hxx:41
Efficient batch evaluator for Bezier surface grid points.
Definition GeomGridEval_BezierSurface.hxx:36
Efficient batch evaluator for cone grid points.
Definition GeomGridEval_Cone.hxx:39
Efficient batch evaluator for cylinder grid points.
Definition GeomGridEval_Cylinder.hxx:37
Batch evaluator for offset surface grid points.
Definition GeomGridEval_OffsetSurface.hxx:39
Fallback evaluator for any surface type.
Definition GeomGridEval_OtherSurface.hxx:42
Efficient batch evaluator for plane grid points.
Definition GeomGridEval_Plane.hxx:36
Efficient batch evaluator for sphere grid points.
Definition GeomGridEval_Sphere.hxx:37
Optimized batch evaluator for linear extrusion surface grid points.
Definition GeomGridEval_SurfaceOfExtrusion.hxx:47
Optimized batch evaluator for revolution surface grid points.
Definition GeomGridEval_SurfaceOfRevolution.hxx:56
Efficient batch evaluator for torus grid points.
Definition GeomGridEval_Torus.hxx:39

Variant type holding all possible surface evaluators.

Constructor & Destructor Documentation

◆ GeomGridEval_Surface() [1/4]

GeomGridEval_Surface::GeomGridEval_Surface ( const Adaptor3d_Surface & theSurface)

Construct from adaptor reference (auto-detects surface type). For GeomAdaptor_Surface, extracts underlying Geom_Surface for optimized evaluation. For other adaptors, stores reference for fallback evaluation.

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

◆ GeomGridEval_Surface() [2/4]

GeomGridEval_Surface::GeomGridEval_Surface ( const occ::handle< Geom_Surface > & theSurface)

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

Parameters
[in]theSurfacegeometry to evaluate

◆ GeomGridEval_Surface() [3/4]

GeomGridEval_Surface::GeomGridEval_Surface ( const GeomGridEval_Surface & )
delete

Non-copyable and non-movable.

◆ GeomGridEval_Surface() [4/4]

GeomGridEval_Surface::GeomGridEval_Surface ( GeomGridEval_Surface && )
delete

Member Function Documentation

◆ EvaluateGrid()

NCollection_Array2< gp_Pnt > GeomGridEval_Surface::EvaluateGrid ( const NCollection_Array1< double > & theUParams,
const NCollection_Array1< double > & theVParams ) const

Evaluate grid points at all specified parameters.

Parameters
[in]theUParamsarray of U parameter values
[in]theVParamsarray of V parameter values
Returns
2D array of 3D points (1-based indexing)

◆ EvaluateGridD1()

NCollection_Array2< GeomGridEval::SurfD1 > GeomGridEval_Surface::EvaluateGridD1 ( const NCollection_Array1< double > & theUParams,
const NCollection_Array1< double > & theVParams ) const

Evaluate grid points with first partial derivatives.

Parameters
[in]theUParamsarray of U parameter values
[in]theVParamsarray of V parameter values
Returns
2D array of SurfD1 (1-based indexing)

◆ EvaluateGridD2()

NCollection_Array2< GeomGridEval::SurfD2 > GeomGridEval_Surface::EvaluateGridD2 ( const NCollection_Array1< double > & theUParams,
const NCollection_Array1< double > & theVParams ) const

Evaluate grid points with first and second partial derivatives.

Parameters
[in]theUParamsarray of U parameter values
[in]theVParamsarray of V parameter values
Returns
2D array of SurfD2 (1-based indexing)

◆ EvaluateGridD3()

NCollection_Array2< GeomGridEval::SurfD3 > GeomGridEval_Surface::EvaluateGridD3 ( const NCollection_Array1< double > & theUParams,
const NCollection_Array1< double > & theVParams ) const

Evaluate grid points with derivatives up to third order.

Parameters
[in]theUParamsarray of U parameter values
[in]theVParamsarray of V parameter values
Returns
2D array of SurfD3 (1-based indexing)

◆ EvaluateGridDN()

NCollection_Array2< gp_Vec > GeomGridEval_Surface::EvaluateGridDN ( const NCollection_Array1< double > & theUParams,
const NCollection_Array1< double > & theVParams,
int theNU,
int theNV ) const

Evaluate partial derivative d^(NU+NV)S/(dU^NU dV^NV) at all grid points.

Parameters
[in]theUParamsarray of U parameter values
[in]theVParamsarray of V parameter values
[in]theNUderivative order in U direction
[in]theNVderivative order in V direction
Returns
2D array of derivative vectors (1-based indexing)

◆ GetTransformation()

const std::optional< gp_Trsf > & GeomGridEval_Surface::GetTransformation ( ) const
inline

Returns the transformation (empty if not set).

◆ GetType()

GeomAbs_SurfaceType GeomGridEval_Surface::GetType ( ) const
inline

Returns the detected surface type.

◆ HasTransformation()

bool GeomGridEval_Surface::HasTransformation ( ) const
inline

Returns true if a transformation is applied.

◆ initialization() [1/2]

void GeomGridEval_Surface::initialization ( const Adaptor3d_Surface & theSurface)
protected

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

Parameters
[in]theSurfacesurface adaptor reference to evaluate

◆ initialization() [2/2]

void GeomGridEval_Surface::initialization ( const occ::handle< Geom_Surface > & theSurface)
protected

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

Parameters
[in]theSurfacegeometry to evaluate

◆ operator=() [1/2]

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

◆ operator=() [2/2]

GeomGridEval_Surface & GeomGridEval_Surface::operator= ( GeomGridEval_Surface && )
delete

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