Open CASCADE Technology 7.8.0
|
#include <BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox.hxx>
Public Member Functions | |
BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox (const BRepApprox_TheMultiLineOfApprox &SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const math_Vector &Parameters, const Standard_Integer 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_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox (const BRepApprox_TheMultiLineOfApprox &SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const Standard_Integer NbPol) | |
Initializes the fields of the object. | |
BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox (const BRepApprox_TheMultiLineOfApprox &SSP, const TColStd_Array1OfReal &Knots, const TColStd_Array1OfInteger &Mults, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const math_Vector &Parameters, const Standard_Integer 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_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox (const BRepApprox_TheMultiLineOfApprox &SSP, const TColStd_Array1OfReal &Knots, const TColStd_Array1OfInteger &Mults, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, const Standard_Integer 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 Standard_Real l1, const Standard_Real l2) |
Is used after having initialized the fields. | |
void | Perform (const math_Vector &Parameters, const math_Vector &V1t, const math_Vector &V2t, const Standard_Real l1, const Standard_Real 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 Standard_Real l1, const Standard_Real 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. | |
Standard_Boolean | 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_MultiBSpCurve & | BSplineValue () |
returns the result of the approximation, i.e. all the Curves. An exception is raised if NotDone. | |
const math_Matrix & | FunctionMatrix () const |
returns the function matrix used to approximate the set. | |
const math_Matrix & | DerivativeFunctionMatrix () const |
returns the derivative function matrix used to approximate the set. | |
void | ErrorGradient (math_Vector &Grad, Standard_Real &F, Standard_Real &MaxE3d, Standard_Real &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_Matrix & | Distance () |
returns the distances between the points of the multiline and the approximation curves. | |
void | Error (Standard_Real &F, Standard_Real &MaxE3d, Standard_Real &MaxE2d) |
returns the maximum errors between the MultiLine and the approximation curves. F is the sum of the square distances. | |
Standard_Real | FirstLambda () const |
returns the value (P2 - P1)/ V1 if the first point was a tangency point. | |
Standard_Real | LastLambda () const |
returns the value (PN - PN-1)/ VN if the last point was a tangency point. | |
const math_Matrix & | Points () const |
returns the matrix of points value. | |
const math_Matrix & | Poles () const |
returns the matrix of resulting control points value. | |
const math_IntegerVector & | 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. | |
Protected Member Functions | |
void | Init (const BRepApprox_TheMultiLineOfApprox &SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint) |
is used by the constructors above. | |
Standard_Integer | NbBColumns (const BRepApprox_TheMultiLineOfApprox &SSP) const |
returns the number of second member columns. Is used internally to initialize the fields. | |
Standard_Integer | TheFirstPoint (const AppParCurves_Constraint FirstCons, const Standard_Integer FirstPoint) const |
returns the first point being fitted. | |
Standard_Integer | TheLastPoint (const AppParCurves_Constraint LastCons, const Standard_Integer LastPoint) const |
returns the last point being fitted. | |
void | Affect (const BRepApprox_TheMultiLineOfApprox &SSP, const Standard_Integer 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 | |
BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox::BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox | ( | const BRepApprox_TheMultiLineOfApprox & | SSP, |
const Standard_Integer | FirstPoint, | ||
const Standard_Integer | LastPoint, | ||
const AppParCurves_Constraint | FirstCons, | ||
const AppParCurves_Constraint | LastCons, | ||
const math_Vector & | Parameters, | ||
const Standard_Integer | 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_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox::BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox | ( | const BRepApprox_TheMultiLineOfApprox & | SSP, |
const Standard_Integer | FirstPoint, | ||
const Standard_Integer | LastPoint, | ||
const AppParCurves_Constraint | FirstCons, | ||
const AppParCurves_Constraint | LastCons, | ||
const Standard_Integer | NbPol | ||
) |
Initializes the fields of the object.
BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox::BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox | ( | const BRepApprox_TheMultiLineOfApprox & | SSP, |
const TColStd_Array1OfReal & | Knots, | ||
const TColStd_Array1OfInteger & | Mults, | ||
const Standard_Integer | FirstPoint, | ||
const Standard_Integer | LastPoint, | ||
const AppParCurves_Constraint | FirstCons, | ||
const AppParCurves_Constraint | LastCons, | ||
const math_Vector & | Parameters, | ||
const Standard_Integer | 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_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox::BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox | ( | const BRepApprox_TheMultiLineOfApprox & | SSP, |
const TColStd_Array1OfReal & | Knots, | ||
const TColStd_Array1OfInteger & | Mults, | ||
const Standard_Integer | FirstPoint, | ||
const Standard_Integer | LastPoint, | ||
const AppParCurves_Constraint | FirstCons, | ||
const AppParCurves_Constraint | LastCons, | ||
const Standard_Integer | NbPol | ||
) |
Initializes the fields of the object.
|
protected |
Affects the fields in the case of a constraint point.
AppParCurves_MultiCurve BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox::BezierValue | ( | ) |
returns the result of the approximation, i.e. all the Curves. An exception is raised if NotDone.
const AppParCurves_MultiBSpCurve & BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox::BSplineValue | ( | ) |
returns the result of the approximation, i.e. all the Curves. An exception is raised if NotDone.
|
protected |
const math_Matrix & BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox::DerivativeFunctionMatrix | ( | ) | const |
returns the derivative function matrix used to approximate the set.
const math_Matrix & BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox::Distance | ( | ) |
returns the distances between the points of the multiline and the approximation curves.
void BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox::Error | ( | Standard_Real & | F, |
Standard_Real & | MaxE3d, | ||
Standard_Real & | MaxE2d | ||
) |
returns the maximum errors between the MultiLine and the approximation curves. F is the sum of the square distances.
void BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox::ErrorGradient | ( | math_Vector & | Grad, |
Standard_Real & | F, | ||
Standard_Real & | MaxE3d, | ||
Standard_Real & | 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.
Standard_Real BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox::FirstLambda | ( | ) | const |
returns the value (P2 - P1)/ V1 if the first point was a tangency point.
const math_Matrix & BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox::FunctionMatrix | ( | ) | const |
returns the function matrix used to approximate the set.
|
protected |
is used by the constructors above.
Standard_Boolean BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox::IsDone | ( | ) | const |
returns True if all has been correctly done.
const math_IntegerVector & BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox::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.
Standard_Real BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox::LastLambda | ( | ) | const |
returns the value (PN - PN-1)/ VN if the last point was a tangency point.
|
protected |
computes internal matrixes for the resolution
|
protected |
computes internal matrixes for the resolution
|
protected |
computes internal matrixes for the resolution
|
protected |
returns the number of second member columns. Is used internally to initialize the fields.
void BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox::Perform | ( | const math_Vector & | Parameters | ) |
Is used after having initialized the fields. The case "CurvaturePoint" is not treated in this method.
void BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox::Perform | ( | const math_Vector & | Parameters, |
const math_Vector & | V1t, | ||
const math_Vector & | V2t, | ||
const math_Vector & | V1c, | ||
const math_Vector & | V2c, | ||
const Standard_Real | l1, | ||
const Standard_Real | 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.
void BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox::Perform | ( | const math_Vector & | Parameters, |
const math_Vector & | V1t, | ||
const math_Vector & | V2t, | ||
const Standard_Real | l1, | ||
const Standard_Real | 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 BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox::Perform | ( | const math_Vector & | Parameters, |
const Standard_Real | l1, | ||
const Standard_Real | l2 | ||
) |
Is used after having initialized the fields.
const math_Matrix & BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox::Points | ( | ) | const |
returns the matrix of points value.
const math_Matrix & BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox::Poles | ( | ) | const |
returns the matrix of resulting control points value.
|
protected |
|
protected |
returns the first point being fitted.
|
protected |
returns the last point being fitted.