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

Main aggregator for Point-Curve extrema computation. More...

#include <ExtremaPC_Curve.hxx>

Public Types

using EvaluatorVariant
 Variant type holding all specialized evaluators.
 

Public Member Functions

 ExtremaPC_Curve (const GeomAdaptor_Curve &theCurve)
 Constructor with curve adaptor. Uses the curve's natural parameter bounds as domain.
 
 ExtremaPC_Curve (const GeomAdaptor_Curve &theCurve, double theUMin, double theUMax)
 Constructor with curve adaptor and parameter range.
 
 ExtremaPC_Curve (const GeomAdaptor_TransformedCurve &theCurve)
 Constructor with transformed curve adaptor. Uses the curve's natural parameter bounds as domain. For elementary curves, uses already-transformed primitives (analytical solver). For BSpline/Bezier, uses inverse-transform optimization with post-processing. For offset/other curves, delegates through Adaptor3d_Curve interface.
 
 ExtremaPC_Curve (const GeomAdaptor_TransformedCurve &theCurve, double theUMin, double theUMax)
 Constructor with transformed curve adaptor and parameter range.
 
 ExtremaPC_Curve (const occ::handle< Geom_Curve > &theCurve)
 Constructor with Geom_Curve. For non-trimmed curves, does NOT set domain (uses natural/unbounded behavior). For trimmed curves, uses the trimmed bounds as domain.
 
 ExtremaPC_Curve (const occ::handle< Geom_Curve > &theCurve, double theUMin, double theUMax)
 Constructor with Geom_Curve and parameter range. For trimmed curves, intersects input bounds with trimmed bounds.
 
 ExtremaPC_Curve (const ExtremaPC_Curve &)=delete
 
ExtremaPC_Curveoperator= (const ExtremaPC_Curve &)=delete
 
 ExtremaPC_Curve (ExtremaPC_Curve &&)=delete
 
ExtremaPC_Curveoperator= (ExtremaPC_Curve &&)=delete
 
const ExtremaPC::ResultPerform (const gp_Pnt &theP, double theTol, ExtremaPC::SearchMode theMode=ExtremaPC::SearchMode::MinMax) const
 Computes extrema between point P and the curve. Uses domain specified at construction time.
 
const ExtremaPC::ResultPerformWithEndpoints (const gp_Pnt &theP, double theTol, ExtremaPC::SearchMode theMode=ExtremaPC::SearchMode::MinMax) const
 Computes extrema between point P and the curve, including endpoints. Uses domain specified at construction time.
 
bool IsInitialized () const
 Returns true if the evaluator is properly initialized.
 

Detailed Description

Main aggregator for Point-Curve extrema computation.

Provides a unified interface for computing extrema between a 3D point and any type of curve. Uses std::variant with std::visit for efficient curve type dispatch at runtime.

Supports all elementary curve types (analytical solutions):

And numerical curves (grid-based with Newton refinement):

Note
The parameter domain is fixed at construction time for optimal performance. The inner curve evaluators build their grids eagerly in the constructor, so multiple Perform() calls reuse the pre-built data without rebuilding.

Usage example:

const ExtremaPC::Result& aResult = anExtPC.Perform(myPoint, 1.0e-9);
if (aResult.IsDone())
{
for (int i = 0; i < aResult.NbExt(); ++i)
{
double aDist = std::sqrt(aResult[i].SquareDistance);
}
}
Main aggregator for Point-Curve extrema computation.
Definition ExtremaPC_Curve.hxx:66
STL input iterator that wraps an OCCT More()/Next() iterator.
Definition NCollection_ForwardRange.hxx:142
Defines a 3D cartesian point.
Definition gp_Pnt.hxx:32
Result of extrema computation containing all found extrema. Non-copyable to enforce use of const refe...
Definition ExtremaPC.hxx:147

Member Typedef Documentation

◆ EvaluatorVariant

Initial value:
std::variant<std::monostate,
Point-BSplineCurve extrema computation using grid-based approach.
Definition ExtremaPC_BSplineCurve.hxx:46
Point-BezierCurve extrema computation using grid-based approach.
Definition ExtremaPC_BezierCurve.hxx:45
Point-Circle extrema computation.
Definition ExtremaPC_Circle.hxx:48
Point-Ellipse extrema computation.
Definition ExtremaPC_Ellipse.hxx:47
Point-Hyperbola extrema computation.
Definition ExtremaPC_Hyperbola.hxx:46
Point-Line extrema computation.
Definition ExtremaPC_Line.hxx:39
Point-OffsetCurve extrema computation using grid-based approach.
Definition ExtremaPC_OffsetCurve.hxx:43
Point-Curve extrema computation for general curves using grid-based approach.
Definition ExtremaPC_OtherCurve.hxx:43
Point-Parabola extrema computation.
Definition ExtremaPC_Parabola.hxx:45

Variant type holding all specialized evaluators.

Constructor & Destructor Documentation

◆ ExtremaPC_Curve() [1/8]

ExtremaPC_Curve::ExtremaPC_Curve ( const GeomAdaptor_Curve & theCurve)
explicit

Constructor with curve adaptor. Uses the curve's natural parameter bounds as domain.

Parameters
[in]theCurvecurve adaptor

◆ ExtremaPC_Curve() [2/8]

ExtremaPC_Curve::ExtremaPC_Curve ( const GeomAdaptor_Curve & theCurve,
double theUMin,
double theUMax )

Constructor with curve adaptor and parameter range.

Parameters
[in]theCurvecurve adaptor
[in]theUMinlower parameter bound
[in]theUMaxupper parameter bound

◆ ExtremaPC_Curve() [3/8]

ExtremaPC_Curve::ExtremaPC_Curve ( const GeomAdaptor_TransformedCurve & theCurve)
explicit

Constructor with transformed curve adaptor. Uses the curve's natural parameter bounds as domain. For elementary curves, uses already-transformed primitives (analytical solver). For BSpline/Bezier, uses inverse-transform optimization with post-processing. For offset/other curves, delegates through Adaptor3d_Curve interface.

Parameters
[in]theCurvetransformed curve adaptor

◆ ExtremaPC_Curve() [4/8]

ExtremaPC_Curve::ExtremaPC_Curve ( const GeomAdaptor_TransformedCurve & theCurve,
double theUMin,
double theUMax )

Constructor with transformed curve adaptor and parameter range.

Parameters
[in]theCurvetransformed curve adaptor
[in]theUMinlower parameter bound
[in]theUMaxupper parameter bound

◆ ExtremaPC_Curve() [5/8]

ExtremaPC_Curve::ExtremaPC_Curve ( const occ::handle< Geom_Curve > & theCurve)
explicit

Constructor with Geom_Curve. For non-trimmed curves, does NOT set domain (uses natural/unbounded behavior). For trimmed curves, uses the trimmed bounds as domain.

Parameters
[in]theCurvegeometric curve handle

◆ ExtremaPC_Curve() [6/8]

ExtremaPC_Curve::ExtremaPC_Curve ( const occ::handle< Geom_Curve > & theCurve,
double theUMin,
double theUMax )

Constructor with Geom_Curve and parameter range. For trimmed curves, intersects input bounds with trimmed bounds.

Parameters
[in]theCurvegeometric curve handle
[in]theUMinlower parameter bound
[in]theUMaxupper parameter bound

◆ ExtremaPC_Curve() [7/8]

ExtremaPC_Curve::ExtremaPC_Curve ( const ExtremaPC_Curve & )
delete

◆ ExtremaPC_Curve() [8/8]

ExtremaPC_Curve::ExtremaPC_Curve ( ExtremaPC_Curve && )
delete

Member Function Documentation

◆ IsInitialized()

bool ExtremaPC_Curve::IsInitialized ( ) const
inline

Returns true if the evaluator is properly initialized.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

ExtremaPC_Curve & ExtremaPC_Curve::operator= ( ExtremaPC_Curve && )
delete

◆ Perform()

const ExtremaPC::Result & ExtremaPC_Curve::Perform ( const gp_Pnt & theP,
double theTol,
ExtremaPC::SearchMode theMode = ExtremaPC::SearchMode::MinMax ) const

Computes extrema between point P and the curve. Uses domain specified at construction time.

Parameters
[in]thePquery point
[in]theToltolerance for extrema computation
[in]theModesearch mode (MinMax, Min, or Max)
Returns
const reference to result containing all found extrema

◆ PerformWithEndpoints()

const ExtremaPC::Result & ExtremaPC_Curve::PerformWithEndpoints ( const gp_Pnt & theP,
double theTol,
ExtremaPC::SearchMode theMode = ExtremaPC::SearchMode::MinMax ) const

Computes extrema between point P and the curve, including endpoints. Uses domain specified at construction time.

Parameters
[in]thePquery point
[in]theToltolerance for extrema computation
[in]theModesearch mode (MinMax, Min, or Max)
Returns
const reference to result containing interior + endpoint extrema

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