Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Data Structures | Public Types | Public Member Functions | Static Public Member Functions
ExtremaPC_GridEvaluator Class Reference

Grid-based point-curve extrema computation class. More...

#include <ExtremaPC_GridEvaluator.hxx>

Data Structures

struct  Candidate
 Candidate interval for Newton refinement. More...
 
struct  GridPoint
 Cached grid point with pre-computed data. More...
 

Public Types

enum class  CandidateType { SignChange , NearZero }
 Type of candidate extremum detected during grid scan. More...
 

Public Member Functions

 ExtremaPC_GridEvaluator ()=default
 Default constructor.
 
template<typename GridEval >
void BuildGrid (GridEval &theEval, const math_Vector &theParams)
 Build grid from GeomGridEval D1 results.
 
const NCollection_Array1< GridPoint > & Grid () const
 Returns the cached grid.
 
ExtremaPC::ResultResult () const
 Returns mutable reference to the result for post-processing.
 
const ExtremaPC::ResultPerform (const Adaptor3d_Curve &theCurve, const gp_Pnt &theP, const ExtremaPC::Domain1D &theDomain, double theTol, ExtremaPC::SearchMode theMode) const
 Perform extrema computation using cached grid (interior only).
 

Static Public Member Functions

static math_Vector BuildUniformParams (double theUMin, double theUMax, int theNbSamples)
 Build uniform parameter grid.
 

Detailed Description

Grid-based point-curve extrema computation class.

Provides grid-based extrema finding algorithm with cached state for optimal performance on repeated queries. Used by BSpline, Bezier, Offset, and other curve evaluators.

Algorithm:

  1. Build grid of (parameter, point, D1) from GeomGridEval
  2. Linear scan of grid to find candidate intervals (sign changes in F(u))
  3. Newton refinement on each candidate
  4. Optional endpoint handling

All temporary vectors are stored as mutable fields and reused via Clear() to avoid repeated heap allocations.

Member Enumeration Documentation

◆ CandidateType

Type of candidate extremum detected during grid scan.

Enumerator
SignChange 

F(u) changes sign between grid points.

NearZero 

F(u) is very small at grid point.

Constructor & Destructor Documentation

◆ ExtremaPC_GridEvaluator()

ExtremaPC_GridEvaluator::ExtremaPC_GridEvaluator ( )
default

Default constructor.

Member Function Documentation

◆ BuildGrid()

template<typename GridEval >
void ExtremaPC_GridEvaluator::BuildGrid ( GridEval & theEval,
const math_Vector & theParams )
inline

Build grid from GeomGridEval D1 results.

Template Parameters
GridEvaltype with EvaluateGridD1(params) method
Parameters
theEvalgrid evaluator
theParamsparameter values (math_Vector with Array1() accessor)

◆ BuildUniformParams()

static math_Vector ExtremaPC_GridEvaluator::BuildUniformParams ( double theUMin,
double theUMax,
int theNbSamples )
inlinestatic

Build uniform parameter grid.

Returns
math_Vector with 1-based indexing

◆ Grid()

const NCollection_Array1< GridPoint > & ExtremaPC_GridEvaluator::Grid ( ) const
inline

Returns the cached grid.

◆ Perform()

const ExtremaPC::Result & ExtremaPC_GridEvaluator::Perform ( const Adaptor3d_Curve & theCurve,
const gp_Pnt & theP,
const ExtremaPC::Domain1D & theDomain,
double theTol,
ExtremaPC::SearchMode theMode ) const
inline

Perform extrema computation using cached grid (interior only).

Parameters
theCurvecurve adaptor
thePquery point
theDomainparameter domain
theToltolerance
theModesearch mode
Returns
const reference to result with interior extrema only

◆ Result()

ExtremaPC::Result & ExtremaPC_GridEvaluator::Result ( ) const
inline

Returns mutable reference to the result for post-processing.


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