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
    BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox Class Reference

    #include <BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox.hxx>

    Public Member Functions

     BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox (const BRepApprox_TheMultiLineOfApprox &SSP, const int FirstPoint, const int LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const math_Vector &Parameters, const int NbPol)
     given a MultiLine, this algorithm computes the least square resolution using the Householder-QR method. If the first and/or the last point is a constraint point, the value of the tangency or curvature is computed in the resolution. NbPol is the number of control points wanted for the approximating curves. The system to solve is the following: A X = B. Where A is the Bernstein matrix computed with the parameters, B the points coordinates and X the poles solutions. The matrix A is the same for each coordinate x, y and z and is also the same for each MultiLine point because they are approximated in parallel(so with the same parameter, only the vector B changes).
     BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox (const BRepApprox_TheMultiLineOfApprox &SSP, const int FirstPoint, const int LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const int NbPol)
     Initializes the fields of the object.
     BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox (const BRepApprox_TheMultiLineOfApprox &SSP, const NCollection_Array1< double > &Knots, const NCollection_Array1< int > &Mults, const int FirstPoint, const int LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const math_Vector &Parameters, const int NbPol)
     given a MultiLine, this algorithm computes the least square resolution using the Householder-QR method. If the first and/or the last point is a constraint point, the value of the tangency or curvature is computed in the resolution. Deg is the degree wanted for the approximating curves. The system to solve is the following: A X = B. Where A is the BSpline functions matrix computed with <parameters>, B the points coordinates and X the poles solutions. The matrix A is the same for each coordinate x, y and z and is also the same for each MultiLine point because they are approximated in parallel(so with the same parameter, only the vector B changes).
     BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox (const BRepApprox_TheMultiLineOfApprox &SSP, const NCollection_Array1< double > &Knots, const NCollection_Array1< int > &Mults, const int FirstPoint, const int LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const int NbPol)
     Initializes the fields of the object.
    void Perform (const math_Vector &Parameters)
     Is used after having initialized the fields. The case "CurvaturePoint" is not treated in this method.
    void Perform (const math_Vector &Parameters, const double l1, const double l2)
     Is used after having initialized the fields.
    void Perform (const math_Vector &Parameters, const math_Vector &V1t, const math_Vector &V2t, const double l1, const double l2)
     Is used after having initialized the fields. <V1t> is the tangent vector at the first point. <V2t> is the tangent vector at the last point.
    void Perform (const math_Vector &Parameters, const math_Vector &V1t, const math_Vector &V2t, const math_Vector &V1c, const math_Vector &V2c, const double l1, const double l2)
     Is used after having initialized the fields. <V1t> is the tangent vector at the first point. <V2t> is the tangent vector at the last point. <V1c> is the tangent vector at the first point. <V2c> is the tangent vector at the last point.
    bool IsDone () const
     returns True if all has been correctly done.
    AppParCurves_MultiCurve BezierValue ()
     returns the result of the approximation, i.e. all the Curves. An exception is raised if NotDone.
    const AppParCurves_MultiBSpCurveBSplineValue ()
     returns the result of the approximation, i.e. all the Curves. An exception is raised if NotDone.
    const math_MatrixFunctionMatrix () const
     returns the function matrix used to approximate the set.
    const math_MatrixDerivativeFunctionMatrix () const
     returns the derivative function matrix used to approximate the set.
    void ErrorGradient (math_Vector &Grad, double &F, double &MaxE3d, double &MaxE2d)
     returns the maximum errors between the MultiLine and the approximation curves. F is the sum of the square distances. Grad is the derivative vector of the function F.
    const math_MatrixDistance ()
     returns the distances between the points of the multiline and the approximation curves.
    void Error (double &F, double &MaxE3d, double &MaxE2d)
     returns the maximum errors between the MultiLine and the approximation curves. F is the sum of the square distances.
    double FirstLambda () const
     returns the value (P2 - P1)/ V1 if the first point was a tangency point.
    double LastLambda () const
     returns the value (PN - PN-1)/ VN if the last point was a tangency point.
    const math_MatrixPoints () const
     returns the matrix of points value.
    const math_MatrixPoles () const
     returns the matrix of resulting control points value.
    const math_IntegerVectorKIndex () const
     Returns the indexes of the first non null values of A and DA. The values are non null from Index(ieme point) +1 to Index(ieme point) + degree +1.

    Protected Member Functions

    void Init (const BRepApprox_TheMultiLineOfApprox &SSP, const int FirstPoint, const int LastPoint)
     is used by the constructors above.
    int NbBColumns (const BRepApprox_TheMultiLineOfApprox &SSP) const
     returns the number of second member columns. Is used internally to initialize the fields.
    int TheFirstPoint (const AppParCurves_Constraint FirstCons, const int FirstPoint) const
     returns the first point being fitted.
    int TheLastPoint (const AppParCurves_Constraint LastCons, const int LastPoint) const
     returns the last point being fitted.
    void Affect (const BRepApprox_TheMultiLineOfApprox &SSP, const int Index, AppParCurves_Constraint &Cons, math_Vector &Vt, math_Vector &Vc)
     Affects the fields in the case of a constraint point.
    void ComputeFunction (const math_Vector &Parameters)
    void SearchIndex (math_IntegerVector &Index)
    void MakeTAA (math_Vector &TheA, math_Vector &TheB)
     computes internal matrixes for the resolution
    void MakeTAA (math_Vector &TheA)
     computes internal matrixes for the resolution
    void MakeTAA (math_Vector &TheA, math_Matrix &TheB)
     computes internal matrixes for the resolution

    Constructor & Destructor Documentation

    ◆ BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox() [1/4]

    BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox ( const BRepApprox_TheMultiLineOfApprox & SSP,
    const int FirstPoint,
    const int LastPoint,
    const AppParCurves_Constraint FirstCons,
    const AppParCurves_Constraint LastCons,
    const math_Vector & Parameters,
    const int NbPol )

    given a MultiLine, this algorithm computes the least square resolution using the Householder-QR method. If the first and/or the last point is a constraint point, the value of the tangency or curvature is computed in the resolution. NbPol is the number of control points wanted for the approximating curves. The system to solve is the following: A X = B. Where A is the Bernstein matrix computed with the parameters, B the points coordinates and X the poles solutions. The matrix A is the same for each coordinate x, y and z and is also the same for each MultiLine point because they are approximated in parallel(so with the same parameter, only the vector B changes).

    ◆ BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox() [2/4]

    BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox ( const BRepApprox_TheMultiLineOfApprox & SSP,
    const int FirstPoint,
    const int LastPoint,
    const AppParCurves_Constraint FirstCons,
    const AppParCurves_Constraint LastCons,
    const int NbPol )

    Initializes the fields of the object.

    ◆ BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox() [3/4]

    BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox ( const BRepApprox_TheMultiLineOfApprox & SSP,
    const NCollection_Array1< double > & Knots,
    const NCollection_Array1< int > & Mults,
    const int FirstPoint,
    const int LastPoint,
    const AppParCurves_Constraint FirstCons,
    const AppParCurves_Constraint LastCons,
    const math_Vector & Parameters,
    const int NbPol )

    given a MultiLine, this algorithm computes the least square resolution using the Householder-QR method. If the first and/or the last point is a constraint point, the value of the tangency or curvature is computed in the resolution. Deg is the degree wanted for the approximating curves. The system to solve is the following: A X = B. Where A is the BSpline functions matrix computed with <parameters>, B the points coordinates and X the poles solutions. The matrix A is the same for each coordinate x, y and z and is also the same for each MultiLine point because they are approximated in parallel(so with the same parameter, only the vector B changes).

    ◆ BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox() [4/4]

    BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox ( const BRepApprox_TheMultiLineOfApprox & SSP,
    const NCollection_Array1< double > & Knots,
    const NCollection_Array1< int > & Mults,
    const int FirstPoint,
    const int LastPoint,
    const AppParCurves_Constraint FirstCons,
    const AppParCurves_Constraint LastCons,
    const int NbPol )

    Initializes the fields of the object.

    Member Function Documentation

    ◆ Affect()

    void BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::Affect ( const BRepApprox_TheMultiLineOfApprox & SSP,
    const int Index,
    AppParCurves_Constraint & Cons,
    math_Vector & Vt,
    math_Vector & Vc )
    protected

    Affects the fields in the case of a constraint point.

    ◆ BezierValue()

    AppParCurves_MultiCurve BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::BezierValue ( )

    returns the result of the approximation, i.e. all the Curves. An exception is raised if NotDone.

    ◆ BSplineValue()

    const AppParCurves_MultiBSpCurve & BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::BSplineValue ( )

    returns the result of the approximation, i.e. all the Curves. An exception is raised if NotDone.

    ◆ ComputeFunction()

    void BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::ComputeFunction ( const math_Vector & Parameters)
    protected

    ◆ DerivativeFunctionMatrix()

    const math_Matrix & BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::DerivativeFunctionMatrix ( ) const

    returns the derivative function matrix used to approximate the set.

    ◆ Distance()

    const math_Matrix & BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::Distance ( )

    returns the distances between the points of the multiline and the approximation curves.

    ◆ Error()

    void BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::Error ( double & F,
    double & MaxE3d,
    double & MaxE2d )

    returns the maximum errors between the MultiLine and the approximation curves. F is the sum of the square distances.

    ◆ ErrorGradient()

    void BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::ErrorGradient ( math_Vector & Grad,
    double & F,
    double & MaxE3d,
    double & MaxE2d )

    returns the maximum errors between the MultiLine and the approximation curves. F is the sum of the square distances. Grad is the derivative vector of the function F.

    ◆ FirstLambda()

    double BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::FirstLambda ( ) const

    returns the value (P2 - P1)/ V1 if the first point was a tangency point.

    ◆ FunctionMatrix()

    const math_Matrix & BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::FunctionMatrix ( ) const

    returns the function matrix used to approximate the set.

    ◆ Init()

    void BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::Init ( const BRepApprox_TheMultiLineOfApprox & SSP,
    const int FirstPoint,
    const int LastPoint )
    protected

    is used by the constructors above.

    ◆ IsDone()

    bool BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::IsDone ( ) const

    returns True if all has been correctly done.

    ◆ KIndex()

    const math_IntegerVector & BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::KIndex ( ) const

    Returns the indexes of the first non null values of A and DA. The values are non null from Index(ieme point) +1 to Index(ieme point) + degree +1.

    ◆ LastLambda()

    double BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::LastLambda ( ) const

    returns the value (PN - PN-1)/ VN if the last point was a tangency point.

    ◆ MakeTAA() [1/3]

    void BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::MakeTAA ( math_Vector & TheA)
    protected

    computes internal matrixes for the resolution

    ◆ MakeTAA() [2/3]

    void BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::MakeTAA ( math_Vector & TheA,
    math_Matrix & TheB )
    protected

    computes internal matrixes for the resolution

    ◆ MakeTAA() [3/3]

    void BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::MakeTAA ( math_Vector & TheA,
    math_Vector & TheB )
    protected

    computes internal matrixes for the resolution

    ◆ NbBColumns()

    int BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::NbBColumns ( const BRepApprox_TheMultiLineOfApprox & SSP) const
    protected

    returns the number of second member columns. Is used internally to initialize the fields.

    ◆ Perform() [1/4]

    void BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::Perform ( const math_Vector & Parameters)

    Is used after having initialized the fields. The case "CurvaturePoint" is not treated in this method.

    ◆ Perform() [2/4]

    void BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::Perform ( const math_Vector & Parameters,
    const double l1,
    const double l2 )

    Is used after having initialized the fields.

    ◆ Perform() [3/4]

    void BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::Perform ( const math_Vector & Parameters,
    const math_Vector & V1t,
    const math_Vector & V2t,
    const double l1,
    const double l2 )

    Is used after having initialized the fields. <V1t> is the tangent vector at the first point. <V2t> is the tangent vector at the last point.

    ◆ Perform() [4/4]

    void BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::Perform ( const math_Vector & Parameters,
    const math_Vector & V1t,
    const math_Vector & V2t,
    const math_Vector & V1c,
    const math_Vector & V2c,
    const double l1,
    const double l2 )

    Is used after having initialized the fields. <V1t> is the tangent vector at the first point. <V2t> is the tangent vector at the last point. <V1c> is the tangent vector at the first point. <V2c> is the tangent vector at the last point.

    ◆ Points()

    const math_Matrix & BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::Points ( ) const

    returns the matrix of points value.

    ◆ Poles()

    const math_Matrix & BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::Poles ( ) const

    returns the matrix of resulting control points value.

    ◆ SearchIndex()

    void BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::SearchIndex ( math_IntegerVector & Index)
    protected

    ◆ TheFirstPoint()

    int BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::TheFirstPoint ( const AppParCurves_Constraint FirstCons,
    const int FirstPoint ) const
    protected

    returns the first point being fitted.

    ◆ TheLastPoint()

    int BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox::TheLastPoint ( const AppParCurves_Constraint LastCons,
    const int LastPoint ) const
    protected

    returns the last point being fitted.


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