| Open CASCADE Technology
    7.3.0
    | 
This class is used to smooth N points with constraints by minimization of quadratic criterium but also variational criterium in order to obtain " fair Curve " Computes the approximation of a Multiline by Variational optimization. More...
#include <AppDef_Variational.hxx>
| Public Member Functions | |
| AppDef_Variational (const AppDef_MultiLine &SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle< AppParCurves_HArray1OfConstraintCouple > &TheConstraints, const Standard_Integer MaxDegree=14, const Standard_Integer MaxSegment=100, const GeomAbs_Shape Continuity=GeomAbs_C2, const Standard_Boolean WithMinMax=Standard_False, const Standard_Boolean WithCutting=Standard_True, const Standard_Real Tolerance=1.0, const Standard_Integer NbIterations=2) | |
| Constructor. Initialization of the fields. warning : Nc0 : number of PassagePoint consraints Nc2 : number of TangencyPoint constraints Nc3 : number of CurvaturePoint constraints if ((MaxDegree-Continuity)*MaxSegment -Nc0 - 2*Nc1 -3*Nc2) is negative The problem is over-constrained.  More... | |
| void | Approximate () | 
| Makes the approximation with the current fields.  More... | |
| Standard_Boolean | IsCreated () const | 
| returns True if the creation is done and correspond to the current fields.  More... | |
| Standard_Boolean | IsDone () const | 
| returns True if the approximation is ok and correspond to the current fields.  More... | |
| Standard_Boolean | IsOverConstrained () const | 
| returns True if the problem is overconstrained in this case, approximation cannot be done.  More... | |
| AppParCurves_MultiBSpCurve | Value () const | 
| returns all the BSpline curves approximating the MultiLine from AppDef SSP after minimization of the parameter.  More... | |
| Standard_Real | MaxError () const | 
| returns the maximum of the distances between the points of the multiline and the approximation curves.  More... | |
| Standard_Integer | MaxErrorIndex () const | 
| returns the index of the MultiPoint of ErrorMax  More... | |
| Standard_Real | QuadraticError () const | 
| returns the quadratic average of the distances between the points of the multiline and the approximation curves.  More... | |
| void | Distance (math_Matrix &mat) | 
| returns the distances between the points of the multiline and the approximation curves.  More... | |
| Standard_Real | AverageError () const | 
| returns the average error between the MultiLine from AppDef and the approximation.  More... | |
| const Handle< TColStd_HArray1OfReal > & | Parameters () const | 
| returns the parameters uses to the approximations  More... | |
| const Handle< TColStd_HArray1OfReal > & | Knots () const | 
| returns the knots uses to the approximations  More... | |
| void | Criterium (Standard_Real &VFirstOrder, Standard_Real &VSecondOrder, Standard_Real &VThirdOrder) const | 
| returns the values of the quality criterium.  More... | |
| void | CriteriumWeight (Standard_Real &Percent1, Standard_Real &Percent2, Standard_Real &Percent3) const | 
| returns the Weights (as percent) associed to the criterium used in the optimization.  More... | |
| Standard_Integer | MaxDegree () const | 
| returns the Maximum Degree used in the approximation  More... | |
| Standard_Integer | MaxSegment () const | 
| returns the Maximum of segment used in the approximation  More... | |
| GeomAbs_Shape | Continuity () const | 
| returns the Continuity used in the approximation  More... | |
| Standard_Boolean | WithMinMax () const | 
| returns if the approximation search to minimize the maximum Error or not.  More... | |
| Standard_Boolean | WithCutting () const | 
| returns if the approximation can insert new Knots or not.  More... | |
| Standard_Real | Tolerance () const | 
| returns the tolerance used in the approximation.  More... | |
| Standard_Integer | NbIterations () const | 
| returns the number of iterations used in the approximation.  More... | |
| void | Dump (Standard_OStream &o) const | 
| Prints on the stream o information on the current state of the object. MaxError,MaxErrorIndex,AverageError,QuadraticError,Criterium Distances,Degre,Nombre de poles, parametres, noeuds.  More... | |
| Standard_Boolean | SetConstraints (const Handle< AppParCurves_HArray1OfConstraintCouple > &aConstrainst) | 
| Define the constraints to approximate If this value is incompatible with the others fields this method modify nothing and returns false.  More... | |
| void | SetParameters (const Handle< TColStd_HArray1OfReal > ¶m) | 
| Defines the parameters used by the approximations.  More... | |
| Standard_Boolean | SetKnots (const Handle< TColStd_HArray1OfReal > &knots) | 
| Defines the knots used by the approximations If this value is incompatible with the others fields this method modify nothing and returns false.  More... | |
| Standard_Boolean | SetMaxDegree (const Standard_Integer Degree) | 
| Define the Maximum Degree used in the approximation If this value is incompatible with the others fields this method modify nothing and returns false.  More... | |
| Standard_Boolean | SetMaxSegment (const Standard_Integer NbSegment) | 
| Define the maximum number of segments used in the approximation If this value is incompatible with the others fields this method modify nothing and returns false.  More... | |
| Standard_Boolean | SetContinuity (const GeomAbs_Shape C) | 
| Define the Continuity used in the approximation If this value is incompatible with the others fields this method modify nothing and returns false.  More... | |
| void | SetWithMinMax (const Standard_Boolean MinMax) | 
| Define if the approximation search to minimize the maximum Error or not.  More... | |
| Standard_Boolean | SetWithCutting (const Standard_Boolean Cutting) | 
| Define if the approximation can insert new Knots or not. If this value is incompatible with the others fields this method modify nothing and returns false.  More... | |
| void | SetCriteriumWeight (const Standard_Real Percent1, const Standard_Real Percent2, const Standard_Real Percent3) | 
| define the Weights (as percent) associed to the criterium used in the optimization.  More... | |
| void | SetCriteriumWeight (const Standard_Integer Order, const Standard_Real Percent) | 
| define the Weight (as percent) associed to the criterium Order used in the optimization : Others weights are updated. if Percent < 0 if Order < 1 or Order > 3  More... | |
| void | SetTolerance (const Standard_Real Tol) | 
| define the tolerance used in the approximation.  More... | |
| void | SetNbIterations (const Standard_Integer Iter) | 
| define the number of iterations used in the approximation. if Iter < 1  More... | |
This class is used to smooth N points with constraints by minimization of quadratic criterium but also variational criterium in order to obtain " fair Curve " Computes the approximation of a Multiline by Variational optimization.
| AppDef_Variational::AppDef_Variational | ( | const AppDef_MultiLine & | SSP, | 
| const Standard_Integer | FirstPoint, | ||
| const Standard_Integer | LastPoint, | ||
| const Handle< AppParCurves_HArray1OfConstraintCouple > & | TheConstraints, | ||
| const Standard_Integer | MaxDegree = 14, | ||
| const Standard_Integer | MaxSegment = 100, | ||
| const GeomAbs_Shape | Continuity = GeomAbs_C2, | ||
| const Standard_Boolean | WithMinMax = Standard_False, | ||
| const Standard_Boolean | WithCutting = Standard_True, | ||
| const Standard_Real | Tolerance = 1.0, | ||
| const Standard_Integer | NbIterations = 2 | ||
| ) | 
Constructor. Initialization of the fields. warning : Nc0 : number of PassagePoint consraints Nc2 : number of TangencyPoint constraints Nc3 : number of CurvaturePoint constraints if ((MaxDegree-Continuity)*MaxSegment -Nc0 - 2*Nc1 -3*Nc2) is negative The problem is over-constrained.
Limitation : The MultiLine from AppDef has to be composed by only one Line ( Dimension 2 or 3).
| void AppDef_Variational::Approximate | ( | ) | 
Makes the approximation with the current fields.
| Standard_Real AppDef_Variational::AverageError | ( | ) | const | 
returns the average error between the MultiLine from AppDef and the approximation.
| GeomAbs_Shape AppDef_Variational::Continuity | ( | ) | const | 
returns the Continuity used in the approximation
| void AppDef_Variational::Criterium | ( | Standard_Real & | VFirstOrder, | 
| Standard_Real & | VSecondOrder, | ||
| Standard_Real & | VThirdOrder | ||
| ) | const | 
returns the values of the quality criterium.
| void AppDef_Variational::CriteriumWeight | ( | Standard_Real & | Percent1, | 
| Standard_Real & | Percent2, | ||
| Standard_Real & | Percent3 | ||
| ) | const | 
returns the Weights (as percent) associed to the criterium used in the optimization.
| void AppDef_Variational::Distance | ( | math_Matrix & | mat | ) | 
returns the distances between the points of the multiline and the approximation curves.
| void AppDef_Variational::Dump | ( | Standard_OStream & | o | ) | const | 
Prints on the stream o information on the current state of the object. MaxError,MaxErrorIndex,AverageError,QuadraticError,Criterium Distances,Degre,Nombre de poles, parametres, noeuds.
| Standard_Boolean AppDef_Variational::IsCreated | ( | ) | const | 
returns True if the creation is done and correspond to the current fields.
| Standard_Boolean AppDef_Variational::IsDone | ( | ) | const | 
returns True if the approximation is ok and correspond to the current fields.
| Standard_Boolean AppDef_Variational::IsOverConstrained | ( | ) | const | 
returns True if the problem is overconstrained in this case, approximation cannot be done.
| const Handle< TColStd_HArray1OfReal >& AppDef_Variational::Knots | ( | ) | const | 
returns the knots uses to the approximations
| Standard_Integer AppDef_Variational::MaxDegree | ( | ) | const | 
returns the Maximum Degree used in the approximation
| Standard_Real AppDef_Variational::MaxError | ( | ) | const | 
returns the maximum of the distances between the points of the multiline and the approximation curves.
| Standard_Integer AppDef_Variational::MaxErrorIndex | ( | ) | const | 
returns the index of the MultiPoint of ErrorMax
| Standard_Integer AppDef_Variational::MaxSegment | ( | ) | const | 
returns the Maximum of segment used in the approximation
| Standard_Integer AppDef_Variational::NbIterations | ( | ) | const | 
returns the number of iterations used in the approximation.
| const Handle< TColStd_HArray1OfReal >& AppDef_Variational::Parameters | ( | ) | const | 
returns the parameters uses to the approximations
| Standard_Real AppDef_Variational::QuadraticError | ( | ) | const | 
returns the quadratic average of the distances between the points of the multiline and the approximation curves.
| Standard_Boolean AppDef_Variational::SetConstraints | ( | const Handle< AppParCurves_HArray1OfConstraintCouple > & | aConstrainst | ) | 
Define the constraints to approximate If this value is incompatible with the others fields this method modify nothing and returns false.
| Standard_Boolean AppDef_Variational::SetContinuity | ( | const GeomAbs_Shape | C | ) | 
Define the Continuity used in the approximation If this value is incompatible with the others fields this method modify nothing and returns false.
| void AppDef_Variational::SetCriteriumWeight | ( | const Standard_Real | Percent1, | 
| const Standard_Real | Percent2, | ||
| const Standard_Real | Percent3 | ||
| ) | 
define the Weights (as percent) associed to the criterium used in the optimization.
if Percent <= 0
| void AppDef_Variational::SetCriteriumWeight | ( | const Standard_Integer | Order, | 
| const Standard_Real | Percent | ||
| ) | 
define the Weight (as percent) associed to the criterium Order used in the optimization : Others weights are updated. if Percent < 0 if Order < 1 or Order > 3
| Standard_Boolean AppDef_Variational::SetKnots | ( | const Handle< TColStd_HArray1OfReal > & | knots | ) | 
Defines the knots used by the approximations If this value is incompatible with the others fields this method modify nothing and returns false.
| Standard_Boolean AppDef_Variational::SetMaxDegree | ( | const Standard_Integer | Degree | ) | 
Define the Maximum Degree used in the approximation If this value is incompatible with the others fields this method modify nothing and returns false.
| Standard_Boolean AppDef_Variational::SetMaxSegment | ( | const Standard_Integer | NbSegment | ) | 
Define the maximum number of segments used in the approximation If this value is incompatible with the others fields this method modify nothing and returns false.
| void AppDef_Variational::SetNbIterations | ( | const Standard_Integer | Iter | ) | 
define the number of iterations used in the approximation. if Iter < 1
| void AppDef_Variational::SetParameters | ( | const Handle< TColStd_HArray1OfReal > & | param | ) | 
Defines the parameters used by the approximations.
| void AppDef_Variational::SetTolerance | ( | const Standard_Real | Tol | ) | 
define the tolerance used in the approximation.
| Standard_Boolean AppDef_Variational::SetWithCutting | ( | const Standard_Boolean | Cutting | ) | 
Define if the approximation can insert new Knots or not. If this value is incompatible with the others fields this method modify nothing and returns false.
| void AppDef_Variational::SetWithMinMax | ( | const Standard_Boolean | MinMax | ) | 
Define if the approximation search to minimize the maximum Error or not.
| Standard_Real AppDef_Variational::Tolerance | ( | ) | const | 
returns the tolerance used in the approximation.
| AppParCurves_MultiBSpCurve AppDef_Variational::Value | ( | ) | const | 
returns all the BSpline curves approximating the MultiLine from AppDef SSP after minimization of the parameter.
| Standard_Boolean AppDef_Variational::WithCutting | ( | ) | const | 
returns if the approximation can insert new Knots or not.
| Standard_Boolean AppDef_Variational::WithMinMax | ( | ) | const | 
returns if the approximation search to minimize the maximum Error or not.
 1.8.13
 1.8.13