Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions
Extrema_GFuncExtPC< TheCurve, TheCurveTool, ThePOnC, ThePoint, TheVector, TheSeqPOnC > Class Template Reference

Template class for computing extremal distance function between a point and a curve. Searches for a parameter value u such that dist(P, C(u)) passes through an extremum. Inherits from math_FunctionWithDerivative and is used by math_FunctionRoot and math_FunctionRoots algorithms. More...

#include <Extrema_GFuncExtPC.hxx>

Inheritance diagram for Extrema_GFuncExtPC< TheCurve, TheCurveTool, ThePOnC, ThePoint, TheVector, TheSeqPOnC >:
Inheritance graph
[legend]

Public Member Functions

 Extrema_GFuncExtPC ()
 Default constructor.
 
 Extrema_GFuncExtPC (const ThePoint &theP, const TheCurve &theC)
 Constructor with point and curve initialization.
 
void Initialize (const TheCurve &theC)
 Sets the curve field.
 
void SetPoint (const ThePoint &theP)
 Sets the point field.
 
bool Value (const double theU, double &theF) override
 Calculation of F(u).
 
bool Derivative (const double theU, double &theDF) override
 Calculation of F'(u).
 
bool Values (const double theU, double &theF, double &theDF) override
 Calculation of F(u) and F'(u).
 
int GetStateNumber () override
 Save the found extremum.
 
int NbExt () const
 Return the number of found extrema.
 
double SquareDistance (const int theN) const
 Returns the Nth square distance.
 
bool IsMin (const int theN) const
 Shows if the Nth distance is a minimum.
 
const ThePOnCPoint (const int theN) const
 Returns the Nth extremum point.
 
void SubIntervalInitialize (const double theUfirst, const double theUlast)
 Determines boundaries of subinterval for root finding.
 
double SearchOfTolerance ()
 Computes a tolerance value. If 1st derivative of curve |D1| < Tol, it is considered D1=0.
 
- Public Member Functions inherited from math_FunctionWithDerivative
 ~math_FunctionWithDerivative () override
 
- Public Member Functions inherited from math_Function
virtual ~math_Function ()=default
 Virtual destructor, for safe inheritance.
 

Detailed Description

template<typename TheCurve, typename TheCurveTool, typename ThePOnC, typename ThePoint, typename TheVector, typename TheSeqPOnC>
class Extrema_GFuncExtPC< TheCurve, TheCurveTool, ThePOnC, ThePoint, TheVector, TheSeqPOnC >

Template class for computing extremal distance function between a point and a curve. Searches for a parameter value u such that dist(P, C(u)) passes through an extremum. Inherits from math_FunctionWithDerivative and is used by math_FunctionRoot and math_FunctionRoots algorithms.

If D1c and D2c are the first and second derivatives: F(u) = (C(u)-P).D1c(u) / ||D1c|| DF(u) = ||D1c|| + (C(u)-P).D2c(u)/||D1c|| - F(u)*D2c.D1c/||D1c||^2

Template Parameters
TheCurveCurve type (e.g., Adaptor3d_Curve, Adaptor2d_Curve2d)
TheCurveToolTool for curve operations
ThePOnCPoint on curve type
ThePointPoint type (e.g., gp_Pnt, gp_Pnt2d)
TheVectorVector type (e.g., gp_Vec, gp_Vec2d)
TheSeqPOnCSequence of points on curve type

Constructor & Destructor Documentation

◆ Extrema_GFuncExtPC() [1/2]

Default constructor.

◆ Extrema_GFuncExtPC() [2/2]

Constructor with point and curve initialization.

Parameters
thePPoint to compute distance from
theCCurve to compute distance to

Member Function Documentation

◆ Derivative()

bool Extrema_GFuncExtPC< TheCurve, TheCurveTool, ThePOnC, ThePoint, TheVector, TheSeqPOnC >::Derivative ( const double theU,
double & theDF )
inlineoverridevirtual

Calculation of F'(u).

Parameters
theUParameter value
theDFOutput derivative value
Returns
True if computation succeeded

Implements math_FunctionWithDerivative.

◆ GetStateNumber()

int Extrema_GFuncExtPC< TheCurve, TheCurveTool, ThePOnC, ThePoint, TheVector, TheSeqPOnC >::GetStateNumber ( )
inlineoverridevirtual

Save the found extremum.

Returns
State number

Reimplemented from math_Function.

◆ Initialize()

Sets the curve field.

Parameters
theCCurve to set

◆ IsMin()

Shows if the Nth distance is a minimum.

Parameters
theNIndex of extremum

◆ NbExt()

Return the number of found extrema.

◆ Point()

Returns the Nth extremum point.

Parameters
theNIndex of extremum

◆ SearchOfTolerance()

Computes a tolerance value. If 1st derivative of curve |D1| < Tol, it is considered D1=0.

◆ SetPoint()

void Extrema_GFuncExtPC< TheCurve, TheCurveTool, ThePOnC, ThePoint, TheVector, TheSeqPOnC >::SetPoint ( const ThePoint & theP)
inline

Sets the point field.

Parameters
thePPoint to set

◆ SquareDistance()

Returns the Nth square distance.

Parameters
theNIndex of extremum

◆ SubIntervalInitialize()

void Extrema_GFuncExtPC< TheCurve, TheCurveTool, ThePOnC, ThePoint, TheVector, TheSeqPOnC >::SubIntervalInitialize ( const double theUfirst,
const double theUlast )
inline

Determines boundaries of subinterval for root finding.

Parameters
theUfirstFirst parameter bound
theUlastLast parameter bound

◆ Value()

bool Extrema_GFuncExtPC< TheCurve, TheCurveTool, ThePOnC, ThePoint, TheVector, TheSeqPOnC >::Value ( const double theU,
double & theF )
inlineoverridevirtual

Calculation of F(u).

Parameters
theUParameter value
theFOutput function value
Returns
True if computation succeeded

Implements math_FunctionWithDerivative.

◆ Values()

bool Extrema_GFuncExtPC< TheCurve, TheCurveTool, ThePOnC, ThePoint, TheVector, TheSeqPOnC >::Values ( const double theU,
double & theF,
double & theDF )
inlineoverridevirtual

Calculation of F(u) and F'(u).

Parameters
theUParameter value
theFOutput function value
theDFOutput derivative value
Returns
True if computation succeeded

Implements math_FunctionWithDerivative.


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