1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0026595: Lost some comments in OCCT-code after cdl elimination

Recovered comments for instance classes from CDL generic classes.
This commit is contained in:
rkv
2015-10-14 17:48:41 +03:00
committed by bugmaster
parent 10dbdf3496
commit 36b9ff756a
251 changed files with 8209 additions and 0 deletions

View File

@@ -51,30 +51,59 @@ public:
DEFINE_STANDARD_ALLOC
//! initializes the fields of the function. The approximating
//! curve has <NbPol> control points.
Standard_EXPORT GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const math_Vector& Parameters, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer NbPol);
//! returns the number of variables of the function. It
//! corresponds to the number of MultiPoints.
Standard_EXPORT Standard_Integer NbVariables() const;
//! this method computes the new approximation of the
//! MultiLine
//! SSP and calculates F = sum (||Pui - Bi*Pi||2) for each
//! point of the MultiLine.
Standard_EXPORT Standard_Boolean Value (const math_Vector& X, Standard_Real& F);
//! returns the gradient G of the sum above for the
//! parameters Xi.
Standard_EXPORT Standard_Boolean Gradient (const math_Vector& X, math_Vector& G);
//! returns the value F=sum(||Pui - Bi*Pi||)2.
//! returns the value G = grad(F) for the parameters Xi.
Standard_EXPORT Standard_Boolean Values (const math_Vector& X, Standard_Real& F, math_Vector& G);
//! returns the new parameters of the MultiLine.
Standard_EXPORT const math_Vector& NewParameters() const;
//! returns the MultiBSpCurve approximating the set after
//! computing the value F or Grad(F).
Standard_EXPORT AppParCurves_MultiBSpCurve CurveValue();
//! returns the distance between the MultiPoint of range
//! IPoint and the curve CurveIndex.
Standard_EXPORT Standard_Real Error (const Standard_Integer IPoint, const Standard_Integer CurveIndex);
//! returns the maximum distance between the points
//! and the MultiBSpCurve.
Standard_EXPORT Standard_Real MaxError3d() const;
//! returns the maximum distance between the points
//! and the MultiBSpCurve.
Standard_EXPORT Standard_Real MaxError2d() const;
//! returns the function matrix used to approximate the
//! multiline.
Standard_EXPORT const math_Matrix& FunctionMatrix() const;
//! returns the derivative function matrix used to approximate the
//! multiline.
Standard_EXPORT const math_Matrix& DerivativeFunctionMatrix() 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_EXPORT const math_IntegerVector& Index() const;
Standard_EXPORT AppParCurves_Constraint FirstConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer FirstPoint) const;
@@ -91,6 +120,8 @@ public:
protected:
//! this method is used each time Value or Gradient is
//! needed.
Standard_EXPORT void Perform (const math_Vector& X);

View File

@@ -52,46 +52,120 @@ public:
DEFINE_STANDARD_ALLOC
//! 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).
Standard_EXPORT GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& 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);
//! Initializes the fields of the object.
Standard_EXPORT GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, 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).
Standard_EXPORT GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& 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);
//! Initializes the fields of the object.
Standard_EXPORT GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& 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);
//! Is used after having initialized the fields.
//! The case "CurvaturePoint" is not treated in this method.
Standard_EXPORT void Perform (const math_Vector& Parameters);
//! Is used after having initialized the fields.
Standard_EXPORT void Perform (const math_Vector& Parameters, 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.
Standard_EXPORT 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.
//! <V1c> is the tangent vector at the first point.
//! <V2c> is the tangent vector at the last point.
Standard_EXPORT 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);
//! returns True if all has been correctly done.
Standard_EXPORT Standard_Boolean IsDone() const;
//! returns the result of the approximation, i.e. all the
//! Curves.
//! An exception is raised if NotDone.
Standard_EXPORT AppParCurves_MultiCurve BezierValue();
//! returns the result of the approximation, i.e. all the
//! Curves.
//! An exception is raised if NotDone.
Standard_EXPORT const AppParCurves_MultiBSpCurve& BSplineValue();
//! returns the function matrix used to approximate the
//! set.
Standard_EXPORT const math_Matrix& FunctionMatrix() const;
//! returns the derivative function matrix used
//! to approximate the set.
Standard_EXPORT const math_Matrix& DerivativeFunctionMatrix() const;
//! 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_EXPORT void ErrorGradient (math_Vector& Grad, Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d);
//! returns the distances between the points of the
//! multiline and the approximation curves.
Standard_EXPORT const math_Matrix& Distance();
//! returns the maximum errors between the MultiLine
//! and the approximation curves. F is the sum of the square
//! distances.
Standard_EXPORT void Error (Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d);
//! returns the value (P2 - P1)/ V1 if the first point
//! was a tangency point.
Standard_EXPORT Standard_Real FirstLambda() const;
//! returns the value (PN - PN-1)/ VN if the last point
//! was a tangency point.
Standard_EXPORT Standard_Real LastLambda() const;
//! returns the matrix of points value.
Standard_EXPORT const math_Matrix& Points() const;
//! returns the matrix of resulting control points value.
Standard_EXPORT const math_Matrix& Poles() 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_EXPORT const math_IntegerVector& KIndex() const;
@@ -100,24 +174,33 @@ public:
protected:
//! is used by the constuctors above.
Standard_EXPORT void Init (const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint);
//! returns the number of second member columns.
//! Is used internally to initialize the fields.
Standard_EXPORT Standard_Integer NbBColumns (const GeomInt_TheMultiLineOfWLApprox& SSP) const;
//! returns the first point beeing fitted.
Standard_EXPORT Standard_Integer TheFirstPoint (const AppParCurves_Constraint FirstCons, const Standard_Integer FirstPoint) const;
//! returns the last point beeing fitted.
Standard_EXPORT Standard_Integer TheLastPoint (const AppParCurves_Constraint LastCons, const Standard_Integer LastPoint) const;
//! Affects the fields in the case of a constraint point.
Standard_EXPORT void Affect (const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer Index, AppParCurves_Constraint& Cons, math_Vector& Vt, math_Vector& Vc);
Standard_EXPORT void ComputeFunction (const math_Vector& Parameters);
Standard_EXPORT void SearchIndex (math_IntegerVector& Index);
//! computes internal matrixes for the resolution
Standard_EXPORT void MakeTAA (math_Vector& TheA, math_Vector& TheB);
//! computes internal matrixes for the resolution
Standard_EXPORT void MakeTAA (math_Vector& TheA);
//! computes internal matrixes for the resolution
Standard_EXPORT void MakeTAA (math_Vector& TheA, math_Matrix& TheB);

View File

@@ -47,20 +47,45 @@ public:
DEFINE_STANDARD_ALLOC
//! Tries to minimize the sum (square(||Qui - Bi*Pi||))
//! where Pui describe the approximating BSpline curves'Poles
//! and Qi the MultiLine points with a parameter ui.
//! In this algorithm, the parameters ui are the unknowns.
//! The tolerance required on this sum is given by Tol.
//! The desired degree of the resulting curve is Deg.
Standard_EXPORT GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, math_Vector& Parameters, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer Deg, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIterations = 1);
//! Tries to minimize the sum (square(||Qui - Bi*Pi||))
//! where Pui describe the approximating BSpline curves'Poles
//! and Qi the MultiLine points with a parameter ui.
//! In this algorithm, the parameters ui are the unknowns.
//! The tolerance required on this sum is given by Tol.
//! The desired degree of the resulting curve is Deg.
Standard_EXPORT GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, math_Vector& Parameters, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer Deg, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIterations, const Standard_Real lambda1, const Standard_Real lambda2);
//! returns True if all has been correctly done.
Standard_EXPORT Standard_Boolean IsDone() const;
//! returns all the BSpline curves approximating the
//! MultiLine SSP after minimization of the parameter.
Standard_EXPORT AppParCurves_MultiBSpCurve Value() const;
//! returns the difference between the old and the new
//! approximation.
//! An exception is raised if NotDone.
//! An exception is raised if Index<1 or Index>NbParameters.
Standard_EXPORT Standard_Real Error (const Standard_Integer Index) const;
//! returns the maximum difference between the old and the
//! new approximation.
Standard_EXPORT Standard_Real MaxError3d() const;
//! returns the maximum difference between the old and the
//! new approximation.
Standard_EXPORT Standard_Real MaxError2d() const;
//! returns the average error between the old and the
//! new approximation.
Standard_EXPORT Standard_Real AverageError() const;

View File

@@ -46,18 +46,37 @@ public:
DEFINE_STANDARD_ALLOC
//! Tries to minimize the sum (square(||Qui - Bi*Pi||))
//! where Pui describe the approximating Bezier curves'Poles
//! and Qi the MultiLine points with a parameter ui.
//! In this algorithm, the parameters ui are the unknowns.
//! The tolerance required on this sum is given by Tol.
//! The desired degree of the resulting curve is Deg.
Standard_EXPORT GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, math_Vector& Parameters, const Standard_Integer Deg, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIterations = 200);
//! returns True if all has been correctly done.
Standard_EXPORT Standard_Boolean IsDone() const;
//! returns all the Bezier curves approximating the
//! MultiLine SSP after minimization of the parameter.
Standard_EXPORT AppParCurves_MultiCurve Value() const;
//! returns the difference between the old and the new
//! approximation.
//! An exception is raised if NotDone.
//! An exception is raised if Index<1 or Index>NbParameters.
Standard_EXPORT Standard_Real Error (const Standard_Integer Index) const;
//! returns the maximum difference between the old and the
//! new approximation.
Standard_EXPORT Standard_Real MaxError3d() const;
//! returns the maximum difference between the old and the
//! new approximation.
Standard_EXPORT Standard_Real MaxError2d() const;
//! returns the average error between the old and the
//! new approximation.
Standard_EXPORT Standard_Real AverageError() const;

View File

@@ -46,18 +46,37 @@ public:
DEFINE_STANDARD_ALLOC
//! Tries to minimize the sum (square(||Qui - Bi*Pi||))
//! where Pui describe the approximating Bezier curves'Poles
//! and Qi the MultiLine points with a parameter ui.
//! In this algorithm, the parameters ui are the unknowns.
//! The tolerance required on this sum is given by Tol.
//! The desired degree of the resulting curve is Deg.
Standard_EXPORT GeomInt_MyGradientbisOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, math_Vector& Parameters, const Standard_Integer Deg, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIterations = 200);
//! returns True if all has been correctly done.
Standard_EXPORT Standard_Boolean IsDone() const;
//! returns all the Bezier curves approximating the
//! MultiLine SSP after minimization of the parameter.
Standard_EXPORT AppParCurves_MultiCurve Value() const;
//! returns the difference between the old and the new
//! approximation.
//! An exception is raised if NotDone.
//! An exception is raised if Index<1 or Index>NbParameters.
Standard_EXPORT Standard_Real Error (const Standard_Integer Index) const;
//! returns the maximum difference between the old and the
//! new approximation.
Standard_EXPORT Standard_Real MaxError3d() const;
//! returns the maximum difference between the old and the
//! new approximation.
Standard_EXPORT Standard_Real MaxError2d() const;
//! returns the average error between the old and the
//! new approximation.
Standard_EXPORT Standard_Real AverageError() const;

View File

@@ -48,24 +48,45 @@ public:
DEFINE_STANDARD_ALLOC
//! initializes the fields of the function. The approximating
//! curve has the desired degree Deg.
Standard_EXPORT GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const math_Vector& Parameters, const Standard_Integer Deg);
//! returns the number of variables of the function. It
//! corresponds to the number of MultiPoints.
Standard_EXPORT Standard_Integer NbVariables() const;
//! this method computes the new approximation of the
//! MultiLine
//! SSP and calculates F = sum (||Pui - Bi*Pi||2) for each
//! point of the MultiLine.
Standard_EXPORT Standard_Boolean Value (const math_Vector& X, Standard_Real& F);
//! returns the gradient G of the sum above for the
//! parameters Xi.
Standard_EXPORT Standard_Boolean Gradient (const math_Vector& X, math_Vector& G);
//! returns the value F=sum(||Pui - Bi*Pi||)2.
//! returns the value G = grad(F) for the parameters Xi.
Standard_EXPORT Standard_Boolean Values (const math_Vector& X, Standard_Real& F, math_Vector& G);
//! returns the new parameters of the MultiLine.
Standard_EXPORT const math_Vector& NewParameters() const;
//! returns the MultiCurve approximating the set after
//! computing the value F or Grad(F).
Standard_EXPORT const AppParCurves_MultiCurve& CurveValue();
//! returns the distance between the MultiPoint of range
//! IPoint and the curve CurveIndex.
Standard_EXPORT Standard_Real Error (const Standard_Integer IPoint, const Standard_Integer CurveIndex) const;
//! returns the maximum distance between the points
//! and the MultiCurve.
Standard_EXPORT Standard_Real MaxError3d() const;
//! returns the maximum distance between the points
//! and the MultiCurve.
Standard_EXPORT Standard_Real MaxError2d() const;
Standard_EXPORT AppParCurves_Constraint FirstConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer FirstPoint) const;
@@ -78,6 +99,8 @@ public:
protected:
//! this method is used each time Value or Gradient is
//! needed.
Standard_EXPORT void Perform (const math_Vector& X);

View File

@@ -48,24 +48,45 @@ public:
DEFINE_STANDARD_ALLOC
//! initializes the fields of the function. The approximating
//! curve has the desired degree Deg.
Standard_EXPORT GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const math_Vector& Parameters, const Standard_Integer Deg);
//! returns the number of variables of the function. It
//! corresponds to the number of MultiPoints.
Standard_EXPORT Standard_Integer NbVariables() const;
//! this method computes the new approximation of the
//! MultiLine
//! SSP and calculates F = sum (||Pui - Bi*Pi||2) for each
//! point of the MultiLine.
Standard_EXPORT Standard_Boolean Value (const math_Vector& X, Standard_Real& F);
//! returns the gradient G of the sum above for the
//! parameters Xi.
Standard_EXPORT Standard_Boolean Gradient (const math_Vector& X, math_Vector& G);
//! returns the value F=sum(||Pui - Bi*Pi||)2.
//! returns the value G = grad(F) for the parameters Xi.
Standard_EXPORT Standard_Boolean Values (const math_Vector& X, Standard_Real& F, math_Vector& G);
//! returns the new parameters of the MultiLine.
Standard_EXPORT const math_Vector& NewParameters() const;
//! returns the MultiCurve approximating the set after
//! computing the value F or Grad(F).
Standard_EXPORT const AppParCurves_MultiCurve& CurveValue();
//! returns the distance between the MultiPoint of range
//! IPoint and the curve CurveIndex.
Standard_EXPORT Standard_Real Error (const Standard_Integer IPoint, const Standard_Integer CurveIndex) const;
//! returns the maximum distance between the points
//! and the MultiCurve.
Standard_EXPORT Standard_Real MaxError3d() const;
//! returns the maximum distance between the points
//! and the MultiCurve.
Standard_EXPORT Standard_Real MaxError2d() const;
Standard_EXPORT AppParCurves_Constraint FirstConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer FirstPoint) const;
@@ -78,6 +99,8 @@ public:
protected:
//! this method is used each time Value or Gradient is
//! needed.
Standard_EXPORT void Perform (const math_Vector& X);

View File

@@ -52,46 +52,120 @@ public:
DEFINE_STANDARD_ALLOC
//! 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).
Standard_EXPORT GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& 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);
//! Initializes the fields of the object.
Standard_EXPORT GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, 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).
Standard_EXPORT GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& 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);
//! Initializes the fields of the object.
Standard_EXPORT GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& 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);
//! Is used after having initialized the fields.
//! The case "CurvaturePoint" is not treated in this method.
Standard_EXPORT void Perform (const math_Vector& Parameters);
//! Is used after having initialized the fields.
Standard_EXPORT void Perform (const math_Vector& Parameters, 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.
Standard_EXPORT 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.
//! <V1c> is the tangent vector at the first point.
//! <V2c> is the tangent vector at the last point.
Standard_EXPORT 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);
//! returns True if all has been correctly done.
Standard_EXPORT Standard_Boolean IsDone() const;
//! returns the result of the approximation, i.e. all the
//! Curves.
//! An exception is raised if NotDone.
Standard_EXPORT AppParCurves_MultiCurve BezierValue();
//! returns the result of the approximation, i.e. all the
//! Curves.
//! An exception is raised if NotDone.
Standard_EXPORT const AppParCurves_MultiBSpCurve& BSplineValue();
//! returns the function matrix used to approximate the
//! set.
Standard_EXPORT const math_Matrix& FunctionMatrix() const;
//! returns the derivative function matrix used
//! to approximate the set.
Standard_EXPORT const math_Matrix& DerivativeFunctionMatrix() const;
//! 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_EXPORT void ErrorGradient (math_Vector& Grad, Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d);
//! returns the distances between the points of the
//! multiline and the approximation curves.
Standard_EXPORT const math_Matrix& Distance();
//! returns the maximum errors between the MultiLine
//! and the approximation curves. F is the sum of the square
//! distances.
Standard_EXPORT void Error (Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d);
//! returns the value (P2 - P1)/ V1 if the first point
//! was a tangency point.
Standard_EXPORT Standard_Real FirstLambda() const;
//! returns the value (PN - PN-1)/ VN if the last point
//! was a tangency point.
Standard_EXPORT Standard_Real LastLambda() const;
//! returns the matrix of points value.
Standard_EXPORT const math_Matrix& Points() const;
//! returns the matrix of resulting control points value.
Standard_EXPORT const math_Matrix& Poles() 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_EXPORT const math_IntegerVector& KIndex() const;
@@ -100,24 +174,33 @@ public:
protected:
//! is used by the constuctors above.
Standard_EXPORT void Init (const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint);
//! returns the number of second member columns.
//! Is used internally to initialize the fields.
Standard_EXPORT Standard_Integer NbBColumns (const GeomInt_TheMultiLineOfWLApprox& SSP) const;
//! returns the first point beeing fitted.
Standard_EXPORT Standard_Integer TheFirstPoint (const AppParCurves_Constraint FirstCons, const Standard_Integer FirstPoint) const;
//! returns the last point beeing fitted.
Standard_EXPORT Standard_Integer TheLastPoint (const AppParCurves_Constraint LastCons, const Standard_Integer LastPoint) const;
//! Affects the fields in the case of a constraint point.
Standard_EXPORT void Affect (const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer Index, AppParCurves_Constraint& Cons, math_Vector& Vt, math_Vector& Vc);
Standard_EXPORT void ComputeFunction (const math_Vector& Parameters);
Standard_EXPORT void SearchIndex (math_IntegerVector& Index);
//! computes internal matrixes for the resolution
Standard_EXPORT void MakeTAA (math_Vector& TheA, math_Vector& TheB);
//! computes internal matrixes for the resolution
Standard_EXPORT void MakeTAA (math_Vector& TheA);
//! computes internal matrixes for the resolution
Standard_EXPORT void MakeTAA (math_Vector& TheA, math_Matrix& TheB);

View File

@@ -52,46 +52,120 @@ public:
DEFINE_STANDARD_ALLOC
//! 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).
Standard_EXPORT GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& 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);
//! Initializes the fields of the object.
Standard_EXPORT GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const AppParCurves_Constraint FirstCons, const AppParCurves_Constraint LastCons, 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).
Standard_EXPORT GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& 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);
//! Initializes the fields of the object.
Standard_EXPORT GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& 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);
//! Is used after having initialized the fields.
//! The case "CurvaturePoint" is not treated in this method.
Standard_EXPORT void Perform (const math_Vector& Parameters);
//! Is used after having initialized the fields.
Standard_EXPORT void Perform (const math_Vector& Parameters, 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.
Standard_EXPORT 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.
//! <V1c> is the tangent vector at the first point.
//! <V2c> is the tangent vector at the last point.
Standard_EXPORT 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);
//! returns True if all has been correctly done.
Standard_EXPORT Standard_Boolean IsDone() const;
//! returns the result of the approximation, i.e. all the
//! Curves.
//! An exception is raised if NotDone.
Standard_EXPORT AppParCurves_MultiCurve BezierValue();
//! returns the result of the approximation, i.e. all the
//! Curves.
//! An exception is raised if NotDone.
Standard_EXPORT const AppParCurves_MultiBSpCurve& BSplineValue();
//! returns the function matrix used to approximate the
//! set.
Standard_EXPORT const math_Matrix& FunctionMatrix() const;
//! returns the derivative function matrix used
//! to approximate the set.
Standard_EXPORT const math_Matrix& DerivativeFunctionMatrix() const;
//! 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_EXPORT void ErrorGradient (math_Vector& Grad, Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d);
//! returns the distances between the points of the
//! multiline and the approximation curves.
Standard_EXPORT const math_Matrix& Distance();
//! returns the maximum errors between the MultiLine
//! and the approximation curves. F is the sum of the square
//! distances.
Standard_EXPORT void Error (Standard_Real& F, Standard_Real& MaxE3d, Standard_Real& MaxE2d);
//! returns the value (P2 - P1)/ V1 if the first point
//! was a tangency point.
Standard_EXPORT Standard_Real FirstLambda() const;
//! returns the value (PN - PN-1)/ VN if the last point
//! was a tangency point.
Standard_EXPORT Standard_Real LastLambda() const;
//! returns the matrix of points value.
Standard_EXPORT const math_Matrix& Points() const;
//! returns the matrix of resulting control points value.
Standard_EXPORT const math_Matrix& Poles() 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_EXPORT const math_IntegerVector& KIndex() const;
@@ -100,24 +174,33 @@ public:
protected:
//! is used by the constuctors above.
Standard_EXPORT void Init (const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint);
//! returns the number of second member columns.
//! Is used internally to initialize the fields.
Standard_EXPORT Standard_Integer NbBColumns (const GeomInt_TheMultiLineOfWLApprox& SSP) const;
//! returns the first point beeing fitted.
Standard_EXPORT Standard_Integer TheFirstPoint (const AppParCurves_Constraint FirstCons, const Standard_Integer FirstPoint) const;
//! returns the last point beeing fitted.
Standard_EXPORT Standard_Integer TheLastPoint (const AppParCurves_Constraint LastCons, const Standard_Integer LastPoint) const;
//! Affects the fields in the case of a constraint point.
Standard_EXPORT void Affect (const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer Index, AppParCurves_Constraint& Cons, math_Vector& Vt, math_Vector& Vc);
Standard_EXPORT void ComputeFunction (const math_Vector& Parameters);
Standard_EXPORT void SearchIndex (math_IntegerVector& Index);
//! computes internal matrixes for the resolution
Standard_EXPORT void MakeTAA (math_Vector& TheA, math_Vector& TheB);
//! computes internal matrixes for the resolution
Standard_EXPORT void MakeTAA (math_Vector& TheA);
//! computes internal matrixes for the resolution
Standard_EXPORT void MakeTAA (math_Vector& TheA, math_Matrix& TheB);

View File

@@ -43,18 +43,35 @@ public:
DEFINE_STANDARD_ALLOC
//! Given a MultiLine SSP with constraints points, this
//! algorithm finds the best curve solution to approximate it.
//! The poles from SCurv issued for example from the least
//! squares are used as a guess solution for the uzawa
//! algorithm. The tolerance used in the Uzawa algorithms
//! is Tolerance.
//! A is the Bernstein matrix associated to the MultiLine
//! and DA is the derivative bernstein matrix.(They can come
//! from an approximation with ParLeastSquare.)
//! The MultiCurve is modified. New MultiPoles are given.
Standard_EXPORT GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, AppParCurves_MultiCurve& SCurv, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& Constraints, const math_Matrix& Bern, const math_Matrix& DerivativeBern, const Standard_Real Tolerance = 1.0e-10);
//! returns True if all has been correctly done.
Standard_EXPORT Standard_Boolean IsDone() const;
//! returns the maximum difference value between the curve
//! and the given points.
Standard_EXPORT Standard_Real Error() const;
Standard_EXPORT const math_Matrix& ConstraintMatrix() const;
//! returns the duale variables of the system.
Standard_EXPORT const math_Vector& Duale() const;
//! Returns the derivative of the constraint matrix.
Standard_EXPORT const math_Matrix& ConstraintDerivative (const GeomInt_TheMultiLineOfWLApprox& SSP, const math_Vector& Parameters, const Standard_Integer Deg, const math_Matrix& DA);
//! returns the Inverse of Cont*Transposed(Cont), where
//! Cont is the constraint matrix for the algorithm.
Standard_EXPORT const math_Matrix& InverseMatrix() const;
@@ -63,8 +80,10 @@ public:
protected:
//! is used internally to create the fields.
Standard_EXPORT Standard_Integer NbConstraints (const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints) const;
//! is internally used for the fields creation.
Standard_EXPORT Standard_Integer NbColumns (const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer Deg) const;

View File

@@ -43,18 +43,35 @@ public:
DEFINE_STANDARD_ALLOC
//! Given a MultiLine SSP with constraints points, this
//! algorithm finds the best curve solution to approximate it.
//! The poles from SCurv issued for example from the least
//! squares are used as a guess solution for the uzawa
//! algorithm. The tolerance used in the Uzawa algorithms
//! is Tolerance.
//! A is the Bernstein matrix associated to the MultiLine
//! and DA is the derivative bernstein matrix.(They can come
//! from an approximation with ParLeastSquare.)
//! The MultiCurve is modified. New MultiPoles are given.
Standard_EXPORT GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, AppParCurves_MultiCurve& SCurv, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& Constraints, const math_Matrix& Bern, const math_Matrix& DerivativeBern, const Standard_Real Tolerance = 1.0e-10);
//! returns True if all has been correctly done.
Standard_EXPORT Standard_Boolean IsDone() const;
//! returns the maximum difference value between the curve
//! and the given points.
Standard_EXPORT Standard_Real Error() const;
Standard_EXPORT const math_Matrix& ConstraintMatrix() const;
//! returns the duale variables of the system.
Standard_EXPORT const math_Vector& Duale() const;
//! Returns the derivative of the constraint matrix.
Standard_EXPORT const math_Matrix& ConstraintDerivative (const GeomInt_TheMultiLineOfWLApprox& SSP, const math_Vector& Parameters, const Standard_Integer Deg, const math_Matrix& DA);
//! returns the Inverse of Cont*Transposed(Cont), where
//! Cont is the constraint matrix for the algorithm.
Standard_EXPORT const math_Matrix& InverseMatrix() const;
@@ -63,8 +80,10 @@ public:
protected:
//! is used internally to create the fields.
Standard_EXPORT Standard_Integer NbConstraints (const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints) const;
//! is internally used for the fields creation.
Standard_EXPORT Standard_Integer NbColumns (const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer Deg) const;

View File

@@ -54,40 +54,72 @@ public:
DEFINE_STANDARD_ALLOC
//! The MultiLine <Line> will be approximated until tolerances
//! will be reached.
//! The approximation will be done from degreemin to degreemax
//! with a cutting if the corresponding boolean is True.
//! If <Squares> is True, the computation will be done with
//! no iteration at all.
Standard_EXPORT GeomInt_TheComputeLineBezierOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& Line, const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-3, const Standard_Real Tolerance2d = 1.0e-6, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Approx_ParametrizationType parametrization = Approx_ChordLength, const Standard_Boolean Squares = Standard_False);
//! The MultiLine <Line> will be approximated until tolerances
//! will be reached.
//! The approximation will be done from degreemin to degreemax
//! with a cutting if the corresponding boolean is True.
//! If <Squares> is True, the computation will be done with
//! no iteration at all.
Standard_EXPORT GeomInt_TheComputeLineBezierOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& Line, const math_Vector& Parameters, const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Standard_Boolean Squares = Standard_False);
//! Initializes the fields of the algorithm.
Standard_EXPORT GeomInt_TheComputeLineBezierOfWLApprox(const math_Vector& Parameters, const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Standard_Boolean Squares = Standard_False);
//! Initializes the fields of the algorithm.
Standard_EXPORT GeomInt_TheComputeLineBezierOfWLApprox(const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Approx_ParametrizationType parametrization = Approx_ChordLength, const Standard_Boolean Squares = Standard_False);
//! Initializes the fields of the algorithm.
Standard_EXPORT void Init (const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Approx_ParametrizationType parametrization = Approx_ChordLength, const Standard_Boolean Squares = Standard_False);
//! runs the algorithm after having initialized the fields.
Standard_EXPORT void Perform (const GeomInt_TheMultiLineOfWLApprox& Line);
//! changes the degrees of the approximation.
Standard_EXPORT void SetDegrees (const Standard_Integer degreemin, const Standard_Integer degreemax);
//! Changes the tolerances of the approximation.
Standard_EXPORT void SetTolerances (const Standard_Real Tolerance3d, const Standard_Real Tolerance2d);
//! changes the first and the last constraint points.
Standard_EXPORT void SetConstraints (const AppParCurves_Constraint firstC, const AppParCurves_Constraint lastC);
//! returns False if at a moment of the approximation,
//! the status NoApproximation has been sent by the user
//! when more points were needed.
Standard_EXPORT Standard_Boolean IsAllApproximated() const;
//! returns False if the status NoPointsAdded has been sent.
Standard_EXPORT Standard_Boolean IsToleranceReached() const;
//! returns the tolerances 2d and 3d of the <Index> MultiCurve.
Standard_EXPORT void Error (const Standard_Integer Index, Standard_Real& tol3d, Standard_Real& tol2d) const;
//! Returns the number of MultiCurve doing the approximation
//! of the MultiLine.
Standard_EXPORT Standard_Integer NbMultiCurves() const;
//! returns the result of the approximation.
Standard_EXPORT const AppParCurves_MultiCurve& Value (const Standard_Integer Index = 1) const;
//! returns the result of the approximation.
Standard_EXPORT AppParCurves_MultiCurve& ChangeValue (const Standard_Integer Index = 1);
//! returns the result of the approximation.
Standard_EXPORT const AppParCurves_MultiBSpCurve& SplineValue();
//! returns the type of parametrization
Standard_EXPORT void Parametrization (Approx_ParametrizationType& partype) const;
//! returns the new parameters of the approximation
//! corresponding to the points of the multicurve <Index>.
Standard_EXPORT const TColStd_Array1OfReal& Parameters (const Standard_Integer Index = 1) const;
@@ -102,10 +134,13 @@ protected:
private:
//! is internally used in the algorithm.
Standard_EXPORT Standard_Boolean Compute (const GeomInt_TheMultiLineOfWLApprox& Line, const Standard_Integer fpt, const Standard_Integer lpt, math_Vector& Para, Standard_Real& TheTol3d, Standard_Real& TheTol2d);
//! is internally used in the algorithm.
Standard_EXPORT Standard_Boolean ComputeCurve (const GeomInt_TheMultiLineOfWLApprox& Line, const Standard_Integer firspt, const Standard_Integer lastpt);
//! computes new parameters between firstP and lastP.
Standard_EXPORT void Parameters (const GeomInt_TheMultiLineOfWLApprox& Line, const Standard_Integer firstP, const Standard_Integer LastP, math_Vector& TheParameters) const;
Standard_EXPORT Standard_Real SearchFirstLambda (const GeomInt_TheMultiLineOfWLApprox& Line, const math_Vector& Para, const math_Vector& V, const Standard_Integer index) const;

View File

@@ -56,44 +56,86 @@ public:
DEFINE_STANDARD_ALLOC
//! The MultiLine <Line> will be approximated until tolerances
//! will be reached.
//! The approximation will be done from degreemin to degreemax
//! with a cutting if the corresponding boolean is True.
//! If <Squares> is True, the computation will be done with
//! no iteration at all.
//!
//! The multiplicities of the internal knots is set by
//! default.
Standard_EXPORT GeomInt_TheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& Line, const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-3, const Standard_Real Tolerance2d = 1.0e-6, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Approx_ParametrizationType parametrization = Approx_ChordLength, const Standard_Boolean Squares = Standard_False);
//! The MultiLine <Line> will be approximated until tolerances
//! will be reached.
//! The approximation will be done from degreemin to degreemax
//! with a cutting if the corresponding boolean is True.
//! If <Squares> is True, the computation will be done with
//! no iteration at all.
Standard_EXPORT GeomInt_TheComputeLineOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& Line, const math_Vector& Parameters, const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Standard_Boolean Squares = Standard_False);
//! Initializes the fields of the algorithm.
Standard_EXPORT GeomInt_TheComputeLineOfWLApprox(const math_Vector& Parameters, const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Standard_Boolean Squares = Standard_False);
//! Initializes the fields of the algorithm.
Standard_EXPORT GeomInt_TheComputeLineOfWLApprox(const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Approx_ParametrizationType parametrization = Approx_ChordLength, const Standard_Boolean Squares = Standard_False);
//! Constructs an interpolation of the MultiLine <Line>
//! The result will be a C2 curve of degree 3.
Standard_EXPORT void Interpol (const GeomInt_TheMultiLineOfWLApprox& Line);
//! Initializes the fields of the algorithm.
Standard_EXPORT void Init (const Standard_Integer degreemin = 4, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-03, const Standard_Real Tolerance2d = 1.0e-06, const Standard_Integer NbIterations = 5, const Standard_Boolean cutting = Standard_True, const Approx_ParametrizationType parametrization = Approx_ChordLength, const Standard_Boolean Squares = Standard_False);
//! runs the algorithm after having initialized the fields.
Standard_EXPORT void Perform (const GeomInt_TheMultiLineOfWLApprox& Line);
//! The approximation will begin with the
//! set of parameters <ThePar>.
Standard_EXPORT void SetParameters (const math_Vector& ThePar);
//! The approximation will be done with the
//! set of knots <Knots>. The multiplicities will be set
//! with the degree and the desired continuity.
Standard_EXPORT void SetKnots (const TColStd_Array1OfReal& Knots);
//! The approximation will be done with the
//! set of knots <Knots> and the multiplicities <Mults>.
Standard_EXPORT void SetKnotsAndMultiplicities (const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults);
//! changes the degrees of the approximation.
Standard_EXPORT void SetDegrees (const Standard_Integer degreemin, const Standard_Integer degreemax);
//! Changes the tolerances of the approximation.
Standard_EXPORT void SetTolerances (const Standard_Real Tolerance3d, const Standard_Real Tolerance2d);
//! sets the continuity of the spline.
//! if C = 2, the spline will be C2.
Standard_EXPORT void SetContinuity (const Standard_Integer C);
//! changes the first and the last constraint points.
Standard_EXPORT void SetConstraints (const AppParCurves_Constraint firstC, const AppParCurves_Constraint lastC);
//! returns False if at a moment of the approximation,
//! the status NoApproximation has been sent by the user
//! when more points were needed.
Standard_EXPORT Standard_Boolean IsAllApproximated() const;
//! returns False if the status NoPointsAdded has been sent.
Standard_EXPORT Standard_Boolean IsToleranceReached() const;
//! returns the tolerances 2d and 3d of the MultiBSpCurve.
Standard_EXPORT void Error (Standard_Real& tol3d, Standard_Real& tol2d) const;
//! returns the result of the approximation.
Standard_EXPORT const AppParCurves_MultiBSpCurve& Value() const;
//! returns the result of the approximation.
Standard_EXPORT AppParCurves_MultiBSpCurve& ChangeValue();
//! returns the new parameters of the approximation
//! corresponding to the points of the MultiBSpCurve.
Standard_EXPORT const TColStd_Array1OfReal& Parameters() const;
@@ -108,10 +150,13 @@ protected:
private:
//! is internally used in the algorithm.
Standard_EXPORT Standard_Boolean Compute (const GeomInt_TheMultiLineOfWLApprox& Line, const Standard_Integer fpt, const Standard_Integer lpt, math_Vector& Para, const TColStd_Array1OfReal& Knots, TColStd_Array1OfInteger& Mults);
//! is internally used in the algorithm.
Standard_EXPORT Standard_Boolean ComputeCurve (const GeomInt_TheMultiLineOfWLApprox& Line, const Standard_Integer firspt, const Standard_Integer lastpt);
//! computes new parameters between firstP and lastP.
Standard_EXPORT void Parameters (const GeomInt_TheMultiLineOfWLApprox& Line, const Standard_Integer firstP, const Standard_Integer LastP, math_Vector& TheParameters) const;
Standard_EXPORT Standard_Real SearchFirstLambda (const GeomInt_TheMultiLineOfWLApprox& Line, const math_Vector& Para, const TColStd_Array1OfReal& Knots, const math_Vector& V, const Standard_Integer index) const;

View File

@@ -48,6 +48,7 @@ public:
DEFINE_STANDARD_ALLOC
//! Raises Construction Error
Standard_EXPORT GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox();
Standard_EXPORT GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2);
@@ -64,6 +65,7 @@ public:
Standard_EXPORT void ComputeParameters (const IntImp_ConstIsoparametric ChoixIso, const TColStd_Array1OfReal& Param, math_Vector& UVap, math_Vector& BornInf, math_Vector& BornSup, math_Vector& Tolerance);
//! returns somme des fi*fi
Standard_Real Root() const;
gp_Pnt Point() const;

View File

@@ -52,6 +52,7 @@ public:
Standard_EXPORT GeomInt_TheImpPrmSvSurfacesOfWLApprox(const IntSurf_Quadric& Surf1, const Handle(Adaptor3d_HSurface)& Surf2);
//! returns True if Tg,Tguv1 Tguv2 can be computed.
Standard_EXPORT Standard_Boolean Compute (Standard_Real& u1, Standard_Real& v1, Standard_Real& u2, Standard_Real& v2, gp_Pnt& Pt, gp_Vec& Tg, gp_Vec2d& Tguv1, gp_Vec2d& Tguv2);
Standard_EXPORT void Pnt (const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Pnt& P);

View File

@@ -50,32 +50,68 @@ public:
DEFINE_STANDARD_ALLOC
//! Raises Construction Error
Standard_EXPORT GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox();
//! compute the solution point with the close point
Standard_EXPORT GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox(const TColStd_Array1OfReal& Param, const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Standard_Real TolTangency);
//! initialize the parameters to compute the solution point
//! it 's possible to write to optimize:
//! IntImp_Int2S inter(S1,S2,Func,TolTangency);
//! math_FunctionSetRoot rsnld(inter.Function());
//! while ...{
//! Param(1)=...
//! Param(2)=...
//! param(3)=...
//! inter.Perform(Param,rsnld);
//! }
Standard_EXPORT GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Standard_Real TolTangency);
//! returns the best constant isoparametric to find
//! the next intersection's point +stores the solution
//! point (the solution point is found with the close point
//! to intersect the isoparametric with the other patch;
//! the choice of the isoparametic is calculated)
Standard_EXPORT IntImp_ConstIsoparametric Perform (const TColStd_Array1OfReal& Param, math_FunctionSetRoot& Rsnld);
//! returns the best constant isoparametric to find
//! the next intersection's point +stores the solution
//! point (the solution point is found with the close point
//! to intersect the isoparametric with the other patch;
//! the choice of the isoparametic is given by ChoixIso)
Standard_EXPORT IntImp_ConstIsoparametric Perform (const TColStd_Array1OfReal& Param, math_FunctionSetRoot& Rsnld, const IntImp_ConstIsoparametric ChoixIso);
//! Returns TRUE if the creation completed without failure.
Standard_Boolean IsDone() const;
//! Returns TRUE when there is no solution to the problem.
Standard_Boolean IsEmpty() const;
//! Returns the intersection point.
const IntSurf_PntOn2S& Point() const;
//! Returns True if the surfaces are tangent at the
//! intersection point.
Standard_Boolean IsTangent() const;
//! Returns the tangent at the intersection line.
const gp_Dir& Direction() const;
//! Returns the tangent at the intersection line in the
//! parametric space of the first surface.
const gp_Dir2d& DirectionOnS1() const;
//! Returns the tangent at the intersection line in the
//! parametric space of the second surface.
const gp_Dir2d& DirectionOnS2() const;
//! return the math function which
//! is used to compute the intersection
GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox& Function();
//! return the intersection point which is
//! enable for changing.
IntSurf_PntOn2S& ChangePoint();

View File

@@ -42,34 +42,59 @@ public:
DEFINE_STANDARD_ALLOC
//! The class SvSurfaces is used when the
//! approximation algorithm needs some extra points on
//! the line <line>. A New line is then created which
//! shares the same surfaces and functions.
//!
//! SvSurfaces is a deferred class which allows
//! several implementations of this algorithm with
//! different surfaces (bi-parametric ones, or
//! implicit and biparametric ones)
Standard_EXPORT GeomInt_TheMultiLineOfWLApprox(const Handle(IntPatch_WLine)& line, const Standard_Address PtrSvSurfaces, const Standard_Integer NbP3d, const Standard_Integer NbP2d, const Standard_Real xo, const Standard_Real ax, const Standard_Real yo, const Standard_Real ay, const Standard_Real zo, const Standard_Real az, const Standard_Real u1o, const Standard_Real a1u, const Standard_Real v1o, const Standard_Real a1v, const Standard_Real u2o, const Standard_Real a2u, const Standard_Real v2o, const Standard_Real a2v, const Standard_Boolean P2DOnFirst, const Standard_Integer IndMin = 0, const Standard_Integer IndMax = 0);
//! No Extra points will be added on the current line
Standard_EXPORT GeomInt_TheMultiLineOfWLApprox(const Handle(IntPatch_WLine)& line, const Standard_Integer NbP3d, const Standard_Integer NbP2d, const Standard_Real xo, const Standard_Real ax, const Standard_Real yo, const Standard_Real ay, const Standard_Real zo, const Standard_Real az, const Standard_Real u1o, const Standard_Real a1u, const Standard_Real v1o, const Standard_Real a1v, const Standard_Real u2o, const Standard_Real a2u, const Standard_Real v2o, const Standard_Real a2v, const Standard_Boolean P2DOnFirst, const Standard_Integer IndMin = 0, const Standard_Integer IndMax = 0);
Standard_EXPORT Standard_Integer FirstPoint() const;
Standard_EXPORT Standard_Integer LastPoint() const;
//! Returns the number of 2d points of a TheLine.
Standard_EXPORT Standard_Integer NbP2d() const;
//! Returns the number of 3d points of a TheLine.
Standard_EXPORT Standard_Integer NbP3d() const;
Standard_EXPORT Approx_Status WhatStatus() const;
//! returns the 3d points of the multipoint <MPointIndex>
//! when only 3d points exist.
Standard_EXPORT void Value (const Standard_Integer MPointIndex, TColgp_Array1OfPnt& tabPt) const;
//! returns the 2d points of the multipoint <MPointIndex>
//! when only 2d points exist.
Standard_EXPORT void Value (const Standard_Integer MPointIndex, TColgp_Array1OfPnt2d& tabPt2d) const;
//! returns the 3d and 2d points of the multipoint
//! <MPointIndex>.
Standard_EXPORT void Value (const Standard_Integer MPointIndex, TColgp_Array1OfPnt& tabPt, TColgp_Array1OfPnt2d& tabPt2d) const;
//! returns the 3d points of the multipoint <MPointIndex>
//! when only 3d points exist.
Standard_EXPORT Standard_Boolean Tangency (const Standard_Integer MPointIndex, TColgp_Array1OfVec& tabV) const;
//! returns the 2d tangency points of the multipoint
//! <MPointIndex> only when 2d points exist.
Standard_EXPORT Standard_Boolean Tangency (const Standard_Integer MPointIndex, TColgp_Array1OfVec2d& tabV2d) const;
//! returns the 3d and 2d points of the multipoint
//! <MPointIndex>.
Standard_EXPORT Standard_Boolean Tangency (const Standard_Integer MPointIndex, TColgp_Array1OfVec& tabV, TColgp_Array1OfVec2d& tabV2d) const;
Standard_EXPORT GeomInt_TheMultiLineOfWLApprox MakeMLBetween (const Standard_Integer Low, const Standard_Integer High, const Standard_Integer NbPointsToInsert) const;
//! Dump of the current multi-line.
Standard_EXPORT void Dump() const;

View File

@@ -41,36 +41,60 @@ public:
DEFINE_STANDARD_ALLOC
//! Returns the number of multipoints of the TheMultiLine.
static Standard_Integer FirstPoint (const GeomInt_TheMultiLineOfWLApprox& ML);
//! Returns the number of multipoints of the TheMultiLine.
static Standard_Integer LastPoint (const GeomInt_TheMultiLineOfWLApprox& ML);
//! Returns the number of 2d points of a TheMultiLine.
static Standard_Integer NbP2d (const GeomInt_TheMultiLineOfWLApprox& ML);
//! Returns the number of 3d points of a TheMultiLine.
static Standard_Integer NbP3d (const GeomInt_TheMultiLineOfWLApprox& ML);
//! returns the 3d points of the multipoint <MPointIndex>
//! when only 3d points exist.
static void Value (const GeomInt_TheMultiLineOfWLApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfPnt& tabPt);
//! returns the 2d points of the multipoint <MPointIndex>
//! when only 2d points exist.
static void Value (const GeomInt_TheMultiLineOfWLApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfPnt2d& tabPt2d);
//! returns the 3d and 2d points of the multipoint
//! <MPointIndex>.
static void Value (const GeomInt_TheMultiLineOfWLApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfPnt& tabPt, TColgp_Array1OfPnt2d& tabPt2d);
//! returns the 3d points of the multipoint <MPointIndex>
//! when only 3d points exist.
static Standard_Boolean Tangency (const GeomInt_TheMultiLineOfWLApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfVec& tabV);
//! returns the 2d tangency points of the multipoint
//! <MPointIndex> only when 2d points exist.
static Standard_Boolean Tangency (const GeomInt_TheMultiLineOfWLApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfVec2d& tabV2d);
//! returns the 3d and 2d points of the multipoint
//! <MPointIndex>.
static Standard_Boolean Tangency (const GeomInt_TheMultiLineOfWLApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfVec& tabV, TColgp_Array1OfVec2d& tabV2d);
//! returns the 3d curvature of the multipoint <MPointIndex>
//! when only 3d points exist.
static Standard_Boolean Curvature (const GeomInt_TheMultiLineOfWLApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfVec& tabV);
//! returns the 2d curvature points of the multipoint
//! <MPointIndex> only when 2d points exist.
static Standard_Boolean Curvature (const GeomInt_TheMultiLineOfWLApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfVec2d& tabV2d);
//! returns the 3d and 2d curvature of the multipoint
//! <MPointIndex>.
static Standard_Boolean Curvature (const GeomInt_TheMultiLineOfWLApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfVec& tabV, TColgp_Array1OfVec2d& tabV2d);
//! Is called if WhatStatus returned "PointsAdded".
static GeomInt_TheMultiLineOfWLApprox MakeMLBetween (const GeomInt_TheMultiLineOfWLApprox& ML, const Standard_Integer I1, const Standard_Integer I2, const Standard_Integer NbPMin);
static Approx_Status WhatStatus (const GeomInt_TheMultiLineOfWLApprox& ML, const Standard_Integer I1, const Standard_Integer I2);
//! Dump of the current multi-line.
Standard_EXPORT static void Dump (const GeomInt_TheMultiLineOfWLApprox& ML);

View File

@@ -49,6 +49,7 @@ public:
Standard_EXPORT GeomInt_ThePrmPrmSvSurfacesOfWLApprox(const Handle(Adaptor3d_HSurface)& Surf1, const Handle(Adaptor3d_HSurface)& Surf2);
//! returns True if Tg,Tguv1 Tguv2 can be computed.
Standard_EXPORT Standard_Boolean Compute (Standard_Real& u1, Standard_Real& v1, Standard_Real& u2, Standard_Real& v2, gp_Pnt& Pt, gp_Vec& Tg, gp_Vec2d& Tguv1, gp_Vec2d& Tguv2);
Standard_EXPORT void Pnt (const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Pnt& P);

View File

@@ -73,6 +73,8 @@ public:
Standard_Real Root() const;
//! Returns the value Tol so that if Abs(Func.Root())<Tol
//! the function is considered null.
Standard_Real Tolerance() const;
const gp_Pnt& Point() const;