OCCT3D OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    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 >:

    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 ThePOnC & Point (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]

    template<typename TheCurve, typename TheCurveTool, typename ThePOnC, typename ThePoint, typename TheVector, typename TheSeqPOnC>
    Extrema_GFuncExtPC< TheCurve, TheCurveTool, ThePOnC, ThePoint, TheVector, TheSeqPOnC >::Extrema_GFuncExtPC ( )
    inline

    Default constructor.

    ◆ Extrema_GFuncExtPC() [2/2]

    template<typename TheCurve, typename TheCurveTool, typename ThePOnC, typename ThePoint, typename TheVector, typename TheSeqPOnC>
    Extrema_GFuncExtPC< TheCurve, TheCurveTool, ThePOnC, ThePoint, TheVector, TheSeqPOnC >::Extrema_GFuncExtPC ( const ThePoint & theP,
    const TheCurve & theC )
    inline

    Constructor with point and curve initialization.

    Parameters
    thePPoint to compute distance from
    theCCurve to compute distance to

    Member Function Documentation

    ◆ Derivative()

    template<typename TheCurve, typename TheCurveTool, typename ThePOnC, typename ThePoint, typename TheVector, typename TheSeqPOnC>
    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()

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

    Save the found extremum.

    Returns
    State number

    Reimplemented from math_Function.

    ◆ Initialize()

    template<typename TheCurve, typename TheCurveTool, typename ThePOnC, typename ThePoint, typename TheVector, typename TheSeqPOnC>
    void Extrema_GFuncExtPC< TheCurve, TheCurveTool, ThePOnC, ThePoint, TheVector, TheSeqPOnC >::Initialize ( const TheCurve & theC)
    inline

    Sets the curve field.

    Parameters
    theCCurve to set

    ◆ IsMin()

    template<typename TheCurve, typename TheCurveTool, typename ThePOnC, typename ThePoint, typename TheVector, typename TheSeqPOnC>
    bool Extrema_GFuncExtPC< TheCurve, TheCurveTool, ThePOnC, ThePoint, TheVector, TheSeqPOnC >::IsMin ( const int theN) const
    inline

    Shows if the Nth distance is a minimum.

    Parameters
    theNIndex of extremum

    ◆ NbExt()

    template<typename TheCurve, typename TheCurveTool, typename ThePOnC, typename ThePoint, typename TheVector, typename TheSeqPOnC>
    int Extrema_GFuncExtPC< TheCurve, TheCurveTool, ThePOnC, ThePoint, TheVector, TheSeqPOnC >::NbExt ( ) const
    inline

    Return the number of found extrema.

    ◆ Point()

    template<typename TheCurve, typename TheCurveTool, typename ThePOnC, typename ThePoint, typename TheVector, typename TheSeqPOnC>
    const ThePOnC & Extrema_GFuncExtPC< TheCurve, TheCurveTool, ThePOnC, ThePoint, TheVector, TheSeqPOnC >::Point ( const int theN) const
    inline

    Returns the Nth extremum point.

    Parameters
    theNIndex of extremum

    ◆ SearchOfTolerance()

    template<typename TheCurve, typename TheCurveTool, typename ThePOnC, typename ThePoint, typename TheVector, typename TheSeqPOnC>
    double Extrema_GFuncExtPC< TheCurve, TheCurveTool, ThePOnC, ThePoint, TheVector, TheSeqPOnC >::SearchOfTolerance ( )
    inline

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

    ◆ SetPoint()

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

    Sets the point field.

    Parameters
    thePPoint to set

    ◆ SquareDistance()

    template<typename TheCurve, typename TheCurveTool, typename ThePOnC, typename ThePoint, typename TheVector, typename TheSeqPOnC>
    double Extrema_GFuncExtPC< TheCurve, TheCurveTool, ThePOnC, ThePoint, TheVector, TheSeqPOnC >::SquareDistance ( const int theN) const
    inline

    Returns the Nth square distance.

    Parameters
    theNIndex of extremum

    ◆ SubIntervalInitialize()

    template<typename TheCurve, typename TheCurveTool, typename ThePOnC, typename ThePoint, typename TheVector, typename TheSeqPOnC>
    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()

    template<typename TheCurve, typename TheCurveTool, typename ThePOnC, typename ThePoint, typename TheVector, typename TheSeqPOnC>
    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()

    template<typename TheCurve, typename TheCurveTool, typename ThePOnC, typename ThePoint, typename TheVector, typename TheSeqPOnC>
    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: