Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions
Extrema_GGenExtPC< TheCurve, TheTool, ThePOnC, ThePoint, ThePCF > Class Template Reference

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

#include <Extrema_GGenExtPC.hxx>

Public Member Functions

 Extrema_GGenExtPC ()
 Default constructor.
 
 Extrema_GGenExtPC (const ThePoint &theP, const TheCurve &theC, const int theNbSample, const double theTolU, const double theTolF)
 Calculates all extremum distances between point P and curve C.
 
 Extrema_GGenExtPC (const ThePoint &theP, const TheCurve &theC, const int theNbSample, const double theUmin, const double theUsup, const double theTolU, const double theTolF)
 Calculates all extremum distances in a given parameter range.
 
void Initialize (const TheCurve &theC, const int theNbU, const double theTolU, const double theTolF)
 Initializes the algorithm with the full curve parameter range.
 
void Initialize (const TheCurve &theC, const int theNbU, const double theUmin, const double theUsup, const double theTolU, const double theTolF)
 Initializes the algorithm with a specified parameter range.
 
void Initialize (const int theNbU, const double theUmin, const double theUsup, const double theTolU, const double theTolF)
 Initializes only the parameter range and tolerances.
 
void Initialize (const TheCurve &theC)
 Initializes the curve for the function.
 
void Perform (const ThePoint &theP)
 Performs the extremum search for the given point.
 
bool IsDone () const
 Returns true if the distances are found.
 
int NbExt () const
 Returns the number of extremum distances.
 
double SquareDistance (const int theN) const
 Returns the Nth extremum square distance.
 
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.
 

Detailed Description

template<typename TheCurve, typename TheTool, typename ThePOnC, typename ThePoint, typename ThePCF>
class Extrema_GGenExtPC< TheCurve, TheTool, ThePOnC, ThePoint, ThePCF >

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

This template class searches for all parameter values u where the distance function F(u) = distance(P, C(u)) has an extremum, i.e., where dF/du = 0.

Template Parameters
TheCurveThe curve type (e.g., Adaptor3d_Curve, Adaptor2d_Curve2d)
TheToolThe curve tool providing static methods (FirstParameter, LastParameter)
ThePOnCThe point-on-curve type (e.g., Extrema_POnCurv, Extrema_POnCurv2d)
ThePointThe point type (e.g., gp_Pnt, gp_Pnt2d)
ThePCFThe point-curve function type for extremum computation

Constructor & Destructor Documentation

◆ Extrema_GGenExtPC() [1/3]

Default constructor.

◆ Extrema_GGenExtPC() [2/3]

Extrema_GGenExtPC< TheCurve, TheTool, ThePOnC, ThePoint, ThePCF >::Extrema_GGenExtPC ( const ThePoint & theP,
const TheCurve & theC,
const int theNbSample,
const double theTolU,
const double theTolF )
inline

Calculates all extremum distances between point P and curve C.

Parameters
thePThe point
theCThe curve
theNbSampleNumber of sample points for root finding
theTolUTolerance on parameter u
theTolFTolerance on function value

◆ Extrema_GGenExtPC() [3/3]

Extrema_GGenExtPC< TheCurve, TheTool, ThePOnC, ThePoint, ThePCF >::Extrema_GGenExtPC ( const ThePoint & theP,
const TheCurve & theC,
const int theNbSample,
const double theUmin,
const double theUsup,
const double theTolU,
const double theTolF )
inline

Calculates all extremum distances in a given parameter range.

Parameters
thePThe point
theCThe curve
theNbSampleNumber of sample points for root finding
theUminLower bound of parameter range
theUsupUpper bound of parameter range
theTolUTolerance on parameter u
theTolFTolerance on function value

Member Function Documentation

◆ Initialize() [1/4]

void Extrema_GGenExtPC< TheCurve, TheTool, ThePOnC, ThePoint, ThePCF >::Initialize ( const int theNbU,
const double theUmin,
const double theUsup,
const double theTolU,
const double theTolF )
inline

Initializes only the parameter range and tolerances.

Parameters
theNbUNumber of sample points
theUminLower bound of parameter range
theUsupUpper bound of parameter range
theTolUTolerance on parameter u
theTolFTolerance on function value

◆ Initialize() [2/4]

void Extrema_GGenExtPC< TheCurve, TheTool, ThePOnC, ThePoint, ThePCF >::Initialize ( const TheCurve & theC)
inline

Initializes the curve for the function.

Parameters
theCThe curve

◆ Initialize() [3/4]

void Extrema_GGenExtPC< TheCurve, TheTool, ThePOnC, ThePoint, ThePCF >::Initialize ( const TheCurve & theC,
const int theNbU,
const double theTolU,
const double theTolF )
inline

Initializes the algorithm with the full curve parameter range.

Parameters
theCThe curve
theNbUNumber of sample points
theTolUTolerance on parameter u
theTolFTolerance on function value

◆ Initialize() [4/4]

void Extrema_GGenExtPC< TheCurve, TheTool, ThePOnC, ThePoint, ThePCF >::Initialize ( const TheCurve & theC,
const int theNbU,
const double theUmin,
const double theUsup,
const double theTolU,
const double theTolF )
inline

Initializes the algorithm with a specified parameter range.

Parameters
theCThe curve
theNbUNumber of sample points
theUminLower bound of parameter range
theUsupUpper bound of parameter range
theTolUTolerance on parameter u
theTolFTolerance on function value

◆ IsDone()

bool Extrema_GGenExtPC< TheCurve, TheTool, ThePOnC, ThePoint, ThePCF >::IsDone ( ) const
inline

Returns true if the distances are found.

◆ IsMin()

bool Extrema_GGenExtPC< TheCurve, TheTool, ThePOnC, ThePoint, ThePCF >::IsMin ( const int theN) const
inline

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()

int Extrema_GGenExtPC< TheCurve, TheTool, ThePOnC, ThePoint, ThePCF >::NbExt ( ) const
inline

Returns the number of extremum distances.

Returns
Number of extrema found

◆ Perform()

void Extrema_GGenExtPC< TheCurve, TheTool, ThePOnC, ThePoint, ThePCF >::Perform ( const ThePoint & theP)
inline

Performs the extremum search for the given point.

Parameters
thePThe point to find extrema from

◆ Point()

const ThePOnC & Extrema_GGenExtPC< TheCurve, TheTool, ThePOnC, ThePoint, ThePCF >::Point ( const int theN) const
inline

Returns the point of the Nth extremum distance.

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

◆ SquareDistance()

double Extrema_GGenExtPC< TheCurve, TheTool, ThePOnC, ThePoint, ThePCF >::SquareDistance ( const int theN) const
inline

Returns the Nth extremum square distance.

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

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