Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions
Extrema_GGExtPC< TheCurve, TheCurveTool, TheExtPElC, ThePoint, TheVector, ThePOnC, TheSequenceOfPOnC, TheEPC > Class Template Reference

Generic class for computing extremal distances between a point and a curve. More...

#include <Extrema_GGExtPC.hxx>

Public Member Functions

 Extrema_GGExtPC ()
 Default constructor.
 
 Extrema_GGExtPC (const ThePoint &theP, const TheCurve &theC, const double theUinf, const double theUsup, const double theTolF=1.0e-10)
 Calculates all extremum distances between point P and curve C within the specified parameter range.
 
 Extrema_GGExtPC (const ThePoint &theP, const TheCurve &theC, const double theTolF=1.0e-10)
 Calculates all extremum distances between point P and curve C using the full curve parameter range.
 
void Initialize (const TheCurve &theC, const double theUinf, const double theUsup, const double theTolF=1.0e-10)
 Initializes the algorithm with curve and parameter range.
 
void Perform (const ThePoint &theP)
 Performs the extremum computation for the given point.
 
bool IsDone () const
 Returns true if the distances are found.
 
double SquareDistance (const int theN) const
 Returns the Nth extremum square distance.
 
int NbExt () const
 Returns the number of extremum distances.
 
bool IsMin (const int theN) const
 Returns true if the Nth extremum distance is a minimum.
 
const ThePOnCPoint (const int theN) const
 Returns the point of the Nth extremum distance.
 
void TrimmedSquareDistances (double &theDist1, double &theDist2, ThePoint &theP1, ThePoint &theP2) const
 Returns the distances at curve endpoints.
 

Protected Member Functions

void IntervalPerform (const ThePoint &theP)
 Performs extremum search on the current interval.
 
void AddSol (const double theU, const ThePoint &theP, const double theSqDist, const bool isMin)
 Adds a solution if not already present.
 

Detailed Description

template<typename TheCurve, typename TheCurveTool, typename TheExtPElC, typename ThePoint, typename TheVector, typename ThePOnC, typename TheSequenceOfPOnC, typename TheEPC>
class Extrema_GGExtPC< TheCurve, TheCurveTool, TheExtPElC, ThePoint, TheVector, ThePOnC, TheSequenceOfPOnC, TheEPC >

Generic class for computing extremal distances between a point and a curve.

This template class provides comprehensive extremum search functionality, handling different curve types (lines, circles, ellipses, parabolas, hyperbolas, Bezier, BSpline, and general curves) with optimized algorithms.

Template Parameters
TheCurveThe curve type (e.g., Adaptor3d_Curve, Adaptor2d_Curve2d)
TheCurveToolThe curve tool providing static methods
TheExtPElCThe elementary curve extremum class
ThePointThe point type (e.g., gp_Pnt, gp_Pnt2d)
TheVectorThe vector type (e.g., gp_Vec, gp_Vec2d)
ThePOnCThe point-on-curve type
TheSequenceOfPOnCThe sequence of points on curve
TheEPCThe general extremum point-curve class

Constructor & Destructor Documentation

◆ Extrema_GGExtPC() [1/3]

Default constructor.

◆ Extrema_GGExtPC() [2/3]

Extrema_GGExtPC< TheCurve, TheCurveTool, TheExtPElC, ThePoint, TheVector, ThePOnC, TheSequenceOfPOnC, TheEPC >::Extrema_GGExtPC ( const ThePoint & theP,
const TheCurve & theC,
const double theUinf,
const double theUsup,
const double theTolF = 1.0e-10 )
inline

Calculates all extremum distances between point P and curve C within the specified parameter range.

Parameters
thePThe point
theCThe curve
theUinfLower bound of parameter range
theUsupUpper bound of parameter range
theTolFTolerance on function value (default 1.0e-10)

◆ Extrema_GGExtPC() [3/3]

Calculates all extremum distances between point P and curve C using the full curve parameter range.

Parameters
thePThe point
theCThe curve
theTolFTolerance on function value (default 1.0e-10)

Member Function Documentation

◆ AddSol()

void Extrema_GGExtPC< TheCurve, TheCurveTool, TheExtPElC, ThePoint, TheVector, ThePOnC, TheSequenceOfPOnC, TheEPC >::AddSol ( const double theU,
const ThePoint & theP,
const double theSqDist,
const bool isMin )
inlineprotected

Adds a solution if not already present.

◆ Initialize()

void Extrema_GGExtPC< TheCurve, TheCurveTool, TheExtPElC, ThePoint, TheVector, ThePOnC, TheSequenceOfPOnC, TheEPC >::Initialize ( const TheCurve & theC,
const double theUinf,
const double theUsup,
const double theTolF = 1.0e-10 )
inline

Initializes the algorithm with curve and parameter range.

Parameters
theCThe curve
theUinfLower bound of parameter range
theUsupUpper bound of parameter range
theTolFTolerance on function value (default 1.0e-10)

◆ IntervalPerform()

Performs extremum search on the current interval.

◆ IsDone()

Returns true if the distances are found.

◆ IsMin()

Returns true if the Nth extremum distance is a minimum.

Parameters
theNIndex of the extremum (1-based)
Returns
true if minimum, false if maximum

◆ NbExt()

Returns the number of extremum distances.

Returns
Number of extrema found

◆ Perform()

Performs the extremum computation for the given point.

Parameters
thePThe point to find extrema from

◆ Point()

Returns the point of the Nth extremum distance.

Parameters
theNIndex of the extremum (1-based)
Returns
The point on curve

◆ SquareDistance()

Returns the Nth extremum square distance.

Parameters
theNIndex of the extremum (1-based)
Returns
Square distance value

◆ TrimmedSquareDistances()

void Extrema_GGExtPC< TheCurve, TheCurveTool, TheExtPElC, ThePoint, TheVector, ThePOnC, TheSequenceOfPOnC, TheEPC >::TrimmedSquareDistances ( double & theDist1,
double & theDist2,
ThePoint & theP1,
ThePoint & theP2 ) const
inline

Returns the distances at curve endpoints.

Parameters
[out]theDist1Square distance to first point
[out]theDist2Square distance to last point
[out]theP1First point on curve
[out]theP2Last point on curve

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