Recovered comments for instance classes from CDL generic classes.
public:
+ //! Creates an empty GenHCurve2d.
Standard_EXPORT Adaptor2d_HLine2d();
+ //! Creates a GenHCurve2d from a Curve
Standard_EXPORT Adaptor2d_HLine2d(const Adaptor2d_Line2d& C);
+ //! Sets the field of the GenHCurve2d.
Standard_EXPORT void Set (const Adaptor2d_Line2d& C);
+ //! Returns the curve used to create the GenHCurve2d.
+ //! This is redefined from HCurve2d, cannot be inline.
Standard_EXPORT const Adaptor2d_Curve2d& Curve2d() const;
+ //! Returns the curve used to create the GenHCurve.
Adaptor2d_Line2d& ChangeCurve2d();
public:
+ //! Creates an empty GenHCurve.
Standard_EXPORT Adaptor3d_HCurveOnSurface();
+ //! Creates a GenHCurve from a Curve
Standard_EXPORT Adaptor3d_HCurveOnSurface(const Adaptor3d_CurveOnSurface& C);
+ //! Sets the field of the GenHCurve.
Standard_EXPORT void Set (const Adaptor3d_CurveOnSurface& C);
+ //! Returns the curve used to create the GenHCurve.
+ //! This is redefined from HCurve, cannot be inline.
Standard_EXPORT const Adaptor3d_Curve& Curve() const;
+ //! Returns the curve used to create the GenHCurve.
+ //! This is redefined from HCurve, cannot be inline.
Standard_EXPORT Adaptor3d_Curve& GetCurve();
+ //! Returns the curve used to create the GenHCurve.
Adaptor3d_CurveOnSurface& ChangeCurve();
public:
+ //! Creates an empty GenHCurve.
Standard_EXPORT Adaptor3d_HIsoCurve();
+ //! Creates a GenHCurve from a Curve
Standard_EXPORT Adaptor3d_HIsoCurve(const Adaptor3d_IsoCurve& C);
+ //! Sets the field of the GenHCurve.
Standard_EXPORT void Set (const Adaptor3d_IsoCurve& C);
+ //! Returns the curve used to create the GenHCurve.
+ //! This is redefined from HCurve, cannot be inline.
Standard_EXPORT const Adaptor3d_Curve& Curve() const;
+ //! Returns the curve used to create the GenHCurve.
+ //! This is redefined from HCurve, cannot be inline.
Standard_EXPORT Adaptor3d_Curve& GetCurve();
+ //! Returns the curve used to create the GenHCurve.
Adaptor3d_IsoCurve& ChangeCurve();
public:
+ //! Creates an empty GenHCurve2d.
Standard_EXPORT Adaptor3d_HOffsetCurve();
+ //! Creates a GenHCurve2d from a Curve
Standard_EXPORT Adaptor3d_HOffsetCurve(const Adaptor3d_OffsetCurve& C);
+ //! Sets the field of the GenHCurve2d.
Standard_EXPORT void Set (const Adaptor3d_OffsetCurve& C);
+ //! Returns the curve used to create the GenHCurve2d.
+ //! This is redefined from HCurve2d, cannot be inline.
Standard_EXPORT const Adaptor2d_Curve2d& Curve2d() const;
+ //! Returns the curve used to create the GenHCurve.
Adaptor3d_OffsetCurve& ChangeCurve2d();
public:
+ //! Creates an empty GenHSurface.
Standard_EXPORT Adaptor3d_HSurfaceOfLinearExtrusion();
+ //! Creates a GenHSurface from a Surface.
Standard_EXPORT Adaptor3d_HSurfaceOfLinearExtrusion(const Adaptor3d_SurfaceOfLinearExtrusion& S);
+ //! Sets the field of the GenHSurface.
Standard_EXPORT void Set (const Adaptor3d_SurfaceOfLinearExtrusion& S);
+ //! Returns a reference to the Surface inside the HSurface.
+ //! This is redefined from HSurface, cannot be inline.
Standard_EXPORT const Adaptor3d_Surface& Surface() const;
+ //! Returns the surface used to create the GenHSurface.
Adaptor3d_SurfaceOfLinearExtrusion& ChangeSurface();
public:
+ //! Creates an empty GenHSurface.
Standard_EXPORT Adaptor3d_HSurfaceOfRevolution();
+ //! Creates a GenHSurface from a Surface.
Standard_EXPORT Adaptor3d_HSurfaceOfRevolution(const Adaptor3d_SurfaceOfRevolution& S);
+ //! Sets the field of the GenHSurface.
Standard_EXPORT void Set (const Adaptor3d_SurfaceOfRevolution& S);
+ //! Returns a reference to the Surface inside the HSurface.
+ //! This is redefined from HSurface, cannot be inline.
Standard_EXPORT const Adaptor3d_Surface& Surface() const;
+ //! Returns the surface used to create the GenHSurface.
Adaptor3d_SurfaceOfRevolution& ChangeSurface();
DEFINE_STANDARD_ALLOC
+ //! initializes the fields of the function. The approximating
+ //! curve has <NbPol> control points.
Standard_EXPORT AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute(const AppDef_MultiLine& 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;
protected:
+ //! this method is used each time Value or Gradient is
+ //! needed.
Standard_EXPORT void Perform (const math_Vector& X);
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 AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute(const AppDef_MultiLine& 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 AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute(const AppDef_MultiLine& 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 AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute(const AppDef_MultiLine& 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 AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute(const AppDef_MultiLine& 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;
protected:
+ //! is used by the constuctors above.
Standard_EXPORT void Init (const AppDef_MultiLine& 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 AppDef_MultiLine& 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 AppDef_MultiLine& 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);
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 AppDef_BSplineCompute(const AppDef_MultiLine& 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 AppDef_BSplineCompute(const AppDef_MultiLine& 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 AppDef_BSplineCompute(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 AppDef_BSplineCompute(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 AppDef_MultiLine& 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 AppDef_MultiLine& 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;
private:
+ //! is internally used in the algorithm.
Standard_EXPORT Standard_Boolean Compute (const AppDef_MultiLine& 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 AppDef_MultiLine& Line, const Standard_Integer firspt, const Standard_Integer lastpt);
+ //! computes new parameters between firstP and lastP.
Standard_EXPORT void Parameters (const AppDef_MultiLine& Line, const Standard_Integer firstP, const Standard_Integer LastP, math_Vector& TheParameters) const;
Standard_EXPORT Standard_Real SearchFirstLambda (const AppDef_MultiLine& Line, const math_Vector& Para, const TColStd_Array1OfReal& Knots, const math_Vector& V, const Standard_Integer index) const;
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 AppDef_Compute(const AppDef_MultiLine& 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 AppDef_Compute(const AppDef_MultiLine& 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 AppDef_Compute(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 AppDef_Compute(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 AppDef_MultiLine& 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;
private:
+ //! is internally used in the algorithm.
Standard_EXPORT Standard_Boolean Compute (const AppDef_MultiLine& 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 AppDef_MultiLine& Line, const Standard_Integer firspt, const Standard_Integer lastpt);
+ //! computes new parameters between firstP and lastP.
Standard_EXPORT void Parameters (const AppDef_MultiLine& Line, const Standard_Integer firstP, const Standard_Integer LastP, math_Vector& TheParameters) const;
Standard_EXPORT Standard_Real SearchFirstLambda (const AppDef_MultiLine& Line, const math_Vector& Para, const math_Vector& V, const Standard_Integer index) const;
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 AppDef_MyBSplGradientOfBSplineCompute(const AppDef_MultiLine& 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 AppDef_MyBSplGradientOfBSplineCompute(const AppDef_MultiLine& 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;
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 AppDef_MyGradientOfCompute(const AppDef_MultiLine& 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;
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 AppDef_MyGradientbisOfBSplineCompute(const AppDef_MultiLine& 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;
DEFINE_STANDARD_ALLOC
+ //! initializes the fields of the function. The approximating
+ //! curve has the desired degree Deg.
Standard_EXPORT AppDef_ParFunctionOfMyGradientOfCompute(const AppDef_MultiLine& 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;
protected:
+ //! this method is used each time Value or Gradient is
+ //! needed.
Standard_EXPORT void Perform (const math_Vector& X);
DEFINE_STANDARD_ALLOC
+ //! initializes the fields of the function. The approximating
+ //! curve has the desired degree Deg.
Standard_EXPORT AppDef_ParFunctionOfMyGradientbisOfBSplineCompute(const AppDef_MultiLine& 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;
protected:
+ //! this method is used each time Value or Gradient is
+ //! needed.
Standard_EXPORT void Perform (const math_Vector& X);
DEFINE_STANDARD_ALLOC
+ //! initializes the fields of the function. The approximating
+ //! curve has the desired degree Deg.
Standard_EXPORT AppDef_ParFunctionOfTheGradient(const AppDef_MultiLine& 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;
protected:
+ //! this method is used each time Value or Gradient is
+ //! needed.
Standard_EXPORT void Perform (const math_Vector& X);
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 AppDef_ParLeastSquareOfMyGradientOfCompute(const AppDef_MultiLine& 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 AppDef_ParLeastSquareOfMyGradientOfCompute(const AppDef_MultiLine& 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 AppDef_ParLeastSquareOfMyGradientOfCompute(const AppDef_MultiLine& 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 AppDef_ParLeastSquareOfMyGradientOfCompute(const AppDef_MultiLine& 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;
protected:
+ //! is used by the constuctors above.
Standard_EXPORT void Init (const AppDef_MultiLine& 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 AppDef_MultiLine& 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 AppDef_MultiLine& 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);
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 AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute(const AppDef_MultiLine& 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 AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute(const AppDef_MultiLine& 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 AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute(const AppDef_MultiLine& 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 AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute(const AppDef_MultiLine& 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;
protected:
+ //! is used by the constuctors above.
Standard_EXPORT void Init (const AppDef_MultiLine& 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 AppDef_MultiLine& 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 AppDef_MultiLine& 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);
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 AppDef_ParLeastSquareOfTheGradient(const AppDef_MultiLine& 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 AppDef_ParLeastSquareOfTheGradient(const AppDef_MultiLine& 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 AppDef_ParLeastSquareOfTheGradient(const AppDef_MultiLine& 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 AppDef_ParLeastSquareOfTheGradient(const AppDef_MultiLine& 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;
protected:
+ //! is used by the constuctors above.
Standard_EXPORT void Init (const AppDef_MultiLine& 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 AppDef_MultiLine& 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 AppDef_MultiLine& 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);
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 AppDef_ResConstraintOfMyGradientOfCompute(const AppDef_MultiLine& 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 AppDef_MultiLine& 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;
protected:
+ //! is used internally to create the fields.
Standard_EXPORT Standard_Integer NbConstraints (const AppDef_MultiLine& 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 AppDef_MultiLine& SSP, const Standard_Integer Deg) const;
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 AppDef_ResConstraintOfMyGradientbisOfBSplineCompute(const AppDef_MultiLine& 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 AppDef_MultiLine& 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;
protected:
+ //! is used internally to create the fields.
Standard_EXPORT Standard_Integer NbConstraints (const AppDef_MultiLine& 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 AppDef_MultiLine& SSP, const Standard_Integer Deg) const;
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 AppDef_ResConstraintOfTheGradient(const AppDef_MultiLine& 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 AppDef_MultiLine& 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;
protected:
+ //! is used internally to create the fields.
Standard_EXPORT Standard_Integer NbConstraints (const AppDef_MultiLine& 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 AppDef_MultiLine& SSP, const Standard_Integer Deg) const;
DEFINE_STANDARD_ALLOC
+ //! initializes the fields of the function. The approximating
+ //! curve has the desired degree Deg.
Standard_EXPORT AppDef_TheFunction(const AppDef_MultiLine& 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;
protected:
+ //! this method is used each time Value or Gradient is
+ //! needed.
Standard_EXPORT void Perform (const math_Vector& X);
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 AppDef_TheGradient(const AppDef_MultiLine& 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;
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 AppDef_TheLeastSquares(const AppDef_MultiLine& 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 AppDef_TheLeastSquares(const AppDef_MultiLine& 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 AppDef_TheLeastSquares(const AppDef_MultiLine& 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 AppDef_TheLeastSquares(const AppDef_MultiLine& 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;
protected:
+ //! is used by the constuctors above.
Standard_EXPORT void Init (const AppDef_MultiLine& 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 AppDef_MultiLine& 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 AppDef_MultiLine& 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);
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 AppDef_TheResol(const AppDef_MultiLine& 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 AppDef_MultiLine& 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;
protected:
+ //! is used internally to create the fields.
Standard_EXPORT Standard_Integer NbConstraints (const AppDef_MultiLine& 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 AppDef_MultiLine& SSP, const Standard_Integer Deg) const;
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.
Standard_EXPORT Approx_FitAndDivide(const AppCont_Function& Line, const Standard_Integer degreemin = 3, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-5, const Standard_Real Tolerance2d = 1.0e-5, const Standard_Boolean cutting = Standard_False, const AppParCurves_Constraint FirstC = AppParCurves_TangencyPoint, const AppParCurves_Constraint LastC = AppParCurves_TangencyPoint);
+ //! Initializes the fields of the algorithm.
Standard_EXPORT Approx_FitAndDivide(const Standard_Integer degreemin = 3, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-05, const Standard_Real Tolerance2d = 1.0e-05, const Standard_Boolean cutting = Standard_False, const AppParCurves_Constraint FirstC = AppParCurves_TangencyPoint, const AppParCurves_Constraint LastC = AppParCurves_TangencyPoint);
+ //! runs the algorithm after having initialized the fields.
Standard_EXPORT void Perform (const AppCont_Function& 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 constraints of the approximation.
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 approximation MultiCurve of range <Index>.
Standard_EXPORT AppParCurves_MultiCurve Value (const Standard_Integer Index = 1) const;
Standard_EXPORT void Parameters (const Standard_Integer Index, Standard_Real& firstp, Standard_Real& lastp) const;
private:
+ //! is internally used by the algorithms.
Standard_EXPORT Standard_Boolean Compute (const AppCont_Function& Line, const Standard_Real Ufirst, const Standard_Real Ulast, Standard_Real& TheTol3d, Standard_Real& TheTol2d);
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.
Standard_EXPORT Approx_FitAndDivide2d(const AppCont_Function& Line, const Standard_Integer degreemin = 3, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-5, const Standard_Real Tolerance2d = 1.0e-5, const Standard_Boolean cutting = Standard_False, const AppParCurves_Constraint FirstC = AppParCurves_TangencyPoint, const AppParCurves_Constraint LastC = AppParCurves_TangencyPoint);
+ //! Initializes the fields of the algorithm.
Standard_EXPORT Approx_FitAndDivide2d(const Standard_Integer degreemin = 3, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-05, const Standard_Real Tolerance2d = 1.0e-05, const Standard_Boolean cutting = Standard_False, const AppParCurves_Constraint FirstC = AppParCurves_TangencyPoint, const AppParCurves_Constraint LastC = AppParCurves_TangencyPoint);
+ //! runs the algorithm after having initialized the fields.
Standard_EXPORT void Perform (const AppCont_Function& 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 constraints of the approximation.
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 approximation MultiCurve of range <Index>.
Standard_EXPORT AppParCurves_MultiCurve Value (const Standard_Integer Index = 1) const;
Standard_EXPORT void Parameters (const Standard_Integer Index, Standard_Real& firstp, Standard_Real& lastp) const;
private:
+ //! is internally used by the algorithms.
Standard_EXPORT Standard_Boolean Compute (const AppCont_Function& Line, const Standard_Real Ufirst, const Standard_Real Ulast, Standard_Real& TheTol3d, Standard_Real& TheTol2d);
public:
+ //! Creates an empty GenHCurve.
Standard_EXPORT BRepAdaptor_HCompCurve();
+ //! Creates a GenHCurve from a Curve
Standard_EXPORT BRepAdaptor_HCompCurve(const BRepAdaptor_CompCurve& C);
+ //! Sets the field of the GenHCurve.
Standard_EXPORT void Set (const BRepAdaptor_CompCurve& C);
+ //! Returns the curve used to create the GenHCurve.
+ //! This is redefined from HCurve, cannot be inline.
Standard_EXPORT const Adaptor3d_Curve& Curve() const;
+ //! Returns the curve used to create the GenHCurve.
+ //! This is redefined from HCurve, cannot be inline.
Standard_EXPORT Adaptor3d_Curve& GetCurve();
+ //! Returns the curve used to create the GenHCurve.
BRepAdaptor_CompCurve& ChangeCurve();
public:
+ //! Creates an empty GenHCurve.
Standard_EXPORT BRepAdaptor_HCurve();
+ //! Creates a GenHCurve from a Curve
Standard_EXPORT BRepAdaptor_HCurve(const BRepAdaptor_Curve& C);
+ //! Sets the field of the GenHCurve.
Standard_EXPORT void Set (const BRepAdaptor_Curve& C);
+ //! Returns the curve used to create the GenHCurve.
+ //! This is redefined from HCurve, cannot be inline.
Standard_EXPORT const Adaptor3d_Curve& Curve() const;
+ //! Returns the curve used to create the GenHCurve.
+ //! This is redefined from HCurve, cannot be inline.
Standard_EXPORT Adaptor3d_Curve& GetCurve();
+ //! Returns the curve used to create the GenHCurve.
BRepAdaptor_Curve& ChangeCurve();
public:
+ //! Creates an empty GenHCurve2d.
Standard_EXPORT BRepAdaptor_HCurve2d();
+ //! Creates a GenHCurve2d from a Curve
Standard_EXPORT BRepAdaptor_HCurve2d(const BRepAdaptor_Curve2d& C);
+ //! Sets the field of the GenHCurve2d.
Standard_EXPORT void Set (const BRepAdaptor_Curve2d& C);
+ //! Returns the curve used to create the GenHCurve2d.
+ //! This is redefined from HCurve2d, cannot be inline.
Standard_EXPORT const Adaptor2d_Curve2d& Curve2d() const;
+ //! Returns the curve used to create the GenHCurve.
BRepAdaptor_Curve2d& ChangeCurve2d();
public:
+ //! Creates an empty GenHSurface.
Standard_EXPORT BRepAdaptor_HSurface();
+ //! Creates a GenHSurface from a Surface.
Standard_EXPORT BRepAdaptor_HSurface(const BRepAdaptor_Surface& S);
+ //! Sets the field of the GenHSurface.
Standard_EXPORT void Set (const BRepAdaptor_Surface& S);
+ //! Returns a reference to the Surface inside the HSurface.
+ //! This is redefined from HSurface, cannot be inline.
Standard_EXPORT const Adaptor3d_Surface& Surface() const;
+ //! Returns the surface used to create the GenHSurface.
BRepAdaptor_Surface& ChangeSurface();
DEFINE_STANDARD_ALLOC
+ //! initializes the fields of the function. The approximating
+ //! curve has <NbPol> control points.
Standard_EXPORT BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& 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;
protected:
+ //! this method is used each time Value or Gradient is
+ //! needed.
Standard_EXPORT void Perform (const math_Vector& X);
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 BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox(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);
+ //! Initializes the fields of the object.
Standard_EXPORT BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& 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 BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox(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);
+ //! Initializes the fields of the object.
Standard_EXPORT BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox(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);
+ //! 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;
protected:
+ //! is used by the constuctors above.
Standard_EXPORT void Init (const BRepApprox_TheMultiLineOfApprox& 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 BRepApprox_TheMultiLineOfApprox& 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 BRepApprox_TheMultiLineOfApprox& 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);
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 BRepApprox_MyBSplGradientOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& 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 BRepApprox_MyBSplGradientOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& 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;
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 BRepApprox_MyGradientOfTheComputeLineBezierOfApprox(const BRepApprox_TheMultiLineOfApprox& 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;
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 BRepApprox_MyGradientbisOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& 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;
DEFINE_STANDARD_ALLOC
+ //! initializes the fields of the function. The approximating
+ //! curve has the desired degree Deg.
Standard_EXPORT BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox(const BRepApprox_TheMultiLineOfApprox& 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;
protected:
+ //! this method is used each time Value or Gradient is
+ //! needed.
Standard_EXPORT void Perform (const math_Vector& X);
DEFINE_STANDARD_ALLOC
+ //! initializes the fields of the function. The approximating
+ //! curve has the desired degree Deg.
Standard_EXPORT BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& 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;
protected:
+ //! this method is used each time Value or Gradient is
+ //! needed.
Standard_EXPORT void Perform (const math_Vector& X);
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 BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox(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);
+ //! Initializes the fields of the object.
Standard_EXPORT BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox(const BRepApprox_TheMultiLineOfApprox& 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 BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox(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);
+ //! Initializes the fields of the object.
Standard_EXPORT BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox(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);
+ //! 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;
protected:
+ //! is used by the constuctors above.
Standard_EXPORT void Init (const BRepApprox_TheMultiLineOfApprox& 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 BRepApprox_TheMultiLineOfApprox& 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 BRepApprox_TheMultiLineOfApprox& 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);
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 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);
+ //! Initializes the fields of the object.
Standard_EXPORT 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);
+ //! 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 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);
+ //! Initializes the fields of the object.
Standard_EXPORT 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);
+ //! 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;
protected:
+ //! is used by the constuctors above.
Standard_EXPORT void Init (const BRepApprox_TheMultiLineOfApprox& 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 BRepApprox_TheMultiLineOfApprox& 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 BRepApprox_TheMultiLineOfApprox& 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);
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 BRepApprox_ResConstraintOfMyGradientOfTheComputeLineBezierOfApprox(const BRepApprox_TheMultiLineOfApprox& 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 BRepApprox_TheMultiLineOfApprox& 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;
protected:
+ //! is used internally to create the fields.
Standard_EXPORT Standard_Integer NbConstraints (const BRepApprox_TheMultiLineOfApprox& 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 BRepApprox_TheMultiLineOfApprox& SSP, const Standard_Integer Deg) const;
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 BRepApprox_ResConstraintOfMyGradientbisOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& 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 BRepApprox_TheMultiLineOfApprox& 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;
protected:
+ //! is used internally to create the fields.
Standard_EXPORT Standard_Integer NbConstraints (const BRepApprox_TheMultiLineOfApprox& 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 BRepApprox_TheMultiLineOfApprox& SSP, const Standard_Integer Deg) const;
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 BRepApprox_TheComputeLineBezierOfApprox(const BRepApprox_TheMultiLineOfApprox& 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 BRepApprox_TheComputeLineBezierOfApprox(const BRepApprox_TheMultiLineOfApprox& 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 BRepApprox_TheComputeLineBezierOfApprox(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 BRepApprox_TheComputeLineBezierOfApprox(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 BRepApprox_TheMultiLineOfApprox& 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;
private:
+ //! is internally used in the algorithm.
Standard_EXPORT Standard_Boolean Compute (const BRepApprox_TheMultiLineOfApprox& 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 BRepApprox_TheMultiLineOfApprox& Line, const Standard_Integer firspt, const Standard_Integer lastpt);
+ //! computes new parameters between firstP and lastP.
Standard_EXPORT void Parameters (const BRepApprox_TheMultiLineOfApprox& Line, const Standard_Integer firstP, const Standard_Integer LastP, math_Vector& TheParameters) const;
Standard_EXPORT Standard_Real SearchFirstLambda (const BRepApprox_TheMultiLineOfApprox& Line, const math_Vector& Para, const math_Vector& V, const Standard_Integer index) const;
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 BRepApprox_TheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& 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 BRepApprox_TheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& 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 BRepApprox_TheComputeLineOfApprox(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 BRepApprox_TheComputeLineOfApprox(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 BRepApprox_TheMultiLineOfApprox& 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 BRepApprox_TheMultiLineOfApprox& 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;
private:
+ //! is internally used in the algorithm.
Standard_EXPORT Standard_Boolean Compute (const BRepApprox_TheMultiLineOfApprox& 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 BRepApprox_TheMultiLineOfApprox& Line, const Standard_Integer firspt, const Standard_Integer lastpt);
+ //! computes new parameters between firstP and lastP.
Standard_EXPORT void Parameters (const BRepApprox_TheMultiLineOfApprox& Line, const Standard_Integer firstP, const Standard_Integer LastP, math_Vector& TheParameters) const;
Standard_EXPORT Standard_Real SearchFirstLambda (const BRepApprox_TheMultiLineOfApprox& Line, const math_Vector& Para, const TColStd_Array1OfReal& Knots, const math_Vector& V, const Standard_Integer index) const;
DEFINE_STANDARD_ALLOC
+ //! Raises Construction Error
Standard_EXPORT BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox();
Standard_EXPORT BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox(const BRepAdaptor_Surface& S1, const BRepAdaptor_Surface& S2);
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;
Standard_EXPORT BRepApprox_TheImpPrmSvSurfacesOfApprox(const IntSurf_Quadric& Surf1, const BRepAdaptor_Surface& 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);
DEFINE_STANDARD_ALLOC
+ //! Raises Construction Error
Standard_EXPORT BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox();
+ //! compute the solution point with the close point
Standard_EXPORT BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox(const TColStd_Array1OfReal& Param, const BRepAdaptor_Surface& S1, const BRepAdaptor_Surface& 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 BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox(const BRepAdaptor_Surface& S1, const BRepAdaptor_Surface& 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
BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox& Function();
+ //! return the intersection point which is
+ //! enable for changing.
IntSurf_PntOn2S& ChangePoint();
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 BRepApprox_TheMultiLineOfApprox(const Handle(BRepApprox_ApproxLine)& 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 BRepApprox_TheMultiLineOfApprox(const Handle(BRepApprox_ApproxLine)& 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 BRepApprox_TheMultiLineOfApprox 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;
DEFINE_STANDARD_ALLOC
+ //! Returns the number of multipoints of the TheMultiLine.
static Standard_Integer FirstPoint (const BRepApprox_TheMultiLineOfApprox& ML);
+ //! Returns the number of multipoints of the TheMultiLine.
static Standard_Integer LastPoint (const BRepApprox_TheMultiLineOfApprox& ML);
+ //! Returns the number of 2d points of a TheMultiLine.
static Standard_Integer NbP2d (const BRepApprox_TheMultiLineOfApprox& ML);
+ //! Returns the number of 3d points of a TheMultiLine.
static Standard_Integer NbP3d (const BRepApprox_TheMultiLineOfApprox& ML);
+ //! returns the 3d points of the multipoint <MPointIndex>
+ //! when only 3d points exist.
static void Value (const BRepApprox_TheMultiLineOfApprox& 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 BRepApprox_TheMultiLineOfApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfPnt2d& tabPt2d);
+ //! returns the 3d and 2d points of the multipoint
+ //! <MPointIndex>.
static void Value (const BRepApprox_TheMultiLineOfApprox& 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 BRepApprox_TheMultiLineOfApprox& 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 BRepApprox_TheMultiLineOfApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfVec2d& tabV2d);
+ //! returns the 3d and 2d points of the multipoint
+ //! <MPointIndex>.
static Standard_Boolean Tangency (const BRepApprox_TheMultiLineOfApprox& 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 BRepApprox_TheMultiLineOfApprox& 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 BRepApprox_TheMultiLineOfApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfVec2d& tabV2d);
+ //! returns the 3d and 2d curvature of the multipoint
+ //! <MPointIndex>.
static Standard_Boolean Curvature (const BRepApprox_TheMultiLineOfApprox& ML, const Standard_Integer MPointIndex, TColgp_Array1OfVec& tabV, TColgp_Array1OfVec2d& tabV2d);
+ //! Is called if WhatStatus returned "PointsAdded".
static BRepApprox_TheMultiLineOfApprox MakeMLBetween (const BRepApprox_TheMultiLineOfApprox& ML, const Standard_Integer I1, const Standard_Integer I2, const Standard_Integer NbPMin);
static Approx_Status WhatStatus (const BRepApprox_TheMultiLineOfApprox& ML, const Standard_Integer I1, const Standard_Integer I2);
+ //! Dump of the current multi-line.
Standard_EXPORT static void Dump (const BRepApprox_TheMultiLineOfApprox& ML);
Standard_EXPORT BRepApprox_ThePrmPrmSvSurfacesOfApprox(const BRepAdaptor_Surface& Surf1, const BRepAdaptor_Surface& 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);
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;
Standard_EXPORT void Init (const Standard_Integer Degmin, const Standard_Integer Degmax, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIt, const Standard_Boolean KnownParameters = Standard_False);
+ //! Define the type of parametrization used in the approximation
Standard_EXPORT void SetParType (const Approx_ParametrizationType ParType);
+ //! Define the Continuity used in the approximation
Standard_EXPORT void SetContinuity (const GeomAbs_Shape C);
+ //! define the Weights associed to the criterium used in
+ //! the optimization.
+ //!
+ //! if Wi <= 0
Standard_EXPORT void SetCriteriumWeight (const Standard_Real W1, const Standard_Real W2, const Standard_Real W3);
+ //! returns the type of parametrization used in the approximation
Standard_EXPORT Approx_ParametrizationType ParType() const;
+ //! returns the Continuity used in the approximation
Standard_EXPORT GeomAbs_Shape Continuity() const;
+ //! returns the Weights (as percent) associed to the criterium used in
+ //! the optimization.
Standard_EXPORT void CriteriumWeight (Standard_Real& W1, Standard_Real& W2, Standard_Real& W3) const;
Standard_EXPORT void Perform (const Handle(BRepBlend_Line)& Lin, Blend_AppFunction& SecGen, const Standard_Boolean SpApprox = Standard_False);
Standard_EXPORT BRepBlend_Walking(const Handle(Adaptor3d_HSurface)& Surf1, const Handle(Adaptor3d_HSurface)& Surf2, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_TopolTool)& Domain2, const Handle(ChFiDS_HElSpine)& HGuide);
+ //! To define different domains for control and clipping.
Standard_EXPORT void SetDomainsToRecadre (const Handle(Adaptor3d_TopolTool)& RecDomain1, const Handle(Adaptor3d_TopolTool)& RecDomain2);
+ //! To define singular points computed before walking.
Standard_EXPORT void AddSingularPoint (const Blend_Point& P);
Standard_EXPORT void Perform (Blend_Function& F, Blend_FuncInv& FInv, const Standard_Real Pdep, const Standard_Real Pmax, const Standard_Real MaxStep, const Standard_Real TolGuide, const math_Vector& Soldep, const Standard_Real Tolesp, const Standard_Real Fleche, const Standard_Boolean Appro = Standard_False);
DEFINE_STANDARD_ALLOC
+ //! Creates an undefined classifier.
Standard_EXPORT BRepClass_FClass2dOfFClassifier();
+ //! Starts a classification process. The point to
+ //! classify is the origin of the line <L>. <P> is
+ //! the original length of the segment on <L> used to
+ //! compute intersections. <Tol> is the tolerance
+ //! attached to the line segment in intersections.
Standard_EXPORT void Reset (const gp_Lin2d& L, const Standard_Real P, const Standard_Real Tol);
+ //! Updates the classification process with the edge
+ //! <E> from the boundary.
Standard_EXPORT void Compare (const BRepClass_Edge& E, const TopAbs_Orientation Or);
+ //! Returns the current value of the parameter.
Standard_Real Parameter() const;
+ //! Returns the intersecting algorithm.
BRepClass_Intersector& Intersector();
+ //! Returns 0 if the last compared edge had no
+ //! relevant intersection. Else returns the index of
+ //! this intersection in the last intersection
+ //! algorithm.
Standard_Integer ClosestIntersection() const;
+ //! Returns the current state of the point.
TopAbs_State State() const;
+ //! Returns the Standard_True if the closest intersection point
+ //! represents head or end of the edge. Returns Standard_False
+ //! otherwise.
Standard_Boolean IsHeadOrEnd() const;
DEFINE_STANDARD_ALLOC
+ //! Empty constructor, undefined algorithm.
Standard_EXPORT BRepClass_FClassifier();
+ //! Creates an algorithm to classify the Point P with
+ //! Tolerance <T> on the face described by <F>.
Standard_EXPORT BRepClass_FClassifier(BRepClass_FaceExplorer& F, const gp_Pnt2d& P, const Standard_Real Tol);
+ //! Classify the Point P with Tolerance <T> on the
+ //! face described by <F>.
Standard_EXPORT void Perform (BRepClass_FaceExplorer& F, const gp_Pnt2d& P, const Standard_Real Tol);
+ //! Returns the result of the classification.
Standard_EXPORT TopAbs_State State() const;
+ //! Returns True when the state was computed by a
+ //! rejection. The state is OUT.
Standard_Boolean Rejected() const;
+ //! Returns True if the face contains no wire. The
+ //! state is IN.
Standard_Boolean NoWires() const;
+ //! Returns the Edge used to determine the
+ //! classification. When the State is ON this is the
+ //! Edge containing the point.
Standard_EXPORT const BRepClass_Edge& Edge() const;
+ //! Returns the parameter on Edge() used to determine the
+ //! classification.
Standard_EXPORT Standard_Real EdgeParameter() const;
+ //! Returns the position of the point on the edge
+ //! returned by Edge.
IntRes2d_Position Position() const;
DEFINE_STANDARD_ALLOC
+ //! Creates an undefined classifier.
Standard_EXPORT BRepClass_FacePassiveClassifier();
+ //! Starts a classification process. The point to
+ //! classify is the origin of the line <L>. <P> is
+ //! the original length of the segment on <L> used to
+ //! compute intersections. <Tol> is the tolerance
+ //! attached to the line segment in intersections.
Standard_EXPORT void Reset (const gp_Lin2d& L, const Standard_Real P, const Standard_Real Tol);
+ //! Updates the classification process with the edge
+ //! <E> from the boundary.
Standard_EXPORT void Compare (const BRepClass_Edge& E, const TopAbs_Orientation Or);
+ //! Returns the current value of the parameter.
Standard_Real Parameter() const;
+ //! Returns the intersecting algorithm.
BRepClass_Intersector& Intersector();
+ //! Returns 0 if the last compared edge had no
+ //! relevant intersection. Else returns the index of
+ //! this intersection in the last intersection
+ //! algorithm.
Standard_Integer ClosestIntersection() const;
+ //! Returns the current state of the point.
TopAbs_State State() const;
+ //! Returns the Standard_True if the closest intersection point
+ //! represents head or end of the edge. Returns Standard_False
+ //! otherwise.
Standard_Boolean IsHeadOrEnd() const;
DEFINE_STANDARD_ALLOC
+ //! Creates an undefined classifier.
Standard_EXPORT BRepClass3d_SolidPassiveClassifier();
+ //! Starts a classification process. The point to
+ //! classify is the origin of the line <L>. <P> is
+ //! the original length of the segment on <L> used to
+ //! compute intersections. <Tol> is the tolerance
+ //! attached to the intersections.
Standard_EXPORT void Reset (const gp_Lin& L, const Standard_Real P, const Standard_Real Tol);
+ //! Updates the classification process with the face
+ //! <F> from the boundary.
Standard_EXPORT void Compare (const TopoDS_Face& F, const TopAbs_Orientation Or);
+ //! Returns the current value of the parameter.
Standard_Real Parameter() const;
+ //! Returns True if an intersection is computed.
Standard_EXPORT Standard_Boolean HasIntersection() const;
+ //! Returns the intersecting algorithm.
BRepClass3d_Intersector3d& Intersector();
+ //! Returns the current state of the point.
TopAbs_State State() const;
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.
Standard_EXPORT BRepFill_ComputeCLine(const BRepFill_MultiLine& Line, const Standard_Integer degreemin = 3, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-5, const Standard_Real Tolerance2d = 1.0e-5, const Standard_Boolean cutting = Standard_False, const AppParCurves_Constraint FirstC = AppParCurves_TangencyPoint, const AppParCurves_Constraint LastC = AppParCurves_TangencyPoint);
+ //! Initializes the fields of the algorithm.
Standard_EXPORT BRepFill_ComputeCLine(const Standard_Integer degreemin = 3, const Standard_Integer degreemax = 8, const Standard_Real Tolerance3d = 1.0e-05, const Standard_Real Tolerance2d = 1.0e-05, const Standard_Boolean cutting = Standard_False, const AppParCurves_Constraint FirstC = AppParCurves_TangencyPoint, const AppParCurves_Constraint LastC = AppParCurves_TangencyPoint);
+ //! runs the algorithm after having initialized the fields.
Standard_EXPORT void Perform (const BRepFill_MultiLine& 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 constraints of the approximation.
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 approximation MultiCurve of range <Index>.
Standard_EXPORT AppParCurves_MultiCurve Value (const Standard_Integer Index = 1) const;
Standard_EXPORT void Parameters (const Standard_Integer Index, Standard_Real& firstp, Standard_Real& lastp) const;
private:
+ //! is internally used by the algorithms.
Standard_EXPORT Standard_Boolean Compute (const BRepFill_MultiLine& Line, const Standard_Real Ufirst, const Standard_Real Ulast, Standard_Real& TheTol3d, Standard_Real& TheTol2d);
DEFINE_STANDARD_ALLOC
+ //! Initializes the local properties of the curve <C>
+ //! The current point and the derivatives are
+ //! computed at the same time, which allows an
+ //! optimization of the computation time.
+ //! <N> indicates the maximum number of derivations to
+ //! be done (0, 1, 2 or 3). For example, to compute
+ //! only the tangent, N should be equal to 1.
+ //! <Resolution> is the linear tolerance (it is used to test
+ //! if a vector is null).
Standard_EXPORT BRepLProp_CLProps(const BRepAdaptor_Curve& C, const Standard_Integer N, const Standard_Real Resolution);
+ //! Same as previous constructor but here the parameter is
+ //! set to the value <U>.
+ //! All the computations done will be related to <C> and <U>.
Standard_EXPORT BRepLProp_CLProps(const BRepAdaptor_Curve& C, const Standard_Real U, const Standard_Integer N, const Standard_Real Resolution);
+ //! Same as previous constructor but here the parameter is
+ //! set to the value <U> and the curve is set
+ //! with SetCurve.
+ //! the curve can have a empty constructor
+ //! All the computations done will be related to <C> and <U>
+ //! when the functions "set" will be done.
Standard_EXPORT BRepLProp_CLProps(const Standard_Integer N, const Standard_Real Resolution);
+ //! Initializes the local properties of the curve
+ //! for the parameter value <U>.
Standard_EXPORT void SetParameter (const Standard_Real U);
+ //! Initializes the local properties of the curve
+ //! for the new curve.
Standard_EXPORT void SetCurve (const BRepAdaptor_Curve& C);
+ //! Returns the Point.
Standard_EXPORT const gp_Pnt& Value() const;
+ //! Returns the first derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& D1();
+ //! Returns the second derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& D2();
+ //! Returns the third derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& D3();
+ //! Returns True if the tangent is defined.
+ //! For example, the tangent is not defined if the
+ //! three first derivatives are all null.
Standard_EXPORT Standard_Boolean IsTangentDefined();
+ //! output the tangent direction <D>
Standard_EXPORT void Tangent (gp_Dir& D);
+ //! Returns the curvature.
Standard_EXPORT Standard_Real Curvature();
+ //! Returns the normal direction <N>.
Standard_EXPORT void Normal (gp_Dir& N);
+ //! Returns the centre of curvature <P>.
Standard_EXPORT void CentreOfCurvature (gp_Pnt& P);
DEFINE_STANDARD_ALLOC
+ //! Initializes the local properties of the surface <S>
+ //! for the parameter values (<U>, <V>).
+ //! The current point and the derivatives are
+ //! computed at the same time, which allows an
+ //! optimization of the computation time.
+ //! <N> indicates the maximum number of derivations to
+ //! be done (0, 1, or 2). For example, to compute
+ //! only the tangent, N should be equal to 1.
+ //! <Resolution> is the linear tolerance (it is used to test
+ //! if a vector is null).
Standard_EXPORT BRepLProp_SLProps(const BRepAdaptor_Surface& S, const Standard_Real U, const Standard_Real V, const Standard_Integer N, const Standard_Real Resolution);
+ //! idem as previous constructor but without setting the value
+ //! of parameters <U> and <V>.
Standard_EXPORT BRepLProp_SLProps(const BRepAdaptor_Surface& S, const Standard_Integer N, const Standard_Real Resolution);
+ //! idem as previous constructor but without setting the value
+ //! of parameters <U> and <V> and the surface.
+ //! the surface can have an empty constructor.
Standard_EXPORT BRepLProp_SLProps(const Standard_Integer N, const Standard_Real Resolution);
+ //! Initializes the local properties of the surface S
+ //! for the new surface.
Standard_EXPORT void SetSurface (const BRepAdaptor_Surface& S);
+ //! Initializes the local properties of the surface S
+ //! for the new parameter values (<U>, <V>).
Standard_EXPORT void SetParameters (const Standard_Real U, const Standard_Real V);
+ //! Returns the point.
Standard_EXPORT const gp_Pnt& Value() const;
+ //! Returns the first U derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& D1U();
+ //! Returns the first V derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& D1V();
+ //! Returns the second U derivatives
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& D2U();
+ //! Returns the second V derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& D2V();
+ //! Returns the second UV cross-derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& DUV();
+ //! returns True if the U tangent is defined.
+ //! For example, the tangent is not defined if the
+ //! two first U derivatives are null.
Standard_EXPORT Standard_Boolean IsTangentUDefined();
+ //! Returns the tangent direction <D> on the iso-V.
Standard_EXPORT void TangentU (gp_Dir& D);
+ //! returns if the V tangent is defined.
+ //! For example, the tangent is not defined if the
+ //! two first V derivatives are null.
Standard_EXPORT Standard_Boolean IsTangentVDefined();
+ //! Returns the tangent direction <D> on the iso-V.
Standard_EXPORT void TangentV (gp_Dir& D);
+ //! Tells if the normal is defined.
Standard_EXPORT Standard_Boolean IsNormalDefined();
+ //! Returns the normal direction.
Standard_EXPORT const gp_Dir& Normal();
+ //! returns True if the curvature is defined.
Standard_EXPORT Standard_Boolean IsCurvatureDefined();
+ //! returns True if the point is umbilic (i.e. if the
+ //! curvature is constant).
Standard_EXPORT Standard_Boolean IsUmbilic();
+ //! Returns the maximum curvature
Standard_EXPORT Standard_Real MaxCurvature();
+ //! Returns the minimum curvature
Standard_EXPORT Standard_Real MinCurvature();
+ //! Returns the direction of the maximum and minimum curvature
+ //! <MaxD> and <MinD>
Standard_EXPORT void CurvatureDirections (gp_Dir& MaxD, gp_Dir& MinD);
+ //! Returns the mean curvature.
Standard_EXPORT Standard_Real MeanCurvature();
+ //! Returns the Gaussian curvature
Standard_EXPORT Standard_Real GaussianCurvature();
public:
+ //! Creates an empty GenHCurve.
Standard_EXPORT BiTgte_HCurveOnEdge();
+ //! Creates a GenHCurve from a Curve
Standard_EXPORT BiTgte_HCurveOnEdge(const BiTgte_CurveOnEdge& C);
+ //! Sets the field of the GenHCurve.
Standard_EXPORT void Set (const BiTgte_CurveOnEdge& C);
+ //! Returns the curve used to create the GenHCurve.
+ //! This is redefined from HCurve, cannot be inline.
Standard_EXPORT const Adaptor3d_Curve& Curve() const;
+ //! Returns the curve used to create the GenHCurve.
+ //! This is redefined from HCurve, cannot be inline.
Standard_EXPORT Adaptor3d_Curve& GetCurve();
+ //! Returns the curve used to create the GenHCurve.
BiTgte_CurveOnEdge& ChangeCurve();
public:
+ //! Creates an empty GenHCurve.
Standard_EXPORT BiTgte_HCurveOnVertex();
+ //! Creates a GenHCurve from a Curve
Standard_EXPORT BiTgte_HCurveOnVertex(const BiTgte_CurveOnVertex& C);
+ //! Sets the field of the GenHCurve.
Standard_EXPORT void Set (const BiTgte_CurveOnVertex& C);
+ //! Returns the curve used to create the GenHCurve.
+ //! This is redefined from HCurve, cannot be inline.
Standard_EXPORT const Adaptor3d_Curve& Curve() const;
+ //! Returns the curve used to create the GenHCurve.
+ //! This is redefined from HCurve, cannot be inline.
Standard_EXPORT Adaptor3d_Curve& GetCurve();
+ //! Returns the curve used to create the GenHCurve.
BiTgte_CurveOnVertex& ChangeCurve();
DEFINE_STANDARD_ALLOC
+ //! Empty constructor.
Bnd_B2d();
+ //! Constructor.
Bnd_B2d(const gp_XY& theCenter, const gp_XY& theHSize);
+ //! Returns True if the box is void (non-initialized).
Standard_Boolean IsVoid() const;
+ //! Reset the box data.
void Clear();
+ //! Update the box by a point.
Standard_EXPORT void Add (const gp_XY& thePnt);
+ //! Update the box by a point.
Standard_EXPORT void Add (const gp_Pnt2d& thePnt);
+ //! Update the box by another box.
void Add (const Bnd_B2d& theBox);
+ //! Query a box corner: (Center - HSize). You must make sure that
+ //! the box is NOT VOID (see IsVoid()), otherwise the method returns
+ //! irrelevant result.
gp_XY CornerMin() const;
+ //! Query a box corner: (Center + HSize). You must make sure that
+ //! the box is NOT VOID (see IsVoid()), otherwise the method returns
+ //! irrelevant result.
gp_XY CornerMax() const;
+ //! Query the square diagonal. If the box is VOID (see method IsVoid())
+ //! then a very big real value is returned.
Standard_Real SquareExtent() const;
+ //! Extend the Box by the absolute value of theDiff.
void Enlarge (const Standard_Real theDiff);
+ //! Limit the Box by the internals of theOtherBox.
+ //! Returns True if the limitation takes place, otherwise False
+ //! indicating that the boxes do not intersect.
Standard_EXPORT Standard_Boolean Limit (const Bnd_B2d& theOtherBox);
+ //! Transform the bounding box with the given transformation.
+ //! The resulting box will be larger if theTrsf contains rotation.
Standard_EXPORT Bnd_B2d Transformed (const gp_Trsf2d& theTrsf) const;
+ //! Check the given point for the inclusion in the Box.
+ //! Returns True if the point is outside.
Standard_Boolean IsOut (const gp_XY& thePnt) const;
+ //! Check a circle for the intersection with the current box.
+ //! Returns True if there is no intersection between boxes.
Standard_EXPORT Standard_Boolean IsOut (const gp_XY& theCenter, const Standard_Real theRadius, const Standard_Boolean isCircleHollow = Standard_False) const;
+ //! Check the given box for the intersection with the current box.
+ //! Returns True if there is no intersection between boxes.
Standard_Boolean IsOut (const Bnd_B2d& theOtherBox) const;
+ //! Check the given box oriented by the given transformation
+ //! for the intersection with the current box.
+ //! Returns True if there is no intersection between boxes.
Standard_EXPORT Standard_Boolean IsOut (const Bnd_B2d& theOtherBox, const gp_Trsf2d& theTrsf) const;
+ //! Check the given Line for the intersection with the current box.
+ //! Returns True if there is no intersection.
Standard_EXPORT Standard_Boolean IsOut (const gp_Ax2d& theLine) const;
+ //! Check the Segment defined by the couple of input points
+ //! for the intersection with the current box.
+ //! Returns True if there is no intersection.
Standard_EXPORT Standard_Boolean IsOut (const gp_XY& theP0, const gp_XY& theP1) const;
+ //! Check that the box 'this' is inside the given box 'theBox'. Returns
+ //! True if 'this' box is fully inside 'theBox'.
Standard_Boolean IsIn (const Bnd_B2d& theBox) const;
+ //! Check that the box 'this' is inside the given box 'theBox'
+ //! transformed by 'theTrsf'. Returns True if 'this' box is fully
+ //! inside the transformed 'theBox'.
Standard_EXPORT Standard_Boolean IsIn (const Bnd_B2d& theBox, const gp_Trsf2d& theTrsf) const;
+ //! Set the Center coordinates
void SetCenter (const gp_XY& theCenter);
+ //! Set the HSize (half-diagonal) coordinates.
+ //! All components of theHSize must be non-negative.
void SetHSize (const gp_XY& theHSize);
DEFINE_STANDARD_ALLOC
+ //! Empty constructor.
Bnd_B2f();
+ //! Constructor.
Bnd_B2f(const gp_XY& theCenter, const gp_XY& theHSize);
+ //! Returns True if the box is void (non-initialized).
Standard_Boolean IsVoid() const;
+ //! Reset the box data.
void Clear();
+ //! Update the box by a point.
Standard_EXPORT void Add (const gp_XY& thePnt);
+ //! Update the box by a point.
Standard_EXPORT void Add (const gp_Pnt2d& thePnt);
+ //! Update the box by another box.
void Add (const Bnd_B2f& theBox);
+ //! Query a box corner: (Center - HSize). You must make sure that
+ //! the box is NOT VOID (see IsVoid()), otherwise the method returns
+ //! irrelevant result.
gp_XY CornerMin() const;
+ //! Query a box corner: (Center + HSize). You must make sure that
+ //! the box is NOT VOID (see IsVoid()), otherwise the method returns
+ //! irrelevant result.
gp_XY CornerMax() const;
+ //! Query the square diagonal. If the box is VOID (see method IsVoid())
+ //! then a very big real value is returned.
Standard_Real SquareExtent() const;
+ //! Extend the Box by the absolute value of theDiff.
void Enlarge (const Standard_Real theDiff);
+ //! Limit the Box by the internals of theOtherBox.
+ //! Returns True if the limitation takes place, otherwise False
+ //! indicating that the boxes do not intersect.
Standard_EXPORT Standard_Boolean Limit (const Bnd_B2f& theOtherBox);
+ //! Transform the bounding box with the given transformation.
+ //! The resulting box will be larger if theTrsf contains rotation.
Standard_EXPORT Bnd_B2f Transformed (const gp_Trsf2d& theTrsf) const;
+ //! Check the given point for the inclusion in the Box.
+ //! Returns True if the point is outside.
Standard_Boolean IsOut (const gp_XY& thePnt) const;
+ //! Check a circle for the intersection with the current box.
+ //! Returns True if there is no intersection between boxes.
Standard_EXPORT Standard_Boolean IsOut (const gp_XY& theCenter, const Standard_Real theRadius, const Standard_Boolean isCircleHollow = Standard_False) const;
+ //! Check the given box for the intersection with the current box.
+ //! Returns True if there is no intersection between boxes.
Standard_Boolean IsOut (const Bnd_B2f& theOtherBox) const;
+ //! Check the given box oriented by the given transformation
+ //! for the intersection with the current box.
+ //! Returns True if there is no intersection between boxes.
Standard_EXPORT Standard_Boolean IsOut (const Bnd_B2f& theOtherBox, const gp_Trsf2d& theTrsf) const;
+ //! Check the given Line for the intersection with the current box.
+ //! Returns True if there is no intersection.
Standard_EXPORT Standard_Boolean IsOut (const gp_Ax2d& theLine) const;
+ //! Check the Segment defined by the couple of input points
+ //! for the intersection with the current box.
+ //! Returns True if there is no intersection.
Standard_EXPORT Standard_Boolean IsOut (const gp_XY& theP0, const gp_XY& theP1) const;
+ //! Check that the box 'this' is inside the given box 'theBox'. Returns
+ //! True if 'this' box is fully inside 'theBox'.
Standard_Boolean IsIn (const Bnd_B2f& theBox) const;
+ //! Check that the box 'this' is inside the given box 'theBox'
+ //! transformed by 'theTrsf'. Returns True if 'this' box is fully
+ //! inside the transformed 'theBox'.
Standard_EXPORT Standard_Boolean IsIn (const Bnd_B2f& theBox, const gp_Trsf2d& theTrsf) const;
+ //! Set the Center coordinates
void SetCenter (const gp_XY& theCenter);
+ //! Set the HSize (half-diagonal) coordinates.
+ //! All components of theHSize must be non-negative.
void SetHSize (const gp_XY& theHSize);
DEFINE_STANDARD_ALLOC
+ //! Empty constructor.
Bnd_B3d();
+ //! Constructor.
Bnd_B3d(const gp_XYZ& theCenter, const gp_XYZ& theHSize);
+ //! Returns True if the box is void (non-initialized).
Standard_Boolean IsVoid() const;
+ //! Reset the box data.
void Clear();
+ //! Update the box by a point.
Standard_EXPORT void Add (const gp_XYZ& thePnt);
+ //! Update the box by a point.
void Add (const gp_Pnt& thePnt);
+ //! Update the box by another box.
void Add (const Bnd_B3d& theBox);
+ //! Query the lower corner: (Center - HSize). You must make sure that
+ //! the box is NOT VOID (see IsVoid()), otherwise the method returns
+ //! irrelevant result.
gp_XYZ CornerMin() const;
+ //! Query the upper corner: (Center + HSize). You must make sure that
+ //! the box is NOT VOID (see IsVoid()), otherwise the method returns
+ //! irrelevant result.
gp_XYZ CornerMax() const;
+ //! Query the square diagonal. If the box is VOID (see method IsVoid())
+ //! then a very big real value is returned.
Standard_Real SquareExtent() const;
+ //! Extend the Box by the absolute value of theDiff.
void Enlarge (const Standard_Real theDiff);
+ //! Limit the Box by the internals of theOtherBox.
+ //! Returns True if the limitation takes place, otherwise False
+ //! indicating that the boxes do not intersect.
Standard_EXPORT Standard_Boolean Limit (const Bnd_B3d& theOtherBox);
+ //! Transform the bounding box with the given transformation.
+ //! The resulting box will be larger if theTrsf contains rotation.
Standard_EXPORT Bnd_B3d Transformed (const gp_Trsf& theTrsf) const;
+ //! Check the given point for the inclusion in the Box.
+ //! Returns True if the point is outside.
Standard_Boolean IsOut (const gp_XYZ& thePnt) const;
+ //! Check a sphere for the intersection with the current box.
+ //! Returns True if there is no intersection between boxes. If the
+ //! parameter 'IsSphereHollow' is True, then the intersection is not
+ //! reported for a box that is completely inside the sphere (otherwise
+ //! this method would report an intersection).
Standard_EXPORT Standard_Boolean IsOut (const gp_XYZ& theCenter, const Standard_Real theRadius, const Standard_Boolean isSphereHollow = Standard_False) const;
+ //! Check the given box for the intersection with the current box.
+ //! Returns True if there is no intersection between boxes.
Standard_Boolean IsOut (const Bnd_B3d& theOtherBox) const;
+ //! Check the given box oriented by the given transformation
+ //! for the intersection with the current box.
+ //! Returns True if there is no intersection between boxes.
Standard_EXPORT Standard_Boolean IsOut (const Bnd_B3d& theOtherBox, const gp_Trsf& theTrsf) const;
+ //! Check the given Line for the intersection with the current box.
+ //! Returns True if there is no intersection.
+ //! isRay==True means intersection check with the positive half-line
+ //! theOverthickness is the addition to the size of the current box
+ //! (may be negative). If positive, it can be treated as the thickness
+ //! of the line 'theLine' or the radius of the cylinder along 'theLine'
Standard_EXPORT Standard_Boolean IsOut (const gp_Ax1& theLine, const Standard_Boolean isRay = Standard_False, const Standard_Real theOverthickness = 0.0) const;
+ //! Check the given Plane for the intersection with the current box.
+ //! Returns True if there is no intersection.
Standard_EXPORT Standard_Boolean IsOut (const gp_Ax3& thePlane) const;
+ //! Check that the box 'this' is inside the given box 'theBox'. Returns
+ //! True if 'this' box is fully inside 'theBox'.
Standard_Boolean IsIn (const Bnd_B3d& theBox) const;
+ //! Check that the box 'this' is inside the given box 'theBox'
+ //! transformed by 'theTrsf'. Returns True if 'this' box is fully
+ //! inside the transformed 'theBox'.
Standard_EXPORT Standard_Boolean IsIn (const Bnd_B3d& theBox, const gp_Trsf& theTrsf) const;
+ //! Set the Center coordinates
void SetCenter (const gp_XYZ& theCenter);
+ //! Set the HSize (half-diagonal) coordinates.
+ //! All components of theHSize must be non-negative.
void SetHSize (const gp_XYZ& theHSize);
DEFINE_STANDARD_ALLOC
+ //! Empty constructor.
Bnd_B3f();
+ //! Constructor.
Bnd_B3f(const gp_XYZ& theCenter, const gp_XYZ& theHSize);
+ //! Returns True if the box is void (non-initialized).
Standard_Boolean IsVoid() const;
+ //! Reset the box data.
void Clear();
+ //! Update the box by a point.
Standard_EXPORT void Add (const gp_XYZ& thePnt);
+ //! Update the box by a point.
void Add (const gp_Pnt& thePnt);
+ //! Update the box by another box.
void Add (const Bnd_B3f& theBox);
+ //! Query the lower corner: (Center - HSize). You must make sure that
+ //! the box is NOT VOID (see IsVoid()), otherwise the method returns
+ //! irrelevant result.
gp_XYZ CornerMin() const;
+ //! Query the upper corner: (Center + HSize). You must make sure that
+ //! the box is NOT VOID (see IsVoid()), otherwise the method returns
+ //! irrelevant result.
gp_XYZ CornerMax() const;
+ //! Query the square diagonal. If the box is VOID (see method IsVoid())
+ //! then a very big real value is returned.
Standard_Real SquareExtent() const;
+ //! Extend the Box by the absolute value of theDiff.
void Enlarge (const Standard_Real theDiff);
+ //! Limit the Box by the internals of theOtherBox.
+ //! Returns True if the limitation takes place, otherwise False
+ //! indicating that the boxes do not intersect.
Standard_EXPORT Standard_Boolean Limit (const Bnd_B3f& theOtherBox);
+ //! Transform the bounding box with the given transformation.
+ //! The resulting box will be larger if theTrsf contains rotation.
Standard_EXPORT Bnd_B3f Transformed (const gp_Trsf& theTrsf) const;
+ //! Check the given point for the inclusion in the Box.
+ //! Returns True if the point is outside.
Standard_Boolean IsOut (const gp_XYZ& thePnt) const;
+ //! Check a sphere for the intersection with the current box.
+ //! Returns True if there is no intersection between boxes. If the
+ //! parameter 'IsSphereHollow' is True, then the intersection is not
+ //! reported for a box that is completely inside the sphere (otherwise
+ //! this method would report an intersection).
Standard_EXPORT Standard_Boolean IsOut (const gp_XYZ& theCenter, const Standard_Real theRadius, const Standard_Boolean isSphereHollow = Standard_False) const;
+ //! Check the given box for the intersection with the current box.
+ //! Returns True if there is no intersection between boxes.
Standard_Boolean IsOut (const Bnd_B3f& theOtherBox) const;
+ //! Check the given box oriented by the given transformation
+ //! for the intersection with the current box.
+ //! Returns True if there is no intersection between boxes.
Standard_EXPORT Standard_Boolean IsOut (const Bnd_B3f& theOtherBox, const gp_Trsf& theTrsf) const;
+ //! Check the given Line for the intersection with the current box.
+ //! Returns True if there is no intersection.
+ //! isRay==True means intersection check with the positive half-line
+ //! theOverthickness is the addition to the size of the current box
+ //! (may be negative). If positive, it can be treated as the thickness
+ //! of the line 'theLine' or the radius of the cylinder along 'theLine'
Standard_EXPORT Standard_Boolean IsOut (const gp_Ax1& theLine, const Standard_Boolean isRay = Standard_False, const Standard_Real theOverthickness = 0.0) const;
+ //! Check the given Plane for the intersection with the current box.
+ //! Returns True if there is no intersection.
Standard_EXPORT Standard_Boolean IsOut (const gp_Ax3& thePlane) const;
+ //! Check that the box 'this' is inside the given box 'theBox'. Returns
+ //! True if 'this' box is fully inside 'theBox'.
Standard_Boolean IsIn (const Bnd_B3f& theBox) const;
+ //! Check that the box 'this' is inside the given box 'theBox'
+ //! transformed by 'theTrsf'. Returns True if 'this' box is fully
+ //! inside the transformed 'theBox'.
Standard_EXPORT Standard_Boolean IsIn (const Bnd_B3f& theBox, const gp_Trsf& theTrsf) const;
+ //! Set the Center coordinates
void SetCenter (const gp_XYZ& theCenter);
+ //! Set the HSize (half-diagonal) coordinates.
+ //! All components of theHSize must be non-negative.
void SetHSize (const gp_XYZ& theHSize);
public:
+ //! Creates an empty GenHCurve.
Standard_EXPORT ChFiDS_HElSpine();
+ //! Creates a GenHCurve from a Curve
Standard_EXPORT ChFiDS_HElSpine(const ChFiDS_ElSpine& C);
+ //! Sets the field of the GenHCurve.
Standard_EXPORT void Set (const ChFiDS_ElSpine& C);
+ //! Returns the curve used to create the GenHCurve.
+ //! This is redefined from HCurve, cannot be inline.
Standard_EXPORT const Adaptor3d_Curve& Curve() const;
+ //! Returns the curve used to create the GenHCurve.
+ //! This is redefined from HCurve, cannot be inline.
Standard_EXPORT Adaptor3d_Curve& GetCurve();
+ //! Returns the curve used to create the GenHCurve.
ChFiDS_ElSpine& ChangeCurve();
DEFINE_STANDARD_ALLOC
+ //! Constructs an empty sequence.
+ //! Use:
+ //! - the function Append or Prepend to add an item or
+ //! a collection of items at the end, or at the beginning of the sequence,
+ //! - the function InsertAfter or InsertBefore to add an
+ //! item or a collection of items at any position in the sequence,
+ //! - operator() or the function SetValue to assign a
+ //! new value to an item of the sequence,
+ //! - operator() to read an item of the sequence,
+ //! - the function Remove to remove an item at any
+ //! position in the sequence.
+ //! Warning
+ //! To copy a sequence, you must explicitly call the
+ //! assignment operator (operator=).
Contap_SequenceOfIWLineOfTheIWalking();
+ //! Creation by copy of existing Sequence.
Standard_EXPORT Contap_SequenceOfIWLineOfTheIWalking(const Contap_SequenceOfIWLineOfTheIWalking& Other);
+ //! Removes all element(s) of the sequence <me>
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = ()
Standard_EXPORT void Clear();
~Contap_SequenceOfIWLineOfTheIWalking()
{
Clear();
}
+ //! Copies the contents of the sequence Other into this sequence.
+ //! If this sequence is not empty, it is automatically cleared before the copy.
Standard_EXPORT const Contap_SequenceOfIWLineOfTheIWalking& Assign (const Contap_SequenceOfIWLineOfTheIWalking& Other);
const Contap_SequenceOfIWLineOfTheIWalking& operator = (const Contap_SequenceOfIWLineOfTheIWalking& Other)
{
return Assign(Other);
}
+ //! Appends <T> at the end of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C T)
Standard_EXPORT void Append (const Handle(Contap_TheIWLineOfTheIWalking)& T);
+ //! Concatenates <S> at the end of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void Append (Contap_SequenceOfIWLineOfTheIWalking& S);
+ //! Add <T> at the beginning of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (T A B C )
Standard_EXPORT void Prepend (const Handle(Contap_TheIWLineOfTheIWalking)& T);
+ //! Concatenates <S> at the beginning of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C) S = (D E F)
+ //! after me = (D E F A B C)
+ //! S = ()
void Prepend (Contap_SequenceOfIWLineOfTheIWalking& S);
+ //! Inserts <T> in <me> before the position <Index>.
+ //! Raises an exception if the index is out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B D), Index = 3, T = C
+ //! after
+ //! me = (A B C D )
void InsertBefore (const Standard_Integer Index, const Handle(Contap_TheIWLineOfTheIWalking)& T);
+ //! Inserts the sequence <S> in <me> before
+ //! the position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B F), Index = 3, S = (C D E)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertBefore (const Standard_Integer Index, Contap_SequenceOfIWLineOfTheIWalking& S);
+ //! Inserts <T> in <me> after the position <Index>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, T = D
+ //! after
+ //! me = (A B C D)
Standard_EXPORT void InsertAfter (const Standard_Integer Index, const Handle(Contap_TheIWLineOfTheIWalking)& T);
+ //! Inserts the sequence <S> in <me> after the
+ //! position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bound.
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertAfter (const Standard_Integer Index, Contap_SequenceOfIWLineOfTheIWalking& S);
+ //! Returns the first element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns A
Standard_EXPORT const Handle(Contap_TheIWLineOfTheIWalking)& First() const;
+ //! Returns the last element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns C
Standard_EXPORT const Handle(Contap_TheIWLineOfTheIWalking)& Last() const;
+ //! Keeps in <me> the items 1 to <Index>-1 and
+ //! puts in <Sub> the items <Index> to the end.
+ //! Example:
+ //! before
+ //! me = (A B C D) ,Index = 3
+ //! after
+ //! me = (A B)
+ //! Sub = (C D)
void Split (const Standard_Integer Index, Contap_SequenceOfIWLineOfTheIWalking& Sub);
+ //! Returns the Item at position <Index> in <me>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT const Handle(Contap_TheIWLineOfTheIWalking)& Value (const Standard_Integer Index) const;
const Handle(Contap_TheIWLineOfTheIWalking)& operator() (const Standard_Integer Index) const
{
return Value(Index);
}
+ //! Changes the item at position <Index>
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1, Item = D
+ //! after
+ //! me = (D B C)
Standard_EXPORT void SetValue (const Standard_Integer Index, const Handle(Contap_TheIWLineOfTheIWalking)& I);
+ //! Returns the Item at position <Index> in
+ //! <me>. This method may be used to modify
+ //! <me> : S.Value(Index) = Item.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT Handle(Contap_TheIWLineOfTheIWalking)& ChangeValue (const Standard_Integer Index);
Handle(Contap_TheIWLineOfTheIWalking)& operator() (const Standard_Integer Index)
{
return ChangeValue(Index);
}
+ //! Removes from <me> the item at position <Index>.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3
+ //! after
+ //! me = (A B)
Standard_EXPORT void Remove (const Standard_Integer Index);
+ //! Removes from <me> all the items of
+ //! positions between <FromIndex> and <ToIndex>.
+ //! Raises an exception if the indices are out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B C D E F), FromIndex = 1 ToIndex = 3
+ //! after
+ //! me = (D E F)
Standard_EXPORT void Remove (const Standard_Integer FromIndex, const Standard_Integer ToIndex);
DEFINE_STANDARD_ALLOC
+ //! Constructs an empty sequence.
+ //! Use:
+ //! - the function Append or Prepend to add an item or
+ //! a collection of items at the end, or at the beginning of the sequence,
+ //! - the function InsertAfter or InsertBefore to add an
+ //! item or a collection of items at any position in the sequence,
+ //! - operator() or the function SetValue to assign a
+ //! new value to an item of the sequence,
+ //! - operator() to read an item of the sequence,
+ //! - the function Remove to remove an item at any
+ //! position in the sequence.
+ //! Warning
+ //! To copy a sequence, you must explicitly call the
+ //! assignment operator (operator=).
Contap_SequenceOfPathPointOfTheSearch();
+ //! Creation by copy of existing Sequence.
Standard_EXPORT Contap_SequenceOfPathPointOfTheSearch(const Contap_SequenceOfPathPointOfTheSearch& Other);
+ //! Removes all element(s) of the sequence <me>
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = ()
Standard_EXPORT void Clear();
~Contap_SequenceOfPathPointOfTheSearch()
{
Clear();
}
+ //! Copies the contents of the sequence Other into this sequence.
+ //! If this sequence is not empty, it is automatically cleared before the copy.
Standard_EXPORT const Contap_SequenceOfPathPointOfTheSearch& Assign (const Contap_SequenceOfPathPointOfTheSearch& Other);
const Contap_SequenceOfPathPointOfTheSearch& operator = (const Contap_SequenceOfPathPointOfTheSearch& Other)
{
return Assign(Other);
}
+ //! Appends <T> at the end of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C T)
Standard_EXPORT void Append (const Contap_ThePathPointOfTheSearch& T);
+ //! Concatenates <S> at the end of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void Append (Contap_SequenceOfPathPointOfTheSearch& S);
+ //! Add <T> at the beginning of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (T A B C )
Standard_EXPORT void Prepend (const Contap_ThePathPointOfTheSearch& T);
+ //! Concatenates <S> at the beginning of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C) S = (D E F)
+ //! after me = (D E F A B C)
+ //! S = ()
void Prepend (Contap_SequenceOfPathPointOfTheSearch& S);
+ //! Inserts <T> in <me> before the position <Index>.
+ //! Raises an exception if the index is out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B D), Index = 3, T = C
+ //! after
+ //! me = (A B C D )
void InsertBefore (const Standard_Integer Index, const Contap_ThePathPointOfTheSearch& T);
+ //! Inserts the sequence <S> in <me> before
+ //! the position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B F), Index = 3, S = (C D E)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertBefore (const Standard_Integer Index, Contap_SequenceOfPathPointOfTheSearch& S);
+ //! Inserts <T> in <me> after the position <Index>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, T = D
+ //! after
+ //! me = (A B C D)
Standard_EXPORT void InsertAfter (const Standard_Integer Index, const Contap_ThePathPointOfTheSearch& T);
+ //! Inserts the sequence <S> in <me> after the
+ //! position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bound.
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertAfter (const Standard_Integer Index, Contap_SequenceOfPathPointOfTheSearch& S);
+ //! Returns the first element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns A
Standard_EXPORT const Contap_ThePathPointOfTheSearch& First() const;
+ //! Returns the last element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns C
Standard_EXPORT const Contap_ThePathPointOfTheSearch& Last() const;
+ //! Keeps in <me> the items 1 to <Index>-1 and
+ //! puts in <Sub> the items <Index> to the end.
+ //! Example:
+ //! before
+ //! me = (A B C D) ,Index = 3
+ //! after
+ //! me = (A B)
+ //! Sub = (C D)
void Split (const Standard_Integer Index, Contap_SequenceOfPathPointOfTheSearch& Sub);
+ //! Returns the Item at position <Index> in <me>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT const Contap_ThePathPointOfTheSearch& Value (const Standard_Integer Index) const;
const Contap_ThePathPointOfTheSearch& operator() (const Standard_Integer Index) const
{
return Value(Index);
}
+ //! Changes the item at position <Index>
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1, Item = D
+ //! after
+ //! me = (D B C)
Standard_EXPORT void SetValue (const Standard_Integer Index, const Contap_ThePathPointOfTheSearch& I);
+ //! Returns the Item at position <Index> in
+ //! <me>. This method may be used to modify
+ //! <me> : S.Value(Index) = Item.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT Contap_ThePathPointOfTheSearch& ChangeValue (const Standard_Integer Index);
Contap_ThePathPointOfTheSearch& operator() (const Standard_Integer Index)
{
return ChangeValue(Index);
}
+ //! Removes from <me> the item at position <Index>.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3
+ //! after
+ //! me = (A B)
Standard_EXPORT void Remove (const Standard_Integer Index);
+ //! Removes from <me> all the items of
+ //! positions between <FromIndex> and <ToIndex>.
+ //! Raises an exception if the indices are out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B C D E F), FromIndex = 1 ToIndex = 3
+ //! after
+ //! me = (D E F)
Standard_EXPORT void Remove (const Standard_Integer FromIndex, const Standard_Integer ToIndex);
DEFINE_STANDARD_ALLOC
+ //! Constructs an empty sequence.
+ //! Use:
+ //! - the function Append or Prepend to add an item or
+ //! a collection of items at the end, or at the beginning of the sequence,
+ //! - the function InsertAfter or InsertBefore to add an
+ //! item or a collection of items at any position in the sequence,
+ //! - operator() or the function SetValue to assign a
+ //! new value to an item of the sequence,
+ //! - operator() to read an item of the sequence,
+ //! - the function Remove to remove an item at any
+ //! position in the sequence.
+ //! Warning
+ //! To copy a sequence, you must explicitly call the
+ //! assignment operator (operator=).
Contap_SequenceOfSegmentOfTheSearch();
+ //! Creation by copy of existing Sequence.
Standard_EXPORT Contap_SequenceOfSegmentOfTheSearch(const Contap_SequenceOfSegmentOfTheSearch& Other);
+ //! Removes all element(s) of the sequence <me>
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = ()
Standard_EXPORT void Clear();
~Contap_SequenceOfSegmentOfTheSearch()
{
Clear();
}
+ //! Copies the contents of the sequence Other into this sequence.
+ //! If this sequence is not empty, it is automatically cleared before the copy.
Standard_EXPORT const Contap_SequenceOfSegmentOfTheSearch& Assign (const Contap_SequenceOfSegmentOfTheSearch& Other);
const Contap_SequenceOfSegmentOfTheSearch& operator = (const Contap_SequenceOfSegmentOfTheSearch& Other)
{
return Assign(Other);
}
+ //! Appends <T> at the end of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C T)
Standard_EXPORT void Append (const Contap_TheSegmentOfTheSearch& T);
+ //! Concatenates <S> at the end of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void Append (Contap_SequenceOfSegmentOfTheSearch& S);
+ //! Add <T> at the beginning of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (T A B C )
Standard_EXPORT void Prepend (const Contap_TheSegmentOfTheSearch& T);
+ //! Concatenates <S> at the beginning of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C) S = (D E F)
+ //! after me = (D E F A B C)
+ //! S = ()
void Prepend (Contap_SequenceOfSegmentOfTheSearch& S);
+ //! Inserts <T> in <me> before the position <Index>.
+ //! Raises an exception if the index is out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B D), Index = 3, T = C
+ //! after
+ //! me = (A B C D )
void InsertBefore (const Standard_Integer Index, const Contap_TheSegmentOfTheSearch& T);
+ //! Inserts the sequence <S> in <me> before
+ //! the position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B F), Index = 3, S = (C D E)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertBefore (const Standard_Integer Index, Contap_SequenceOfSegmentOfTheSearch& S);
+ //! Inserts <T> in <me> after the position <Index>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, T = D
+ //! after
+ //! me = (A B C D)
Standard_EXPORT void InsertAfter (const Standard_Integer Index, const Contap_TheSegmentOfTheSearch& T);
+ //! Inserts the sequence <S> in <me> after the
+ //! position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bound.
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertAfter (const Standard_Integer Index, Contap_SequenceOfSegmentOfTheSearch& S);
+ //! Returns the first element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns A
Standard_EXPORT const Contap_TheSegmentOfTheSearch& First() const;
+ //! Returns the last element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns C
Standard_EXPORT const Contap_TheSegmentOfTheSearch& Last() const;
+ //! Keeps in <me> the items 1 to <Index>-1 and
+ //! puts in <Sub> the items <Index> to the end.
+ //! Example:
+ //! before
+ //! me = (A B C D) ,Index = 3
+ //! after
+ //! me = (A B)
+ //! Sub = (C D)
void Split (const Standard_Integer Index, Contap_SequenceOfSegmentOfTheSearch& Sub);
+ //! Returns the Item at position <Index> in <me>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT const Contap_TheSegmentOfTheSearch& Value (const Standard_Integer Index) const;
const Contap_TheSegmentOfTheSearch& operator() (const Standard_Integer Index) const
{
return Value(Index);
}
+ //! Changes the item at position <Index>
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1, Item = D
+ //! after
+ //! me = (D B C)
Standard_EXPORT void SetValue (const Standard_Integer Index, const Contap_TheSegmentOfTheSearch& I);
+ //! Returns the Item at position <Index> in
+ //! <me>. This method may be used to modify
+ //! <me> : S.Value(Index) = Item.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT Contap_TheSegmentOfTheSearch& ChangeValue (const Standard_Integer Index);
Contap_TheSegmentOfTheSearch& operator() (const Standard_Integer Index)
{
return ChangeValue(Index);
}
+ //! Removes from <me> the item at position <Index>.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3
+ //! after
+ //! me = (A B)
Standard_EXPORT void Remove (const Standard_Integer Index);
+ //! Removes from <me> all the items of
+ //! positions between <FromIndex> and <ToIndex>.
+ //! Raises an exception if the indices are out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B C D E F), FromIndex = 1 ToIndex = 3
+ //! after
+ //! me = (D E F)
Standard_EXPORT void Remove (const Standard_Integer FromIndex, const Standard_Integer ToIndex);
Standard_EXPORT Contap_TheIWLineOfTheIWalking(const IntSurf_Allocator& theAllocator = 0);
+ //! reverse the points in the line. Hasfirst, HasLast are kept.
Standard_EXPORT void Reverse();
+ //! Cut the line at the point of rank Index.
void Cut (const Standard_Integer Index);
+ //! Add a point in the line.
void AddPoint (const IntSurf_PntOn2S& P);
void AddStatusFirst (const Standard_Boolean Closed, const Standard_Boolean HasFirst);
void AddStatusLast (const Standard_Boolean HasLast, const Standard_Integer Index, const IntSurf_PathPoint& P);
+ //! associer a l 'indice du point sur la ligne l'indice du point
+ //! passant dans l'iterateur de depart
void AddIndexPassing (const Standard_Integer Index);
void SetTangentVector (const gp_Vec& V, const Standard_Integer Index);
void SetTangencyAtEnd (const Standard_Boolean IsTangent);
+ //! Returns the number of points of the line (including first
+ //! point and end point : see HasLastPoint and HasFirstPoint).
Standard_Integer NbPoints() const;
+ //! Returns the point of range Index.
+ //! If index <= 0 or Index > NbPoints, an exception is raised.
const IntSurf_PntOn2S& Value (const Standard_Integer Index) const;
+ //! Returns the LineOn2S contained in the walking line.
const Handle(IntSurf_LineOn2S)& Line() const;
+ //! Returns True if the line is closed.
Standard_Boolean IsClosed() const;
+ //! Returns True if the first point of the line is a
+ //! marching point . when is HasFirstPoint==False ,the line
+ //! begins on the natural bound of the surface.the line can be
+ //! too long
Standard_Boolean HasFirstPoint() const;
+ //! Returns True if the end point of the line is a
+ //! marching point (Point from IntWS).
+ //! when is HasFirstPoint==False ,the line ends
+ //! on the natural bound of the surface.the line can be
+ //! too long.
Standard_Boolean HasLastPoint() const;
+ //! Returns the first point of the line when it is a
+ //! marching point.
+ //! An exception is raised if HasFirstPoint returns False.
const IntSurf_PathPoint& FirstPoint() const;
+ //! Returns the Index of first point of the line when it is a
+ //! marching point.This index is the index in the
+ //! PointStartIterator.
+ //! An exception is raised if HasFirstPoint returns False.
Standard_Integer FirstPointIndex() const;
+ //! Returns the last point of the line when it is a
+ //! marching point.
+ //! An exception is raised if HasLastPoint returns False.
const IntSurf_PathPoint& LastPoint() const;
+ //! Returns the index of last point of the line when it is a
+ //! marching point.This index is the index in the
+ //! PointStartIterator.
+ //! An exception is raised if HasLastPoint returns False.
Standard_Integer LastPointIndex() const;
+ //! returns the number of points belonging to Pnts1 which are
+ //! passing point.
Standard_Integer NbPassingPoint() const;
+ //! returns the index of the point belonging to the line which
+ //! is associated to the passing point belonging to Pnts1
+ //! an exception is raised if Index > NbPassingPoint()
void PassingPoint (const Standard_Integer Index, Standard_Integer& IndexLine, Standard_Integer& IndexPnts) const;
const gp_Vec& TangentVector (Standard_Integer& Index) const;
DEFINE_STANDARD_ALLOC
+ //! Deflection is the maximum deflection admitted between two
+ //! consecutive points on a resulting polyline.
+ //! Step is the maximum increment admitted between two
+ //! consecutive points (in 2d space).
+ //! Epsilon is the tolerance beyond which 2 points
+ //! are confused.
Standard_EXPORT Contap_TheIWalking(const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Step);
+ //! Deflection is the maximum deflection admitted between two
+ //! consecutive points on a resulting polyline.
+ //! Step is the maximum increment admitted between two
+ //! consecutive points (in 2d space).
+ //! Epsilon is the tolerance beyond which 2 points
+ //! are confused
void SetTolerance (const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Step);
+ //! Searches a set of polylines starting on a point of Pnts1
+ //! or Pnts2.
+ //! Each point on a resulting polyline verifies F(u,v)=0
Standard_EXPORT void Perform (const IntSurf_SequenceOfPathPoint& Pnts1, const IntSurf_SequenceOfInteriorPoint& Pnts2, Contap_SurfFunction& Func, const Handle(Adaptor3d_HSurface)& S, const Standard_Boolean Reversed = Standard_False);
+ //! Searches a set of polylines starting on a point of Pnts1.
+ //! Each point on a resulting polyline verifies F(u,v)=0
Standard_EXPORT void Perform (const IntSurf_SequenceOfPathPoint& Pnts1, Contap_SurfFunction& Func, const Handle(Adaptor3d_HSurface)& S, const Standard_Boolean Reversed = Standard_False);
+ //! Returns true if the calculus was successful.
Standard_Boolean IsDone() const;
+ //! Returns the number of resulting polylines.
+ //! An exception is raised if IsDone returns False.
Standard_Integer NbLines() const;
+ //! Returns the polyline of range Index.
+ //! An exception is raised if IsDone is False.
+ //! An exception is raised if Index<=0 or Index>NbLines.
const Handle(Contap_TheIWLineOfTheIWalking)& Value (const Standard_Integer Index) const;
+ //! Returns the number of points belonging to Pnts on which no
+ //! line starts or ends.
+ //! An exception is raised if IsDone returns False.
Standard_Integer NbSinglePnts() const;
+ //! Returns the point of range Index .
+ //! An exception is raised if IsDone returns False.
+ //! An exception is raised if Index<=0 or
+ //! Index > NbSinglePnts.
const IntSurf_PathPoint& SinglePnt (const Standard_Integer Index) const;
Standard_EXPORT void MakeWalkingPoint (const Standard_Integer Case, const Standard_Real U, const Standard_Real V, Contap_SurfFunction& Section, IntSurf_PntOn2S& Psol);
+ //! Clears up internal containers
Standard_EXPORT void Clear();
DEFINE_STANDARD_ALLOC
+ //! Empty constructor.
Standard_EXPORT Contap_TheSearch();
+ //! Algorithm to find the points and parts of curves of Domain
+ //! (domain of of restriction of a surface) which verify
+ //! F = 0.
+ //! TolBoundary defines if a curve is on Q.
+ //! TolTangency defines if a point is on Q.
Standard_EXPORT void Perform (Contap_ArcFunction& F, const Handle(Adaptor3d_TopolTool)& Domain, const Standard_Real TolBoundary, const Standard_Real TolTangency, const Standard_Boolean RecheckOnRegularity = Standard_False);
+ //! Returns True if the calculus was successful.
Standard_Boolean IsDone() const;
+ //! Returns true if all arc of the Arcs are solution (inside
+ //! the surface).
+ //! An exception is raised if IsDone returns False.
Standard_Boolean AllArcSolution() const;
+ //! Returns the number of resulting points.
+ //! An exception is raised if IsDone returns False (NotDone).
Standard_Integer NbPoints() const;
+ //! Returns the resulting point of range Index.
+ //! The exception NotDone is raised if IsDone() returns
+ //! False.
+ //! The exception OutOfRange is raised if
+ //! Index <= 0 or Index > NbPoints.
const Contap_ThePathPointOfTheSearch& Point (const Standard_Integer Index) const;
+ //! Returns the number of the resulting segments.
+ //! An exception is raised if IsDone returns False (NotDone).
Standard_Integer NbSegments() const;
+ //! Returns the resulting segment of range Index.
+ //! The exception NotDone is raised if IsDone() returns
+ //! False.
+ //! The exception OutOfRange is raised if
+ //! Index <= 0 or Index > NbPoints.
const Contap_TheSegmentOfTheSearch& Segment (const Standard_Integer Index) const;
Standard_Boolean IsDone() const;
+ //! Returns the number of points.
+ //! The exception NotDone if raised if IsDone
+ //! returns False.
Standard_Integer NbPoints() const;
+ //! Returns the point of range Index.
+ //! The exception NotDone if raised if IsDone
+ //! returns False.
+ //! The exception OutOfRange if raised if
+ //! Index <= 0 or Index > NbPoints.
const IntSurf_InteriorPoint& Value (const Standard_Integer Index) const;
DEFINE_STANDARD_ALLOC
+ //! Empty constructor.
Standard_EXPORT Contap_TheSegmentOfTheSearch();
+ //! Defines the concerned arc.
void SetValue (const Handle(Adaptor2d_HCurve2d)& A);
+ //! Defines the first point or the last point,
+ //! depending on the value of the boolean First.
Standard_EXPORT void SetLimitPoint (const Contap_ThePathPointOfTheSearch& V, const Standard_Boolean First);
+ //! Returns the geometric curve on the surface 's domain
+ //! which is solution.
const Handle(Adaptor2d_HCurve2d)& Curve() const;
+ //! Returns True if there is a vertex (ThePathPoint) defining
+ //! the lowest valid parameter on the arc.
Standard_Boolean HasFirstPoint() const;
+ //! Returns the first point.
const Contap_ThePathPointOfTheSearch& FirstPoint() const;
+ //! Returns True if there is a vertex (ThePathPoint) defining
+ //! the greatest valid parameter on the arc.
Standard_Boolean HasLastPoint() const;
+ //! Returns the last point.
const Contap_ThePathPointOfTheSearch& LastPoint() const;
public:
+ //! Creates a Dictionary cell.
+ //! A Dictionary is always created then handled by its first cell
+ //! After creating a Dictionary, user can call methods HasItem,
+ //! Item, SetItem ... (internal cells and entries are also
+ //! defined as objects from the same class)
+ //! Also iteration can be made, by an Iterator on this Dictionary
Standard_EXPORT Dico_DictionaryOfInteger();
+ //! Returns True if an Item is bound to a Name in the Dictionnary
+ //! <exact> : if True, commands exact matching
+ //! if False, accept completion, only if ONE AND ONLY ONE
+ //! Dictionnary Entry has <name> as beginning of its name
Standard_EXPORT Standard_Boolean HasItem (const Standard_CString name, const Standard_Boolean exact = Standard_False) const;
+ //! Works as above method but accepts a String from TCollection
Standard_EXPORT Standard_Boolean HasItem (const TCollection_AsciiString& name, const Standard_Boolean exact = Standard_True) const;
+ //! Returns item bound to a name in the Dictionnary
+ //! <exact> : same as for HasItem
Standard_EXPORT const Standard_Integer& Item (const Standard_CString name, const Standard_Boolean exact = Standard_True) const;
+ //! Works as above method but accepts a String from TCollection
Standard_EXPORT const Standard_Integer& Item (const TCollection_AsciiString& name, const Standard_Boolean exact = Standard_True) const;
+ //! Gathers HasItem and Item, in a less regular but faster way
+ //! If return is True, <anitem> is returned too, else it is not
+ //! <exact> : same as for HasItem
Standard_EXPORT Standard_Boolean GetItem (const Standard_CString name, Standard_Integer& anitem, const Standard_Boolean exact = Standard_True) const;
+ //! Works as above method but accepts a String from TCollection
Standard_EXPORT Standard_Boolean GetItem (const TCollection_AsciiString& name, Standard_Integer& anitem, const Standard_Boolean exact = Standard_True) const;
+ //! Binds an item to a dictionnary entry
+ //! If <name> is already known in the dictionary, its value
+ //! is changed. Else, the dictionary entry is created.
+ //! If <exact> is given False, completion is tried, it is accepted
+ //! If it gives a UNIQUE entry : hence this one will be modified
+ //! Else, new entry is created with the exact name given
Standard_EXPORT void SetItem (const Standard_CString name, const Standard_Integer& anitem, const Standard_Boolean exact = Standard_True);
+ //! Works as above method but accepts a String from TCollection
Standard_EXPORT void SetItem (const TCollection_AsciiString& name, const Standard_Integer& anitem, const Standard_Boolean exact = Standard_True);
+ //! Returns the Item AS AN ADDRESS which corresponds to a Name,
+ //! in order to be changed or set.
+ //! If this name is not yet recorded, the Dictionary creates it.
+ //! <isvalued> is returned True if the Item is recorded in the
+ //! Dictionary, False else, in that case the Item is reserved and
+ //! the name is noted as beeing valued now.
Standard_EXPORT Standard_Integer& NewItem (const Standard_CString name, Standard_Boolean& isvalued, const Standard_Boolean exact = Standard_True);
+ //! Works as above method but accepts a String from TCollection
Standard_EXPORT Standard_Integer& NewItem (const TCollection_AsciiString& name, Standard_Boolean& isvalued, const Standard_Boolean exact = Standard_True);
+ //! Removes a dictionary entry given by its name then Returns True
+ //! If the entry does not exists, Does nothing then Returns False
+ //! <exact> : as for HasItem, if completion works, the found entry
+ //! is removed (else returned value is False)
+ //! <cln> commands cleaning dictionary (to recover memory space)
+ //! For an isolated call, it is recommanded to give it at True
+ //! For a sequence of calls, rather give False, then call Clean
Standard_EXPORT Standard_Boolean RemoveItem (const Standard_CString name, const Standard_Boolean cln = Standard_True, const Standard_Boolean exact = Standard_True);
+ //! Works as above method but accepts a String from TCollection
Standard_EXPORT Standard_Boolean RemoveItem (const TCollection_AsciiString& name, const Standard_Boolean cln = Standard_True, const Standard_Boolean exact = Standard_True);
+ //! Deletes physically in one step the entries which were removed
+ //! (can be used for a more efficient Memory Management : first
+ //! Remove several Items (<cln> = False), then Clean the Memory)
Standard_EXPORT void Clean();
+ //! Returns True if no Item is recorded
Standard_EXPORT Standard_Boolean IsEmpty() const;
+ //! Clears all the Dictionary : all recorded Items are removed
Standard_EXPORT void Clear();
+ //! Copies the Dictionary as a Tree, without Copying the Items
Standard_EXPORT Handle(Dico_DictionaryOfInteger) Copy() const;
+ //! Internal routine used for completion (returns True if success)
Standard_EXPORT Standard_Boolean Complete (Handle(Dico_DictionaryOfInteger)& acell) const;
private:
+ //! Defines cell's character (internal use, to build dict. tree)
Standard_EXPORT void SetChar (const Standard_Character car);
+ //! Returns True if this cell has a subcell
Standard_EXPORT Standard_Boolean HasSub() const;
+ //! Returns subcell
Standard_EXPORT Handle(Dico_DictionaryOfInteger) Sub() const;
+ //! Returns True if this cell has a next cell
Standard_EXPORT Standard_Boolean HasNext() const;
+ //! Returns next cell
Standard_EXPORT Handle(Dico_DictionaryOfInteger) Next() const;
+ //! Defines subcell
Standard_EXPORT void SetSub (const Handle(Dico_DictionaryOfInteger)& acell);
+ //! Defines next cell
Standard_EXPORT void SetNext (const Handle(Dico_DictionaryOfInteger)& acell);
+ //! Internal method used to get an entry from a given name
Standard_EXPORT void SearchCell (const Standard_CString name, const Standard_Size lmax, const Standard_Character car, const Standard_Size level, Handle(Dico_DictionaryOfInteger)& acell, Standard_Size& reslev, Standard_Integer& stat) const;
+ //! Internal method used to create a new entry for a name
Standard_EXPORT void NewCell (const Standard_CString name, const Standard_Size namlen, Handle(Dico_DictionaryOfInteger)& acell, const Standard_Size reslev, const Standard_Integer stat);
+ //! Returns True if a cell has an associated item value
Standard_EXPORT Standard_Boolean HasIt() const;
+ //! Returns item value associated to a cell
Standard_EXPORT const Standard_Integer& It() const;
+ //! Returns item address associated to a cell
Standard_EXPORT Standard_Integer& ItAdr();
+ //! Binds an item value to a cell
Standard_EXPORT void SetIt (const Standard_Integer& anitem);
+ //! Declares a cell as Valued : used by NewItem (when an Item
+ //! is created if it did not exist and is returned)
Standard_EXPORT void DeclIt();
+ //! Removes item bound to a cell (cancels effect of DeclIt)
Standard_EXPORT void RemoveIt();
+ //! Returns cell's character as a node feature
Standard_EXPORT Standard_Character CellChar() const;
+ //! Performs Copy from an original <fromcell> to <me>
+ //! Called by Copy
Standard_EXPORT void GetCopied (const Handle(Dico_DictionaryOfInteger)& fromcell);
Standard_Character thecars[4];
public:
+ //! Creates a Dictionary cell.
+ //! A Dictionary is always created then handled by its first cell
+ //! After creating a Dictionary, user can call methods HasItem,
+ //! Item, SetItem ... (internal cells and entries are also
+ //! defined as objects from the same class)
+ //! Also iteration can be made, by an Iterator on this Dictionary
Standard_EXPORT Dico_DictionaryOfTransient();
+ //! Returns True if an Item is bound to a Name in the Dictionnary
+ //! <exact> : if True, commands exact matching
+ //! if False, accept completion, only if ONE AND ONLY ONE
+ //! Dictionnary Entry has <name> as beginning of its name
Standard_EXPORT Standard_Boolean HasItem (const Standard_CString name, const Standard_Boolean exact = Standard_False) const;
+ //! Works as above method but accepts a String from TCollection
Standard_EXPORT Standard_Boolean HasItem (const TCollection_AsciiString& name, const Standard_Boolean exact = Standard_True) const;
+ //! Returns item bound to a name in the Dictionnary
+ //! <exact> : same as for HasItem
Standard_EXPORT const Handle(Standard_Transient)& Item (const Standard_CString name, const Standard_Boolean exact = Standard_True) const;
+ //! Works as above method but accepts a String from TCollection
Standard_EXPORT const Handle(Standard_Transient)& Item (const TCollection_AsciiString& name, const Standard_Boolean exact = Standard_True) const;
+ //! Gathers HasItem and Item, in a less regular but faster way
+ //! If return is True, <anitem> is returned too, else it is not
+ //! <exact> : same as for HasItem
Standard_EXPORT Standard_Boolean GetItem (const Standard_CString name, Handle(Standard_Transient)& anitem, const Standard_Boolean exact = Standard_True) const;
+ //! Works as above method but accepts a String from TCollection
Standard_EXPORT Standard_Boolean GetItem (const TCollection_AsciiString& name, Handle(Standard_Transient)& anitem, const Standard_Boolean exact = Standard_True) const;
+ //! Binds an item to a dictionnary entry
+ //! If <name> is already known in the dictionary, its value
+ //! is changed. Else, the dictionary entry is created.
+ //! If <exact> is given False, completion is tried, it is accepted
+ //! If it gives a UNIQUE entry : hence this one will be modified
+ //! Else, new entry is created with the exact name given
Standard_EXPORT void SetItem (const Standard_CString name, const Handle(Standard_Transient)& anitem, const Standard_Boolean exact = Standard_True);
+ //! Works as above method but accepts a String from TCollection
Standard_EXPORT void SetItem (const TCollection_AsciiString& name, const Handle(Standard_Transient)& anitem, const Standard_Boolean exact = Standard_True);
+ //! Returns the Item AS AN ADDRESS which corresponds to a Name,
+ //! in order to be changed or set.
+ //! If this name is not yet recorded, the Dictionary creates it.
+ //! <isvalued> is returned True if the Item is recorded in the
+ //! Dictionary, False else, in that case the Item is reserved and
+ //! the name is noted as beeing valued now.
Standard_EXPORT Handle(Standard_Transient)& NewItem (const Standard_CString name, Standard_Boolean& isvalued, const Standard_Boolean exact = Standard_True);
+ //! Works as above method but accepts a String from TCollection
Standard_EXPORT Handle(Standard_Transient)& NewItem (const TCollection_AsciiString& name, Standard_Boolean& isvalued, const Standard_Boolean exact = Standard_True);
+ //! Removes a dictionary entry given by its name then Returns True
+ //! If the entry does not exists, Does nothing then Returns False
+ //! <exact> : as for HasItem, if completion works, the found entry
+ //! is removed (else returned value is False)
+ //! <cln> commands cleaning dictionary (to recover memory space)
+ //! For an isolated call, it is recommanded to give it at True
+ //! For a sequence of calls, rather give False, then call Clean
Standard_EXPORT Standard_Boolean RemoveItem (const Standard_CString name, const Standard_Boolean cln = Standard_True, const Standard_Boolean exact = Standard_True);
+ //! Works as above method but accepts a String from TCollection
Standard_EXPORT Standard_Boolean RemoveItem (const TCollection_AsciiString& name, const Standard_Boolean cln = Standard_True, const Standard_Boolean exact = Standard_True);
+ //! Deletes physically in one step the entries which were removed
+ //! (can be used for a more efficient Memory Management : first
+ //! Remove several Items (<cln> = False), then Clean the Memory)
Standard_EXPORT void Clean();
+ //! Returns True if no Item is recorded
Standard_EXPORT Standard_Boolean IsEmpty() const;
+ //! Clears all the Dictionary : all recorded Items are removed
Standard_EXPORT void Clear();
+ //! Copies the Dictionary as a Tree, without Copying the Items
Standard_EXPORT Handle(Dico_DictionaryOfTransient) Copy() const;
+ //! Internal routine used for completion (returns True if success)
Standard_EXPORT Standard_Boolean Complete (Handle(Dico_DictionaryOfTransient)& acell) const;
private:
+ //! Defines cell's character (internal use, to build dict. tree)
Standard_EXPORT void SetChar (const Standard_Character car);
+ //! Returns True if this cell has a subcell
Standard_EXPORT Standard_Boolean HasSub() const;
+ //! Returns subcell
Standard_EXPORT Handle(Dico_DictionaryOfTransient) Sub() const;
+ //! Returns True if this cell has a next cell
Standard_EXPORT Standard_Boolean HasNext() const;
+ //! Returns next cell
Standard_EXPORT Handle(Dico_DictionaryOfTransient) Next() const;
+ //! Defines subcell
Standard_EXPORT void SetSub (const Handle(Dico_DictionaryOfTransient)& acell);
+ //! Defines next cell
Standard_EXPORT void SetNext (const Handle(Dico_DictionaryOfTransient)& acell);
+ //! Internal method used to get an entry from a given name
Standard_EXPORT void SearchCell (const Standard_CString name, const Standard_Size lmax, const Standard_Character car, const Standard_Size level, Handle(Dico_DictionaryOfTransient)& acell, Standard_Size& reslev, Standard_Integer& stat) const;
+ //! Internal method used to create a new entry for a name
Standard_EXPORT void NewCell (const Standard_CString name, const Standard_Size namlen, Handle(Dico_DictionaryOfTransient)& acell, const Standard_Size reslev, const Standard_Integer stat);
+ //! Returns True if a cell has an associated item value
Standard_EXPORT Standard_Boolean HasIt() const;
+ //! Returns item value associated to a cell
Standard_EXPORT const Handle(Standard_Transient)& It() const;
+ //! Returns item address associated to a cell
Standard_EXPORT Handle(Standard_Transient)& ItAdr();
+ //! Binds an item value to a cell
Standard_EXPORT void SetIt (const Handle(Standard_Transient)& anitem);
+ //! Declares a cell as Valued : used by NewItem (when an Item
+ //! is created if it did not exist and is returned)
Standard_EXPORT void DeclIt();
+ //! Removes item bound to a cell (cancels effect of DeclIt)
Standard_EXPORT void RemoveIt();
+ //! Returns cell's character as a node feature
Standard_EXPORT Standard_Character CellChar() const;
+ //! Performs Copy from an original <fromcell> to <me>
+ //! Called by Copy
Standard_EXPORT void GetCopied (const Handle(Dico_DictionaryOfTransient)& fromcell);
Standard_Character thecars[4];
DEFINE_STANDARD_ALLOC
+ //! Creates an iterator which will work on all the dictionary
Standard_EXPORT Dico_IteratorOfDictionaryOfInteger(const Handle(Dico_DictionaryOfInteger)& acell);
+ //! Creates an iterator which will consider only entries
+ //! which name begin by the string given as basename (subpart)
Standard_EXPORT Dico_IteratorOfDictionaryOfInteger(const Handle(Dico_DictionaryOfInteger)& acell, const Standard_CString basename);
+ //! Creates an iterator which will consider only entries
+ //! which name begin by the string given as basename (subpart)
+ //! Same as above, but basename is String instead of CString
Standard_EXPORT Dico_IteratorOfDictionaryOfInteger(const Handle(Dico_DictionaryOfInteger)& acell, const TCollection_AsciiString& basename);
+ //! Allows to Start a new Iteration from beginning
Standard_EXPORT void Start();
+ //! Returns True if there are more entries to return
Standard_EXPORT Standard_Boolean More();
+ //! Go to the next entry
+ //! (if there is not, Value will raise an exception)
Standard_EXPORT void Next();
+ //! Returns item value of current entry
Standard_EXPORT const Standard_Integer& Value() const;
+ //! Returns name of current entry
Standard_EXPORT TCollection_AsciiString Name() const;
private:
+ //! Appends a new value to the Iteration Stack
Standard_EXPORT void AppendStack (const Handle(Dico_DictionaryOfInteger)& val);
DEFINE_STANDARD_ALLOC
+ //! Creates an iterator which will work on all the dictionary
Standard_EXPORT Dico_IteratorOfDictionaryOfTransient(const Handle(Dico_DictionaryOfTransient)& acell);
+ //! Creates an iterator which will consider only entries
+ //! which name begin by the string given as basename (subpart)
Standard_EXPORT Dico_IteratorOfDictionaryOfTransient(const Handle(Dico_DictionaryOfTransient)& acell, const Standard_CString basename);
+ //! Creates an iterator which will consider only entries
+ //! which name begin by the string given as basename (subpart)
+ //! Same as above, but basename is String instead of CString
Standard_EXPORT Dico_IteratorOfDictionaryOfTransient(const Handle(Dico_DictionaryOfTransient)& acell, const TCollection_AsciiString& basename);
+ //! Allows to Start a new Iteration from beginning
Standard_EXPORT void Start();
+ //! Returns True if there are more entries to return
Standard_EXPORT Standard_Boolean More();
+ //! Go to the next entry
+ //! (if there is not, Value will raise an exception)
Standard_EXPORT void Next();
+ //! Returns item value of current entry
Standard_EXPORT const Handle(Standard_Transient)& Value() const;
+ //! Returns name of current entry
Standard_EXPORT TCollection_AsciiString Name() const;
private:
+ //! Appends a new value to the Iteration Stack
Standard_EXPORT void AppendStack (const Handle(Dico_DictionaryOfTransient)& val);
public:
+ //! Creates a StackItem with no Previous one
Standard_EXPORT Dico_StackItemOfDictionaryOfInteger();
+ //! Creates a StackItem with a Previous one
Standard_EXPORT Dico_StackItemOfDictionaryOfInteger(const Handle(Dico_StackItemOfDictionaryOfInteger)& previous);
+ //! Returns the Previous Item (is Null if no Previous defined)
Standard_EXPORT Handle(Dico_StackItemOfDictionaryOfInteger) Previous() const;
+ //! Returns the Dictionary Cell corresponding to an Item
Standard_EXPORT Handle(Dico_DictionaryOfInteger) Value() const;
+ //! Sets a new Dictionary Cell as Value of an Item
Standard_EXPORT void SetValue (const Handle(Dico_DictionaryOfInteger)& cval);
public:
+ //! Creates a StackItem with no Previous one
Standard_EXPORT Dico_StackItemOfDictionaryOfTransient();
+ //! Creates a StackItem with a Previous one
Standard_EXPORT Dico_StackItemOfDictionaryOfTransient(const Handle(Dico_StackItemOfDictionaryOfTransient)& previous);
+ //! Returns the Previous Item (is Null if no Previous defined)
Standard_EXPORT Handle(Dico_StackItemOfDictionaryOfTransient) Previous() const;
+ //! Returns the Dictionary Cell corresponding to an Item
Standard_EXPORT Handle(Dico_DictionaryOfTransient) Value() const;
+ //! Sets a new Dictionary Cell as Value of an Item
Standard_EXPORT void SetValue (const Handle(Dico_DictionaryOfTransient)& cval);
virtual Standard_Integer NbEquations() const Standard_OVERRIDE;
+ //! Calculate Fi(U,V).
Standard_EXPORT virtual Standard_Boolean Value (const math_Vector& UV, math_Vector& F) Standard_OVERRIDE;
+ //! Calculate Fi'(U,V).
Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& UV, math_Matrix& DF);
+ //! Calculate Fi(U,V) and Fi'(U,V).
Standard_EXPORT Standard_Boolean Values (const math_Vector& UV, math_Vector& F, math_Matrix& DF);
+ //! Save the found extremum.
Standard_EXPORT virtual Standard_Integer GetStateNumber() Standard_OVERRIDE;
+ //! Return the number of found extrema.
Standard_Integer NbExt() const;
+ //! Return the value of the Nth distance.
Standard_Real SquareDistance (const Standard_Integer N) const;
+ //! Return the points of the Nth extreme distance.
Standard_EXPORT void Points (const Standard_Integer N, Extrema_POnCurv& P1, Extrema_POnCurv& P2) const;
+ //! Returns a pointer to the curve specified in the constructor
+ //! or in SetCurve() method.
Standard_Address CurvePtr (const Standard_Integer theRank) const;
+ //! Returns a tolerance specified in the constructor
+ //! or in SetTolerance() method.
Standard_Real Tolerance() const;
+ //! Determines of boundaries of subinterval for find of root.
Standard_EXPORT void SubIntervalInitialize (const math_Vector& theUfirst, const math_Vector& theUlast);
+ //! Computes a Tol value. If 1st derivative of curve
+ //! |D1|<Tol, it is considered D1=0.
Standard_EXPORT Standard_Real SearchOfTolerance (const Standard_Address C);
virtual Standard_Integer NbEquations() const Standard_OVERRIDE;
+ //! Calculate Fi(U,V).
Standard_EXPORT virtual Standard_Boolean Value (const math_Vector& UV, math_Vector& F) Standard_OVERRIDE;
+ //! Calculate Fi'(U,V).
Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& UV, math_Matrix& DF);
+ //! Calculate Fi(U,V) and Fi'(U,V).
Standard_EXPORT Standard_Boolean Values (const math_Vector& UV, math_Vector& F, math_Matrix& DF);
+ //! Save the found extremum.
Standard_EXPORT virtual Standard_Integer GetStateNumber() Standard_OVERRIDE;
+ //! Return the number of found extrema.
Standard_Integer NbExt() const;
+ //! Return the value of the Nth distance.
Standard_Real SquareDistance (const Standard_Integer N) const;
+ //! Return the points of the Nth extreme distance.
Standard_EXPORT void Points (const Standard_Integer N, Extrema_POnCurv2d& P1, Extrema_POnCurv2d& P2) const;
+ //! Returns a pointer to the curve specified in the constructor
+ //! or in SetCurve() method.
Standard_Address CurvePtr (const Standard_Integer theRank) const;
+ //! Returns a tolerance specified in the constructor
+ //! or in SetTolerance() method.
Standard_Real Tolerance() const;
+ //! Determines of boundaries of subinterval for find of root.
Standard_EXPORT void SubIntervalInitialize (const math_Vector& theUfirst, const math_Vector& theUlast);
+ //! Computes a Tol value. If 1st derivative of curve
+ //! |D1|<Tol, it is considered D1=0.
Standard_EXPORT Standard_Real SearchOfTolerance (const Standard_Address C);
DEFINE_STANDARD_ALLOC
+ //! Calculates all the distances as above
+ //! between Uinf and Usup for C1 and between Vinf and Vsup
+ //! for C2.
Standard_EXPORT Extrema_ECC();
+ //! It calculates all the distances.
+ //! The function F(u,v)=distance(C1(u),C2(v)) has an
+ //! extremum when gradient(f)=0. The algorithm uses
+ //! Evtushenko's global optimization solver.
Standard_EXPORT Extrema_ECC(const Adaptor3d_Curve& C1, const Adaptor3d_Curve& C2);
+ //! Calculates all the distances as above
+ //! between Uinf and Usup for C1 and between Vinf and Vsup
+ //! for C2.
Standard_EXPORT Extrema_ECC(const Adaptor3d_Curve& C1, const Adaptor3d_Curve& C2, const Standard_Real Uinf, const Standard_Real Usup, const Standard_Real Vinf, const Standard_Real Vsup);
+ //! Set params in case of empty constructor is usage.
Standard_EXPORT void SetParams (const Adaptor3d_Curve& C1, const Adaptor3d_Curve& C2, const Standard_Real Uinf, const Standard_Real Usup, const Standard_Real Vinf, const Standard_Real Vsup);
Standard_EXPORT void SetTolerance (const Standard_Real Tol);
//! Get flag for single extrema computation. Works on parametric solver only.
Standard_EXPORT Standard_Boolean GetSingleSolutionFlag () const;
+ //! Performs calculations.
Standard_EXPORT void Perform();
+ //! Returns True if the distances are found.
Standard_EXPORT Standard_Boolean IsDone() const;
+ //! Returns state of myParallel flag.
Standard_EXPORT Standard_Boolean IsParallel() const;
+ //! Returns the number of extremum distances.
Standard_EXPORT Standard_Integer NbExt() const;
+ //! Returns the value of the Nth square extremum distance.
Standard_EXPORT Standard_Real SquareDistance (const Standard_Integer N = 1) const;
+ //! Returns the points of the Nth extremum distance.
+ //! P1 is on the first curve, P2 on the second one.
Standard_EXPORT void Points (const Standard_Integer N, Extrema_POnCurv& P1, Extrema_POnCurv& P2) const;
DEFINE_STANDARD_ALLOC
+ //! Calculates all the distances as above
+ //! between Uinf and Usup for C1 and between Vinf and Vsup
+ //! for C2.
Standard_EXPORT Extrema_ECC2d();
+ //! It calculates all the distances.
+ //! The function F(u,v)=distance(C1(u),C2(v)) has an
+ //! extremum when gradient(f)=0. The algorithm uses
+ //! Evtushenko's global optimization solver.
Standard_EXPORT Extrema_ECC2d(const Adaptor2d_Curve2d& C1, const Adaptor2d_Curve2d& C2);
+ //! Calculates all the distances as above
+ //! between Uinf and Usup for C1 and between Vinf and Vsup
+ //! for C2.
Standard_EXPORT Extrema_ECC2d(const Adaptor2d_Curve2d& C1, const Adaptor2d_Curve2d& C2, const Standard_Real Uinf, const Standard_Real Usup, const Standard_Real Vinf, const Standard_Real Vsup);
+ //! Set params in case of empty constructor is usage.
Standard_EXPORT void SetParams (const Adaptor2d_Curve2d& C1, const Adaptor2d_Curve2d& C2, const Standard_Real Uinf, const Standard_Real Usup, const Standard_Real Vinf, const Standard_Real Vsup);
Standard_EXPORT void SetTolerance (const Standard_Real Tol);
//! Get flag for single extrema computation. Works on parametric solver only.
Standard_EXPORT Standard_Boolean GetSingleSolutionFlag () const;
+ //! Performs calculations.
Standard_EXPORT void Perform();
+ //! Returns True if the distances are found.
Standard_EXPORT Standard_Boolean IsDone() const;
+ //! Returns state of myParallel flag.
Standard_EXPORT Standard_Boolean IsParallel() const;
+ //! Returns the number of extremum distances.
Standard_EXPORT Standard_Integer NbExt() const;
+ //! Returns the value of the Nth square extremum distance.
Standard_EXPORT Standard_Real SquareDistance (const Standard_Integer N = 1) const;
+ //! Returns the points of the Nth extremum distance.
+ //! P1 is on the first curve, P2 on the second one.
Standard_EXPORT void Points (const Standard_Integer N, Extrema_POnCurv2d& P1, Extrema_POnCurv2d& P2) const;
Standard_EXPORT Extrema_ELPCOfLocateExtPC();
+ //! It calculates all the distances.
+ //! The function F(u)=distance(P,C(u)) has an extremum
+ //! when g(u)=dF/du=0. The algorithm searchs all the
+ //! zeros inside the definition range of the curve.
+ //! Zeros are searched between uinf and usup.
+ //! Tol is used to decide to stop the
+ //! iterations according to the following condition:
+ //! if n is the number of iterations,
+ //! the algorithm stops when abs(F(Un)-F(Un-1)) < Tol.
Standard_EXPORT Extrema_ELPCOfLocateExtPC(const gp_Pnt& P, const Adaptor3d_Curve& C, const Standard_Real Uinf, const Standard_Real Usup, const Standard_Real TolF = 1.0e-10);
+ //! It calculates all the distances.
+ //! The function F(u)=distance(P,C(u)) has an extremum
+ //! when g(u)=dF/du=0. The algorithm searchs all the
+ //! zeros inside the definition range of the curve.
+ //! Tol is used to decide to stop the
+ //! iterations according to the following condition:
+ //! if n is the number of iterations,
+ //! the algorithm stops when abs(F(Un)-F(Un-1)) < Tol.
Standard_EXPORT Extrema_ELPCOfLocateExtPC(const gp_Pnt& P, const Adaptor3d_Curve& C, const Standard_Real TolF = 1.0e-10);
+ //! initializes the fields of the algorithm.
Standard_EXPORT void Initialize (const Adaptor3d_Curve& C, const Standard_Real Uinf, const Standard_Real Usup, const Standard_Real TolF = 1.0e-10);
+ //! An exception is raised if the fields have not been
+ //! initialized.
Standard_EXPORT void Perform (const gp_Pnt& P);
+ //! True if the distances are found.
Standard_EXPORT Standard_Boolean IsDone() const;
+ //! Returns the value of the <N>th extremum square distance.
Standard_EXPORT Standard_Real SquareDistance (const Standard_Integer N) const;
+ //! Returns the number of extremum distances.
Standard_EXPORT Standard_Integer NbExt() const;
+ //! Returns True if the <N>th extremum distance is a
+ //! minimum.
Standard_EXPORT Standard_Boolean IsMin (const Standard_Integer N) const;
+ //! Returns the point of the <N>th extremum distance.
Standard_EXPORT const Extrema_POnCurv& Point (const Standard_Integer N) const;
+ //! if the curve is a trimmed curve,
+ //! dist1 is a square distance between <P> and the point
+ //! of parameter FirstParameter <P1> and
+ //! dist2 is a square distance between <P> and the point
+ //! of parameter LastParameter <P2>.
Standard_EXPORT void TrimmedSquareDistances (Standard_Real& dist1, Standard_Real& dist2, gp_Pnt& P1, gp_Pnt& P2) const;
Standard_EXPORT Extrema_ELPCOfLocateExtPC2d();
+ //! It calculates all the distances.
+ //! The function F(u)=distance(P,C(u)) has an extremum
+ //! when g(u)=dF/du=0. The algorithm searchs all the
+ //! zeros inside the definition range of the curve.
+ //! Zeros are searched between uinf and usup.
+ //! Tol is used to decide to stop the
+ //! iterations according to the following condition:
+ //! if n is the number of iterations,
+ //! the algorithm stops when abs(F(Un)-F(Un-1)) < Tol.
Standard_EXPORT Extrema_ELPCOfLocateExtPC2d(const gp_Pnt2d& P, const Adaptor2d_Curve2d& C, const Standard_Real Uinf, const Standard_Real Usup, const Standard_Real TolF = 1.0e-10);
+ //! It calculates all the distances.
+ //! The function F(u)=distance(P,C(u)) has an extremum
+ //! when g(u)=dF/du=0. The algorithm searchs all the
+ //! zeros inside the definition range of the curve.
+ //! Tol is used to decide to stop the
+ //! iterations according to the following condition:
+ //! if n is the number of iterations,
+ //! the algorithm stops when abs(F(Un)-F(Un-1)) < Tol.
Standard_EXPORT Extrema_ELPCOfLocateExtPC2d(const gp_Pnt2d& P, const Adaptor2d_Curve2d& C, const Standard_Real TolF = 1.0e-10);
+ //! initializes the fields of the algorithm.
Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& C, const Standard_Real Uinf, const Standard_Real Usup, const Standard_Real TolF = 1.0e-10);
+ //! An exception is raised if the fields have not been
+ //! initialized.
Standard_EXPORT void Perform (const gp_Pnt2d& P);
+ //! True if the distances are found.
Standard_EXPORT Standard_Boolean IsDone() const;
+ //! Returns the value of the <N>th extremum square distance.
Standard_EXPORT Standard_Real SquareDistance (const Standard_Integer N) const;
+ //! Returns the number of extremum distances.
Standard_EXPORT Standard_Integer NbExt() const;
+ //! Returns True if the <N>th extremum distance is a
+ //! minimum.
Standard_EXPORT Standard_Boolean IsMin (const Standard_Integer N) const;
+ //! Returns the point of the <N>th extremum distance.
Standard_EXPORT const Extrema_POnCurv2d& Point (const Standard_Integer N) const;
+ //! if the curve is a trimmed curve,
+ //! dist1 is a square distance between <P> and the point
+ //! of parameter FirstParameter <P1> and
+ //! dist2 is a square distance between <P> and the point
+ //! of parameter LastParameter <P2>.
Standard_EXPORT void TrimmedSquareDistances (Standard_Real& dist1, Standard_Real& dist2, gp_Pnt2d& P1, gp_Pnt2d& P2) const;
Standard_EXPORT Extrema_EPCOfELPCOfLocateExtPC();
+ //! It calculates all the distances.
+ //! The function F(u)=distance(P,C(u)) has an extremum
+ //! when g(u)=dF/du=0. The algorithm searchs all the
+ //! zeros inside the definition range of the curve.
+ //! NbU is used to locate the close points to
+ //! find the zeros.
+ //! Tol and TolU are used to decide to stop the
+ //! iterations according to the following condition:
+ //! if n is the number of iterations,
+ //! abs(Un-Un-1) < TolU and abs(F(Un)-F(Un-1)) < Tol.
Standard_EXPORT Extrema_EPCOfELPCOfLocateExtPC(const gp_Pnt& P, const Adaptor3d_Curve& C, const Standard_Integer NbU, const Standard_Real TolU, const Standard_Real TolF);
+ //! It calculates all the distances.
+ //! The function F(u)=distance(P,C(u)) has an extremum
+ //! when g(u)=dF/du=0. The algorithm searchs all the
+ //! zeros inside the definition range of the curve.
+ //! NbU is used to locate the close points to
+ //! find the zeros.
+ //! Zeros are searched between umin and usup.
+ //! Tol and TolU are used to decide to stop the
+ //! iterations according to the following condition:
+ //! if n is the number of iterations,
+ //! abs(Un-Un-1) < TolU and abs(F(Un)-F(Un-1)) < Tol.
Standard_EXPORT Extrema_EPCOfELPCOfLocateExtPC(const gp_Pnt& P, const Adaptor3d_Curve& C, const Standard_Integer NbU, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real TolU, const Standard_Real TolF);
+ //! sets the fields of the algorithm.
Standard_EXPORT void Initialize (const Adaptor3d_Curve& C, const Standard_Integer NbU, const Standard_Real TolU, const Standard_Real TolF);
+ //! sets the fields of the algorithm.
Standard_EXPORT void Initialize (const Adaptor3d_Curve& C, const Standard_Integer NbU, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real TolU, const Standard_Real TolF);
+ //! sets the fields of the algorithm.
Standard_EXPORT void Initialize (const Adaptor3d_Curve& C);
+ //! sets the fields of the algorithm.
Standard_EXPORT void Initialize (const Standard_Integer NbU, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real TolU, const Standard_Real TolF);
+ //! the algorithm is done with the point P.
+ //! An exception is raised if the fields have not
+ //! been initialized.
Standard_EXPORT void Perform (const gp_Pnt& P);
+ //! True if the distances are found.
Standard_EXPORT Standard_Boolean IsDone() const;
+ //! Returns the number of extremum distances.
Standard_EXPORT Standard_Integer NbExt() const;
+ //! Returns the value of the Nth extremum square distance.
Standard_EXPORT Standard_Real SquareDistance (const Standard_Integer N) const;
+ //! Returns True if the Nth extremum distance is a
+ //! minimum.
Standard_EXPORT Standard_Boolean IsMin (const Standard_Integer N) const;
+ //! Returns the point of the Nth extremum distance.
Standard_EXPORT const Extrema_POnCurv& Point (const Standard_Integer N) const;
Standard_EXPORT Extrema_EPCOfELPCOfLocateExtPC2d();
+ //! It calculates all the distances.
+ //! The function F(u)=distance(P,C(u)) has an extremum
+ //! when g(u)=dF/du=0. The algorithm searchs all the
+ //! zeros inside the definition range of the curve.
+ //! NbU is used to locate the close points to
+ //! find the zeros.
+ //! Tol and TolU are used to decide to stop the
+ //! iterations according to the following condition:
+ //! if n is the number of iterations,
+ //! abs(Un-Un-1) < TolU and abs(F(Un)-F(Un-1)) < Tol.
Standard_EXPORT Extrema_EPCOfELPCOfLocateExtPC2d(const gp_Pnt2d& P, const Adaptor2d_Curve2d& C, const Standard_Integer NbU, const Standard_Real TolU, const Standard_Real TolF);
+ //! It calculates all the distances.
+ //! The function F(u)=distance(P,C(u)) has an extremum
+ //! when g(u)=dF/du=0. The algorithm searchs all the
+ //! zeros inside the definition range of the curve.
+ //! NbU is used to locate the close points to
+ //! find the zeros.
+ //! Zeros are searched between umin and usup.
+ //! Tol and TolU are used to decide to stop the
+ //! iterations according to the following condition:
+ //! if n is the number of iterations,
+ //! abs(Un-Un-1) < TolU and abs(F(Un)-F(Un-1)) < Tol.
Standard_EXPORT Extrema_EPCOfELPCOfLocateExtPC2d(const gp_Pnt2d& P, const Adaptor2d_Curve2d& C, const Standard_Integer NbU, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real TolU, const Standard_Real TolF);
+ //! sets the fields of the algorithm.
Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& C, const Standard_Integer NbU, const Standard_Real TolU, const Standard_Real TolF);
+ //! sets the fields of the algorithm.
Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& C, const Standard_Integer NbU, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real TolU, const Standard_Real TolF);
+ //! sets the fields of the algorithm.
Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& C);
+ //! sets the fields of the algorithm.
Standard_EXPORT void Initialize (const Standard_Integer NbU, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real TolU, const Standard_Real TolF);
+ //! the algorithm is done with the point P.
+ //! An exception is raised if the fields have not
+ //! been initialized.
Standard_EXPORT void Perform (const gp_Pnt2d& P);
+ //! True if the distances are found.
Standard_EXPORT Standard_Boolean IsDone() const;
+ //! Returns the number of extremum distances.
Standard_EXPORT Standard_Integer NbExt() const;
+ //! Returns the value of the Nth extremum square distance.
Standard_EXPORT Standard_Real SquareDistance (const Standard_Integer N) const;
+ //! Returns True if the Nth extremum distance is a
+ //! minimum.
Standard_EXPORT Standard_Boolean IsMin (const Standard_Integer N) const;
+ //! Returns the point of the Nth extremum distance.
Standard_EXPORT const Extrema_POnCurv2d& Point (const Standard_Integer N) const;
Standard_EXPORT Extrema_EPCOfExtPC();
+ //! It calculates all the distances.
+ //! The function F(u)=distance(P,C(u)) has an extremum
+ //! when g(u)=dF/du=0. The algorithm searchs all the
+ //! zeros inside the definition range of the curve.
+ //! NbU is used to locate the close points to
+ //! find the zeros.
+ //! Tol and TolU are used to decide to stop the
+ //! iterations according to the following condition:
+ //! if n is the number of iterations,
+ //! abs(Un-Un-1) < TolU and abs(F(Un)-F(Un-1)) < Tol.
Standard_EXPORT Extrema_EPCOfExtPC(const gp_Pnt& P, const Adaptor3d_Curve& C, const Standard_Integer NbU, const Standard_Real TolU, const Standard_Real TolF);
+ //! It calculates all the distances.
+ //! The function F(u)=distance(P,C(u)) has an extremum
+ //! when g(u)=dF/du=0. The algorithm searchs all the
+ //! zeros inside the definition range of the curve.
+ //! NbU is used to locate the close points to
+ //! find the zeros.
+ //! Zeros are searched between umin and usup.
+ //! Tol and TolU are used to decide to stop the
+ //! iterations according to the following condition:
+ //! if n is the number of iterations,
+ //! abs(Un-Un-1) < TolU and abs(F(Un)-F(Un-1)) < Tol.
Standard_EXPORT Extrema_EPCOfExtPC(const gp_Pnt& P, const Adaptor3d_Curve& C, const Standard_Integer NbU, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real TolU, const Standard_Real TolF);
+ //! sets the fields of the algorithm.
Standard_EXPORT void Initialize (const Adaptor3d_Curve& C, const Standard_Integer NbU, const Standard_Real TolU, const Standard_Real TolF);
+ //! sets the fields of the algorithm.
Standard_EXPORT void Initialize (const Adaptor3d_Curve& C, const Standard_Integer NbU, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real TolU, const Standard_Real TolF);
+ //! sets the fields of the algorithm.
Standard_EXPORT void Initialize (const Adaptor3d_Curve& C);
+ //! sets the fields of the algorithm.
Standard_EXPORT void Initialize (const Standard_Integer NbU, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real TolU, const Standard_Real TolF);
+ //! the algorithm is done with the point P.
+ //! An exception is raised if the fields have not
+ //! been initialized.
Standard_EXPORT void Perform (const gp_Pnt& P);
+ //! True if the distances are found.
Standard_EXPORT Standard_Boolean IsDone() const;
+ //! Returns the number of extremum distances.
Standard_EXPORT Standard_Integer NbExt() const;
+ //! Returns the value of the Nth extremum square distance.
Standard_EXPORT Standard_Real SquareDistance (const Standard_Integer N) const;
+ //! Returns True if the Nth extremum distance is a
+ //! minimum.
Standard_EXPORT Standard_Boolean IsMin (const Standard_Integer N) const;
+ //! Returns the point of the Nth extremum distance.
Standard_EXPORT const Extrema_POnCurv& Point (const Standard_Integer N) const;
Standard_EXPORT Extrema_EPCOfExtPC2d();
+ //! It calculates all the distances.
+ //! The function F(u)=distance(P,C(u)) has an extremum
+ //! when g(u)=dF/du=0. The algorithm searchs all the
+ //! zeros inside the definition range of the curve.
+ //! NbU is used to locate the close points to
+ //! find the zeros.
+ //! Tol and TolU are used to decide to stop the
+ //! iterations according to the following condition:
+ //! if n is the number of iterations,
+ //! abs(Un-Un-1) < TolU and abs(F(Un)-F(Un-1)) < Tol.
Standard_EXPORT Extrema_EPCOfExtPC2d(const gp_Pnt2d& P, const Adaptor2d_Curve2d& C, const Standard_Integer NbU, const Standard_Real TolU, const Standard_Real TolF);
+ //! It calculates all the distances.
+ //! The function F(u)=distance(P,C(u)) has an extremum
+ //! when g(u)=dF/du=0. The algorithm searchs all the
+ //! zeros inside the definition range of the curve.
+ //! NbU is used to locate the close points to
+ //! find the zeros.
+ //! Zeros are searched between umin and usup.
+ //! Tol and TolU are used to decide to stop the
+ //! iterations according to the following condition:
+ //! if n is the number of iterations,
+ //! abs(Un-Un-1) < TolU and abs(F(Un)-F(Un-1)) < Tol.
Standard_EXPORT Extrema_EPCOfExtPC2d(const gp_Pnt2d& P, const Adaptor2d_Curve2d& C, const Standard_Integer NbU, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real TolU, const Standard_Real TolF);
+ //! sets the fields of the algorithm.
Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& C, const Standard_Integer NbU, const Standard_Real TolU, const Standard_Real TolF);
+ //! sets the fields of the algorithm.
Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& C, const Standard_Integer NbU, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real TolU, const Standard_Real TolF);
+ //! sets the fields of the algorithm.
Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& C);
+ //! sets the fields of the algorithm.
Standard_EXPORT void Initialize (const Standard_Integer NbU, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real TolU, const Standard_Real TolF);
+ //! the algorithm is done with the point P.
+ //! An exception is raised if the fields have not
+ //! been initialized.
Standard_EXPORT void Perform (const gp_Pnt2d& P);
+ //! True if the distances are found.
Standard_EXPORT Standard_Boolean IsDone() const;
+ //! Returns the number of extremum distances.
Standard_EXPORT Standard_Integer NbExt() const;
+ //! Returns the value of the Nth extremum square distance.
Standard_EXPORT Standard_Real SquareDistance (const Standard_Integer N) const;
+ //! Returns True if the Nth extremum distance is a
+ //! minimum.
Standard_EXPORT Standard_Boolean IsMin (const Standard_Integer N) const;
+ //! Returns the point of the Nth extremum distance.
Standard_EXPORT const Extrema_POnCurv2d& Point (const Standard_Integer N) const;
Standard_EXPORT Extrema_ExtPC();
+ //! It calculates all the distances.
+ //! The function F(u)=distance(P,C(u)) has an extremum
+ //! when g(u)=dF/du=0. The algorithm searchs all the
+ //! zeros inside the definition range of the curve.
+ //! Zeros are searched between uinf and usup.
+ //! Tol is used to decide to stop the
+ //! iterations according to the following condition:
+ //! if n is the number of iterations,
+ //! the algorithm stops when abs(F(Un)-F(Un-1)) < Tol.
Standard_EXPORT Extrema_ExtPC(const gp_Pnt& P, const Adaptor3d_Curve& C, const Standard_Real Uinf, const Standard_Real Usup, const Standard_Real TolF = 1.0e-10);
+ //! It calculates all the distances.
+ //! The function F(u)=distance(P,C(u)) has an extremum
+ //! when g(u)=dF/du=0. The algorithm searchs all the
+ //! zeros inside the definition range of the curve.
+ //! Tol is used to decide to stop the
+ //! iterations according to the following condition:
+ //! if n is the number of iterations,
+ //! the algorithm stops when abs(F(Un)-F(Un-1)) < Tol.
Standard_EXPORT Extrema_ExtPC(const gp_Pnt& P, const Adaptor3d_Curve& C, const Standard_Real TolF = 1.0e-10);
+ //! initializes the fields of the algorithm.
Standard_EXPORT void Initialize (const Adaptor3d_Curve& C, const Standard_Real Uinf, const Standard_Real Usup, const Standard_Real TolF = 1.0e-10);
+ //! An exception is raised if the fields have not been
+ //! initialized.
Standard_EXPORT void Perform (const gp_Pnt& P);
+ //! True if the distances are found.
Standard_EXPORT Standard_Boolean IsDone() const;
+ //! Returns the value of the <N>th extremum square distance.
Standard_EXPORT Standard_Real SquareDistance (const Standard_Integer N) const;
+ //! Returns the number of extremum distances.
Standard_EXPORT Standard_Integer NbExt() const;
+ //! Returns True if the <N>th extremum distance is a
+ //! minimum.
Standard_EXPORT Standard_Boolean IsMin (const Standard_Integer N) const;
+ //! Returns the point of the <N>th extremum distance.
Standard_EXPORT const Extrema_POnCurv& Point (const Standard_Integer N) const;
+ //! if the curve is a trimmed curve,
+ //! dist1 is a square distance between <P> and the point
+ //! of parameter FirstParameter <P1> and
+ //! dist2 is a square distance between <P> and the point
+ //! of parameter LastParameter <P2>.
Standard_EXPORT void TrimmedSquareDistances (Standard_Real& dist1, Standard_Real& dist2, gp_Pnt& P1, gp_Pnt& P2) const;
Standard_EXPORT Extrema_ExtPC2d();
+ //! It calculates all the distances.
+ //! The function F(u)=distance(P,C(u)) has an extremum
+ //! when g(u)=dF/du=0. The algorithm searchs all the
+ //! zeros inside the definition range of the curve.
+ //! Zeros are searched between uinf and usup.
+ //! Tol is used to decide to stop the
+ //! iterations according to the following condition:
+ //! if n is the number of iterations,
+ //! the algorithm stops when abs(F(Un)-F(Un-1)) < Tol.
Standard_EXPORT Extrema_ExtPC2d(const gp_Pnt2d& P, const Adaptor2d_Curve2d& C, const Standard_Real Uinf, const Standard_Real Usup, const Standard_Real TolF = 1.0e-10);
+ //! It calculates all the distances.
+ //! The function F(u)=distance(P,C(u)) has an extremum
+ //! when g(u)=dF/du=0. The algorithm searchs all the
+ //! zeros inside the definition range of the curve.
+ //! Tol is used to decide to stop the
+ //! iterations according to the following condition:
+ //! if n is the number of iterations,
+ //! the algorithm stops when abs(F(Un)-F(Un-1)) < Tol.
Standard_EXPORT Extrema_ExtPC2d(const gp_Pnt2d& P, const Adaptor2d_Curve2d& C, const Standard_Real TolF = 1.0e-10);
+ //! initializes the fields of the algorithm.
Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& C, const Standard_Real Uinf, const Standard_Real Usup, const Standard_Real TolF = 1.0e-10);
+ //! An exception is raised if the fields have not been
+ //! initialized.
Standard_EXPORT void Perform (const gp_Pnt2d& P);
+ //! True if the distances are found.
Standard_EXPORT Standard_Boolean IsDone() const;
+ //! Returns the value of the <N>th extremum square distance.
Standard_EXPORT Standard_Real SquareDistance (const Standard_Integer N) const;
+ //! Returns the number of extremum distances.
Standard_EXPORT Standard_Integer NbExt() const;
+ //! Returns True if the <N>th extremum distance is a
+ //! minimum.
Standard_EXPORT Standard_Boolean IsMin (const Standard_Integer N) const;
+ //! Returns the point of the <N>th extremum distance.
Standard_EXPORT const Extrema_POnCurv2d& Point (const Standard_Integer N) const;
+ //! if the curve is a trimmed curve,
+ //! dist1 is a square distance between <P> and the point
+ //! of parameter FirstParameter <P1> and
+ //! dist2 is a square distance between <P> and the point
+ //! of parameter LastParameter <P2>.
Standard_EXPORT void TrimmedSquareDistances (Standard_Real& dist1, Standard_Real& dist2, gp_Pnt2d& P1, gp_Pnt2d& P2) const;
DEFINE_STANDARD_ALLOC
+ //! Calculates the distance with a close point. The
+ //! close point is defined by a parameter value on each
+ //! curve.
+ //! The function F(u,v)=distance(C1(u),C2(v)) has an
+ //! extremun when gradient(f)=0. The algorithm searchs
+ //! the zero near the close point.
Standard_EXPORT Extrema_LocECC(const Adaptor3d_Curve& C1, const Adaptor3d_Curve& C2, const Standard_Real U0, const Standard_Real V0, const Standard_Real TolU, const Standard_Real TolV);
+ //! Returns True if the distance is found.
Standard_EXPORT Standard_Boolean IsDone() const;
+ //! Returns the value of the extremum square distance.
Standard_EXPORT Standard_Real SquareDistance() const;
+ //! Returns the points of the extremum distance.
+ //! P1 is on the first curve, P2 on the second one.
Standard_EXPORT void Point (Extrema_POnCurv& P1, Extrema_POnCurv& P2) const;
DEFINE_STANDARD_ALLOC
+ //! Calculates the distance with a close point. The
+ //! close point is defined by a parameter value on each
+ //! curve.
+ //! The function F(u,v)=distance(C1(u),C2(v)) has an
+ //! extremun when gradient(f)=0. The algorithm searchs
+ //! the zero near the close point.
Standard_EXPORT Extrema_LocECC2d(const Adaptor2d_Curve2d& C1, const Adaptor2d_Curve2d& C2, const Standard_Real U0, const Standard_Real V0, const Standard_Real TolU, const Standard_Real TolV);
+ //! Returns True if the distance is found.
Standard_EXPORT Standard_Boolean IsDone() const;
+ //! Returns the value of the extremum square distance.
Standard_EXPORT Standard_Real SquareDistance() const;
+ //! Returns the points of the extremum distance.
+ //! P1 is on the first curve, P2 on the second one.
Standard_EXPORT void Point (Extrema_POnCurv2d& P1, Extrema_POnCurv2d& P2) const;
Standard_EXPORT Extrema_LocEPCOfLocateExtPC();
+ //! Calculates the distance with a close point.
+ //! The close point is defined by the parameter value
+ //! U0.
+ //! The function F(u)=distance(P,C(u)) has an extremum
+ //! when g(u)=dF/du=0. The algorithm searchs a zero
+ //! near the close point.
+ //! TolU is used to decide to stop the iterations.
+ //! At the nth iteration, the criteria is:
+ //! abs(Un - Un-1) < TolU.
Standard_EXPORT Extrema_LocEPCOfLocateExtPC(const gp_Pnt& P, const Adaptor3d_Curve& C, const Standard_Real U0, const Standard_Real TolU);
+ //! Calculates the distance with a close point.
+ //! The close point is defined by the parameter value
+ //! U0.
+ //! The function F(u)=distance(P,C(u)) has an extremum
+ //! when g(u)=dF/du=0. The algorithm searchs a zero
+ //! near the close point.
+ //! Zeros are searched between Umin et Usup.
+ //! TolU is used to decide to stop the iterations.
+ //! At the nth iteration, the criteria is:
+ //! abs(Un - Un-1) < TolU.
Standard_EXPORT Extrema_LocEPCOfLocateExtPC(const gp_Pnt& P, const Adaptor3d_Curve& C, const Standard_Real U0, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real TolU);
+ //! sets the fields of the algorithm.
Standard_EXPORT void Initialize (const Adaptor3d_Curve& C, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real TolU);
+ //! the algorithm is done with the point P.
+ //! An exception is raised if the fields have not
+ //! been initialized.
Standard_EXPORT void Perform (const gp_Pnt& P, const Standard_Real U0);
+ //! Returns True if the distance is found.
Standard_EXPORT Standard_Boolean IsDone() const;
+ //! Returns the value of the extremum square distance.
Standard_EXPORT Standard_Real SquareDistance() const;
+ //! Returns True if the extremum distance is a minimum.
Standard_EXPORT Standard_Boolean IsMin() const;
+ //! Returns the point of the extremum distance.
Standard_EXPORT const Extrema_POnCurv& Point() const;
Standard_EXPORT Extrema_LocEPCOfLocateExtPC2d();
+ //! Calculates the distance with a close point.
+ //! The close point is defined by the parameter value
+ //! U0.
+ //! The function F(u)=distance(P,C(u)) has an extremum
+ //! when g(u)=dF/du=0. The algorithm searchs a zero
+ //! near the close point.
+ //! TolU is used to decide to stop the iterations.
+ //! At the nth iteration, the criteria is:
+ //! abs(Un - Un-1) < TolU.
Standard_EXPORT Extrema_LocEPCOfLocateExtPC2d(const gp_Pnt2d& P, const Adaptor2d_Curve2d& C, const Standard_Real U0, const Standard_Real TolU);
+ //! Calculates the distance with a close point.
+ //! The close point is defined by the parameter value
+ //! U0.
+ //! The function F(u)=distance(P,C(u)) has an extremum
+ //! when g(u)=dF/du=0. The algorithm searchs a zero
+ //! near the close point.
+ //! Zeros are searched between Umin et Usup.
+ //! TolU is used to decide to stop the iterations.
+ //! At the nth iteration, the criteria is:
+ //! abs(Un - Un-1) < TolU.
Standard_EXPORT Extrema_LocEPCOfLocateExtPC2d(const gp_Pnt2d& P, const Adaptor2d_Curve2d& C, const Standard_Real U0, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real TolU);
+ //! sets the fields of the algorithm.
Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& C, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real TolU);
+ //! the algorithm is done with the point P.
+ //! An exception is raised if the fields have not
+ //! been initialized.
Standard_EXPORT void Perform (const gp_Pnt2d& P, const Standard_Real U0);
+ //! Returns True if the distance is found.
Standard_EXPORT Standard_Boolean IsDone() const;
+ //! Returns the value of the extremum square distance.
Standard_EXPORT Standard_Real SquareDistance() const;
+ //! Returns True if the extremum distance is a minimum.
Standard_EXPORT Standard_Boolean IsMin() const;
+ //! Returns the point of the extremum distance.
Standard_EXPORT const Extrema_POnCurv2d& Point() const;
Standard_EXPORT Extrema_LocateExtPC();
+ //! Calculates the distance with a close point.
+ //! The close point is defined by the parameter value
+ //! U0.
+ //! The function F(u)=distance(P,C(u)) has an extremum
+ //! when g(u)=dF/du=0. The algorithm searchs a zero
+ //! near the close point.
+ //! TolF is used to decide to stop the iterations.
+ //! At the nth iteration, the criteria is:
+ //! abs(Un - Un-1) < TolF.
Standard_EXPORT Extrema_LocateExtPC(const gp_Pnt& P, const Adaptor3d_Curve& C, const Standard_Real U0, const Standard_Real TolF);
+ //! Calculates the distance with a close point.
+ //! The close point is defined by the parameter value
+ //! U0.
+ //! The function F(u)=distance(P,C(u)) has an extremum
+ //! when g(u)=dF/du=0. The algorithm searchs a zero
+ //! near the close point.
+ //! Zeros are searched between Umin et Usup.
+ //! TolF is used to decide to stop the iterations.
+ //! At the nth iteration, the criteria is:
+ //! abs(Un - Un-1) < TolF.
Standard_EXPORT Extrema_LocateExtPC(const gp_Pnt& P, const Adaptor3d_Curve& C, const Standard_Real U0, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real TolF);
+ //! sets the fields of the algorithm.
Standard_EXPORT void Initialize (const Adaptor3d_Curve& C, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real TolF);
Standard_EXPORT void Perform (const gp_Pnt& P, const Standard_Real U0);
+ //! Returns True if the distance is found.
Standard_EXPORT Standard_Boolean IsDone() const;
+ //! Returns the value of the extremum square distance.
Standard_EXPORT Standard_Real SquareDistance() const;
+ //! Returns True if the extremum distance is a minimum.
Standard_EXPORT Standard_Boolean IsMin() const;
+ //! Returns the point of the extremum distance.
Standard_EXPORT const Extrema_POnCurv& Point() const;
Standard_EXPORT Extrema_LocateExtPC2d();
+ //! Calculates the distance with a close point.
+ //! The close point is defined by the parameter value
+ //! U0.
+ //! The function F(u)=distance(P,C(u)) has an extremum
+ //! when g(u)=dF/du=0. The algorithm searchs a zero
+ //! near the close point.
+ //! TolF is used to decide to stop the iterations.
+ //! At the nth iteration, the criteria is:
+ //! abs(Un - Un-1) < TolF.
Standard_EXPORT Extrema_LocateExtPC2d(const gp_Pnt2d& P, const Adaptor2d_Curve2d& C, const Standard_Real U0, const Standard_Real TolF);
+ //! Calculates the distance with a close point.
+ //! The close point is defined by the parameter value
+ //! U0.
+ //! The function F(u)=distance(P,C(u)) has an extremum
+ //! when g(u)=dF/du=0. The algorithm searchs a zero
+ //! near the close point.
+ //! Zeros are searched between Umin et Usup.
+ //! TolF is used to decide to stop the iterations.
+ //! At the nth iteration, the criteria is:
+ //! abs(Un - Un-1) < TolF.
Standard_EXPORT Extrema_LocateExtPC2d(const gp_Pnt2d& P, const Adaptor2d_Curve2d& C, const Standard_Real U0, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real TolF);
+ //! sets the fields of the algorithm.
Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& C, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real TolF);
Standard_EXPORT void Perform (const gp_Pnt2d& P, const Standard_Real U0);
+ //! Returns True if the distance is found.
Standard_EXPORT Standard_Boolean IsDone() const;
+ //! Returns the value of the extremum square distance.
Standard_EXPORT Standard_Real SquareDistance() const;
+ //! Returns True if the extremum distance is a minimum.
Standard_EXPORT Standard_Boolean IsMin() const;
+ //! Returns the point of the extremum distance.
Standard_EXPORT const Extrema_POnCurv2d& Point() const;
Standard_EXPORT Extrema_PCFOfEPCOfELPCOfLocateExtPC(const gp_Pnt& P, const Adaptor3d_Curve& C);
+ //! sets the field mycurve of the function.
Standard_EXPORT void Initialize (const Adaptor3d_Curve& C);
+ //! sets the field P of the function.
Standard_EXPORT void SetPoint (const gp_Pnt& P);
+ //! Calculation of F(U).
Standard_EXPORT Standard_Boolean Value (const Standard_Real U, Standard_Real& F);
+ //! Calculation of F'(U).
Standard_EXPORT Standard_Boolean Derivative (const Standard_Real U, Standard_Real& DF);
+ //! Calculation of F(U) and F'(U).
Standard_EXPORT Standard_Boolean Values (const Standard_Real U, Standard_Real& F, Standard_Real& DF);
+ //! Save the found extremum.
Standard_EXPORT virtual Standard_Integer GetStateNumber() Standard_OVERRIDE;
+ //! Return the nunber of found extrema.
Standard_EXPORT Standard_Integer NbExt() const;
+ //! Returns the Nth distance.
Standard_EXPORT Standard_Real SquareDistance (const Standard_Integer N) const;
+ //! Shows if the Nth distance is a minimum.
Standard_EXPORT Standard_Boolean IsMin (const Standard_Integer N) const;
+ //! Returns the Nth extremum.
Standard_EXPORT const Extrema_POnCurv& Point (const Standard_Integer N) const;
+ //! Determines boundaries of subinterval for find of root.
Standard_EXPORT void SubIntervalInitialize (const Standard_Real theUfirst, const Standard_Real theUlast);
+ //! Computes a Tol value. If 1st derivative of curve
+ //! |D1|<Tol, it is considered D1=0.
Standard_EXPORT Standard_Real SearchOfTolerance();
Standard_EXPORT Extrema_PCFOfEPCOfELPCOfLocateExtPC2d(const gp_Pnt2d& P, const Adaptor2d_Curve2d& C);
+ //! sets the field mycurve of the function.
Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& C);
+ //! sets the field P of the function.
Standard_EXPORT void SetPoint (const gp_Pnt2d& P);
+ //! Calculation of F(U).
Standard_EXPORT Standard_Boolean Value (const Standard_Real U, Standard_Real& F);
+ //! Calculation of F'(U).
Standard_EXPORT Standard_Boolean Derivative (const Standard_Real U, Standard_Real& DF);
+ //! Calculation of F(U) and F'(U).
Standard_EXPORT Standard_Boolean Values (const Standard_Real U, Standard_Real& F, Standard_Real& DF);
+ //! Save the found extremum.
Standard_EXPORT virtual Standard_Integer GetStateNumber() Standard_OVERRIDE;
+ //! Return the nunber of found extrema.
Standard_EXPORT Standard_Integer NbExt() const;
+ //! Returns the Nth distance.
Standard_EXPORT Standard_Real SquareDistance (const Standard_Integer N) const;
+ //! Shows if the Nth distance is a minimum.
Standard_EXPORT Standard_Boolean IsMin (const Standard_Integer N) const;
+ //! Returns the Nth extremum.
Standard_EXPORT const Extrema_POnCurv2d& Point (const Standard_Integer N) const;
+ //! Determines boundaries of subinterval for find of root.
Standard_EXPORT void SubIntervalInitialize (const Standard_Real theUfirst, const Standard_Real theUlast);
+ //! Computes a Tol value. If 1st derivative of curve
+ //! |D1|<Tol, it is considered D1=0.
Standard_EXPORT Standard_Real SearchOfTolerance();
Standard_EXPORT Extrema_PCFOfEPCOfExtPC(const gp_Pnt& P, const Adaptor3d_Curve& C);
+ //! sets the field mycurve of the function.
Standard_EXPORT void Initialize (const Adaptor3d_Curve& C);
+ //! sets the field P of the function.
Standard_EXPORT void SetPoint (const gp_Pnt& P);
+ //! Calculation of F(U).
Standard_EXPORT Standard_Boolean Value (const Standard_Real U, Standard_Real& F);
+ //! Calculation of F'(U).
Standard_EXPORT Standard_Boolean Derivative (const Standard_Real U, Standard_Real& DF);
+ //! Calculation of F(U) and F'(U).
Standard_EXPORT Standard_Boolean Values (const Standard_Real U, Standard_Real& F, Standard_Real& DF);
+ //! Save the found extremum.
Standard_EXPORT virtual Standard_Integer GetStateNumber() Standard_OVERRIDE;
+ //! Return the nunber of found extrema.
Standard_EXPORT Standard_Integer NbExt() const;
+ //! Returns the Nth distance.
Standard_EXPORT Standard_Real SquareDistance (const Standard_Integer N) const;
+ //! Shows if the Nth distance is a minimum.
Standard_EXPORT Standard_Boolean IsMin (const Standard_Integer N) const;
+ //! Returns the Nth extremum.
Standard_EXPORT const Extrema_POnCurv& Point (const Standard_Integer N) const;
+ //! Determines boundaries of subinterval for find of root.
Standard_EXPORT void SubIntervalInitialize (const Standard_Real theUfirst, const Standard_Real theUlast);
+ //! Computes a Tol value. If 1st derivative of curve
+ //! |D1|<Tol, it is considered D1=0.
Standard_EXPORT Standard_Real SearchOfTolerance();
Standard_EXPORT Extrema_PCFOfEPCOfExtPC2d(const gp_Pnt2d& P, const Adaptor2d_Curve2d& C);
+ //! sets the field mycurve of the function.
Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& C);
+ //! sets the field P of the function.
Standard_EXPORT void SetPoint (const gp_Pnt2d& P);
+ //! Calculation of F(U).
Standard_EXPORT Standard_Boolean Value (const Standard_Real U, Standard_Real& F);
+ //! Calculation of F'(U).
Standard_EXPORT Standard_Boolean Derivative (const Standard_Real U, Standard_Real& DF);
+ //! Calculation of F(U) and F'(U).
Standard_EXPORT Standard_Boolean Values (const Standard_Real U, Standard_Real& F, Standard_Real& DF);
+ //! Save the found extremum.
Standard_EXPORT virtual Standard_Integer GetStateNumber() Standard_OVERRIDE;
+ //! Return the nunber of found extrema.
Standard_EXPORT Standard_Integer NbExt() const;
+ //! Returns the Nth distance.
Standard_EXPORT Standard_Real SquareDistance (const Standard_Integer N) const;
+ //! Shows if the Nth distance is a minimum.
Standard_EXPORT Standard_Boolean IsMin (const Standard_Integer N) const;
+ //! Returns the Nth extremum.
Standard_EXPORT const Extrema_POnCurv2d& Point (const Standard_Integer N) const;
+ //! Determines boundaries of subinterval for find of root.
Standard_EXPORT void SubIntervalInitialize (const Standard_Real theUfirst, const Standard_Real theUlast);
+ //! Computes a Tol value. If 1st derivative of curve
+ //! |D1|<Tol, it is considered D1=0.
Standard_EXPORT Standard_Real SearchOfTolerance();
Standard_EXPORT Extrema_PCLocFOfLocEPCOfLocateExtPC(const gp_Pnt& P, const Adaptor3d_Curve& C);
+ //! sets the field mycurve of the function.
Standard_EXPORT void Initialize (const Adaptor3d_Curve& C);
+ //! sets the field P of the function.
Standard_EXPORT void SetPoint (const gp_Pnt& P);
+ //! Calculation of F(U).
Standard_EXPORT Standard_Boolean Value (const Standard_Real U, Standard_Real& F);
+ //! Calculation of F'(U).
Standard_EXPORT Standard_Boolean Derivative (const Standard_Real U, Standard_Real& DF);
+ //! Calculation of F(U) and F'(U).
Standard_EXPORT Standard_Boolean Values (const Standard_Real U, Standard_Real& F, Standard_Real& DF);
+ //! Save the found extremum.
Standard_EXPORT virtual Standard_Integer GetStateNumber() Standard_OVERRIDE;
+ //! Return the nunber of found extrema.
Standard_EXPORT Standard_Integer NbExt() const;
+ //! Returns the Nth distance.
Standard_EXPORT Standard_Real SquareDistance (const Standard_Integer N) const;
+ //! Shows if the Nth distance is a minimum.
Standard_EXPORT Standard_Boolean IsMin (const Standard_Integer N) const;
+ //! Returns the Nth extremum.
Standard_EXPORT const Extrema_POnCurv& Point (const Standard_Integer N) const;
+ //! Determines boundaries of subinterval for find of root.
Standard_EXPORT void SubIntervalInitialize (const Standard_Real theUfirst, const Standard_Real theUlast);
+ //! Computes a Tol value. If 1st derivative of curve
+ //! |D1|<Tol, it is considered D1=0.
Standard_EXPORT Standard_Real SearchOfTolerance();
Standard_EXPORT Extrema_PCLocFOfLocEPCOfLocateExtPC2d(const gp_Pnt2d& P, const Adaptor2d_Curve2d& C);
+ //! sets the field mycurve of the function.
Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& C);
+ //! sets the field P of the function.
Standard_EXPORT void SetPoint (const gp_Pnt2d& P);
+ //! Calculation of F(U).
Standard_EXPORT Standard_Boolean Value (const Standard_Real U, Standard_Real& F);
+ //! Calculation of F'(U).
Standard_EXPORT Standard_Boolean Derivative (const Standard_Real U, Standard_Real& DF);
+ //! Calculation of F(U) and F'(U).
Standard_EXPORT Standard_Boolean Values (const Standard_Real U, Standard_Real& F, Standard_Real& DF);
+ //! Save the found extremum.
Standard_EXPORT virtual Standard_Integer GetStateNumber() Standard_OVERRIDE;
+ //! Return the nunber of found extrema.
Standard_EXPORT Standard_Integer NbExt() const;
+ //! Returns the Nth distance.
Standard_EXPORT Standard_Real SquareDistance (const Standard_Integer N) const;
+ //! Shows if the Nth distance is a minimum.
Standard_EXPORT Standard_Boolean IsMin (const Standard_Integer N) const;
+ //! Returns the Nth extremum.
Standard_EXPORT const Extrema_POnCurv2d& Point (const Standard_Integer N) const;
+ //! Determines boundaries of subinterval for find of root.
Standard_EXPORT void SubIntervalInitialize (const Standard_Real theUfirst, const Standard_Real theUlast);
+ //! Computes a Tol value. If 1st derivative of curve
+ //! |D1|<Tol, it is considered D1=0.
Standard_EXPORT Standard_Real SearchOfTolerance();
DEFINE_STANDARD_ALLOC
+ //! Creation of an indefinite point on curve.
Standard_EXPORT Extrema_POnCurv();
+ //! Creation of a point on curve with a parameter
+ //! value on the curve and a Pnt from gp.
Standard_EXPORT Extrema_POnCurv(const Standard_Real U, const gp_Pnt& P);
+ //! sets the point and parameter values.
Standard_EXPORT void SetValues (const Standard_Real U, const gp_Pnt& P);
+ //! Returns the point.
const gp_Pnt& Value() const;
+ //! Returns the parameter on the curve.
Standard_Real Parameter() const;
DEFINE_STANDARD_ALLOC
+ //! Creation of an indefinite point on curve.
Standard_EXPORT Extrema_POnCurv2d();
+ //! Creation of a point on curve with a parameter
+ //! value on the curve and a Pnt from gp.
Standard_EXPORT Extrema_POnCurv2d(const Standard_Real U, const gp_Pnt2d& P);
+ //! sets the point and parameter values.
Standard_EXPORT void SetValues (const Standard_Real U, const gp_Pnt2d& P);
+ //! Returns the point.
const gp_Pnt2d& Value() const;
+ //! Returns the parameter on the curve.
Standard_Real Parameter() const;
DEFINE_STANDARD_ALLOC
+ //! Constructs an empty sequence.
+ //! Use:
+ //! - the function Append or Prepend to add an item or
+ //! a collection of items at the end, or at the beginning of the sequence,
+ //! - the function InsertAfter or InsertBefore to add an
+ //! item or a collection of items at any position in the sequence,
+ //! - operator() or the function SetValue to assign a
+ //! new value to an item of the sequence,
+ //! - operator() to read an item of the sequence,
+ //! - the function Remove to remove an item at any
+ //! position in the sequence.
+ //! Warning
+ //! To copy a sequence, you must explicitly call the
+ //! assignment operator (operator=).
Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC();
+ //! Creation by copy of existing Sequence.
Standard_EXPORT Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC(const Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC& Other);
+ //! Removes all element(s) of the sequence <me>
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = ()
Standard_EXPORT void Clear();
~Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC()
{
Clear();
}
+ //! Copies the contents of the sequence Other into this sequence.
+ //! If this sequence is not empty, it is automatically cleared before the copy.
Standard_EXPORT const Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC& Assign (const Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC& Other);
const Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC& operator = (const Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC& Other)
{
return Assign(Other);
}
+ //! Appends <T> at the end of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C T)
Standard_EXPORT void Append (const Extrema_POnCurv& T);
+ //! Concatenates <S> at the end of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void Append (Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC& S);
+ //! Add <T> at the beginning of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (T A B C )
Standard_EXPORT void Prepend (const Extrema_POnCurv& T);
+ //! Concatenates <S> at the beginning of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C) S = (D E F)
+ //! after me = (D E F A B C)
+ //! S = ()
void Prepend (Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC& S);
+ //! Inserts <T> in <me> before the position <Index>.
+ //! Raises an exception if the index is out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B D), Index = 3, T = C
+ //! after
+ //! me = (A B C D )
void InsertBefore (const Standard_Integer Index, const Extrema_POnCurv& T);
+ //! Inserts the sequence <S> in <me> before
+ //! the position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B F), Index = 3, S = (C D E)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertBefore (const Standard_Integer Index, Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC& S);
+ //! Inserts <T> in <me> after the position <Index>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, T = D
+ //! after
+ //! me = (A B C D)
Standard_EXPORT void InsertAfter (const Standard_Integer Index, const Extrema_POnCurv& T);
+ //! Inserts the sequence <S> in <me> after the
+ //! position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bound.
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertAfter (const Standard_Integer Index, Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC& S);
+ //! Returns the first element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns A
Standard_EXPORT const Extrema_POnCurv& First() const;
+ //! Returns the last element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns C
Standard_EXPORT const Extrema_POnCurv& Last() const;
+ //! Keeps in <me> the items 1 to <Index>-1 and
+ //! puts in <Sub> the items <Index> to the end.
+ //! Example:
+ //! before
+ //! me = (A B C D) ,Index = 3
+ //! after
+ //! me = (A B)
+ //! Sub = (C D)
void Split (const Standard_Integer Index, Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC& Sub);
+ //! Returns the Item at position <Index> in <me>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT const Extrema_POnCurv& Value (const Standard_Integer Index) const;
const Extrema_POnCurv& operator() (const Standard_Integer Index) const
{
return Value(Index);
}
+ //! Changes the item at position <Index>
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1, Item = D
+ //! after
+ //! me = (D B C)
Standard_EXPORT void SetValue (const Standard_Integer Index, const Extrema_POnCurv& I);
+ //! Returns the Item at position <Index> in
+ //! <me>. This method may be used to modify
+ //! <me> : S.Value(Index) = Item.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT Extrema_POnCurv& ChangeValue (const Standard_Integer Index);
Extrema_POnCurv& operator() (const Standard_Integer Index)
{
return ChangeValue(Index);
}
+ //! Removes from <me> the item at position <Index>.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3
+ //! after
+ //! me = (A B)
Standard_EXPORT void Remove (const Standard_Integer Index);
+ //! Removes from <me> all the items of
+ //! positions between <FromIndex> and <ToIndex>.
+ //! Raises an exception if the indices are out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B C D E F), FromIndex = 1 ToIndex = 3
+ //! after
+ //! me = (D E F)
Standard_EXPORT void Remove (const Standard_Integer FromIndex, const Standard_Integer ToIndex);
DEFINE_STANDARD_ALLOC
+ //! Constructs an empty sequence.
+ //! Use:
+ //! - the function Append or Prepend to add an item or
+ //! a collection of items at the end, or at the beginning of the sequence,
+ //! - the function InsertAfter or InsertBefore to add an
+ //! item or a collection of items at any position in the sequence,
+ //! - operator() or the function SetValue to assign a
+ //! new value to an item of the sequence,
+ //! - operator() to read an item of the sequence,
+ //! - the function Remove to remove an item at any
+ //! position in the sequence.
+ //! Warning
+ //! To copy a sequence, you must explicitly call the
+ //! assignment operator (operator=).
Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC2d();
+ //! Creation by copy of existing Sequence.
Standard_EXPORT Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC2d(const Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC2d& Other);
+ //! Removes all element(s) of the sequence <me>
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = ()
Standard_EXPORT void Clear();
~Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC2d()
{
Clear();
}
+ //! Copies the contents of the sequence Other into this sequence.
+ //! If this sequence is not empty, it is automatically cleared before the copy.
Standard_EXPORT const Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC2d& Assign (const Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC2d& Other);
const Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC2d& operator = (const Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC2d& Other)
{
return Assign(Other);
}
+ //! Appends <T> at the end of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C T)
Standard_EXPORT void Append (const Extrema_POnCurv2d& T);
+ //! Concatenates <S> at the end of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void Append (Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC2d& S);
+ //! Add <T> at the beginning of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (T A B C )
Standard_EXPORT void Prepend (const Extrema_POnCurv2d& T);
+ //! Concatenates <S> at the beginning of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C) S = (D E F)
+ //! after me = (D E F A B C)
+ //! S = ()
void Prepend (Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC2d& S);
+ //! Inserts <T> in <me> before the position <Index>.
+ //! Raises an exception if the index is out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B D), Index = 3, T = C
+ //! after
+ //! me = (A B C D )
void InsertBefore (const Standard_Integer Index, const Extrema_POnCurv2d& T);
+ //! Inserts the sequence <S> in <me> before
+ //! the position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B F), Index = 3, S = (C D E)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertBefore (const Standard_Integer Index, Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC2d& S);
+ //! Inserts <T> in <me> after the position <Index>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, T = D
+ //! after
+ //! me = (A B C D)
Standard_EXPORT void InsertAfter (const Standard_Integer Index, const Extrema_POnCurv2d& T);
+ //! Inserts the sequence <S> in <me> after the
+ //! position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bound.
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertAfter (const Standard_Integer Index, Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC2d& S);
+ //! Returns the first element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns A
Standard_EXPORT const Extrema_POnCurv2d& First() const;
+ //! Returns the last element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns C
Standard_EXPORT const Extrema_POnCurv2d& Last() const;
+ //! Keeps in <me> the items 1 to <Index>-1 and
+ //! puts in <Sub> the items <Index> to the end.
+ //! Example:
+ //! before
+ //! me = (A B C D) ,Index = 3
+ //! after
+ //! me = (A B)
+ //! Sub = (C D)
void Split (const Standard_Integer Index, Extrema_SeqPCOfPCFOfEPCOfELPCOfLocateExtPC2d& Sub);
+ //! Returns the Item at position <Index> in <me>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT const Extrema_POnCurv2d& Value (const Standard_Integer Index) const;
const Extrema_POnCurv2d& operator() (const Standard_Integer Index) const
{
return Value(Index);
}
+ //! Changes the item at position <Index>
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1, Item = D
+ //! after
+ //! me = (D B C)
Standard_EXPORT void SetValue (const Standard_Integer Index, const Extrema_POnCurv2d& I);
+ //! Returns the Item at position <Index> in
+ //! <me>. This method may be used to modify
+ //! <me> : S.Value(Index) = Item.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT Extrema_POnCurv2d& ChangeValue (const Standard_Integer Index);
Extrema_POnCurv2d& operator() (const Standard_Integer Index)
{
return ChangeValue(Index);
}
+ //! Removes from <me> the item at position <Index>.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3
+ //! after
+ //! me = (A B)
Standard_EXPORT void Remove (const Standard_Integer Index);
+ //! Removes from <me> all the items of
+ //! positions between <FromIndex> and <ToIndex>.
+ //! Raises an exception if the indices are out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B C D E F), FromIndex = 1 ToIndex = 3
+ //! after
+ //! me = (D E F)
Standard_EXPORT void Remove (const Standard_Integer FromIndex, const Standard_Integer ToIndex);
DEFINE_STANDARD_ALLOC
+ //! Constructs an empty sequence.
+ //! Use:
+ //! - the function Append or Prepend to add an item or
+ //! a collection of items at the end, or at the beginning of the sequence,
+ //! - the function InsertAfter or InsertBefore to add an
+ //! item or a collection of items at any position in the sequence,
+ //! - operator() or the function SetValue to assign a
+ //! new value to an item of the sequence,
+ //! - operator() to read an item of the sequence,
+ //! - the function Remove to remove an item at any
+ //! position in the sequence.
+ //! Warning
+ //! To copy a sequence, you must explicitly call the
+ //! assignment operator (operator=).
Extrema_SeqPCOfPCFOfEPCOfExtPC();
+ //! Creation by copy of existing Sequence.
Standard_EXPORT Extrema_SeqPCOfPCFOfEPCOfExtPC(const Extrema_SeqPCOfPCFOfEPCOfExtPC& Other);
+ //! Removes all element(s) of the sequence <me>
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = ()
Standard_EXPORT void Clear();
~Extrema_SeqPCOfPCFOfEPCOfExtPC()
{
Clear();
}
+ //! Copies the contents of the sequence Other into this sequence.
+ //! If this sequence is not empty, it is automatically cleared before the copy.
Standard_EXPORT const Extrema_SeqPCOfPCFOfEPCOfExtPC& Assign (const Extrema_SeqPCOfPCFOfEPCOfExtPC& Other);
const Extrema_SeqPCOfPCFOfEPCOfExtPC& operator = (const Extrema_SeqPCOfPCFOfEPCOfExtPC& Other)
{
return Assign(Other);
}
+ //! Appends <T> at the end of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C T)
Standard_EXPORT void Append (const Extrema_POnCurv& T);
+ //! Concatenates <S> at the end of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void Append (Extrema_SeqPCOfPCFOfEPCOfExtPC& S);
+ //! Add <T> at the beginning of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (T A B C )
Standard_EXPORT void Prepend (const Extrema_POnCurv& T);
+ //! Concatenates <S> at the beginning of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C) S = (D E F)
+ //! after me = (D E F A B C)
+ //! S = ()
void Prepend (Extrema_SeqPCOfPCFOfEPCOfExtPC& S);
+ //! Inserts <T> in <me> before the position <Index>.
+ //! Raises an exception if the index is out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B D), Index = 3, T = C
+ //! after
+ //! me = (A B C D )
void InsertBefore (const Standard_Integer Index, const Extrema_POnCurv& T);
+ //! Inserts the sequence <S> in <me> before
+ //! the position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B F), Index = 3, S = (C D E)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertBefore (const Standard_Integer Index, Extrema_SeqPCOfPCFOfEPCOfExtPC& S);
+ //! Inserts <T> in <me> after the position <Index>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, T = D
+ //! after
+ //! me = (A B C D)
Standard_EXPORT void InsertAfter (const Standard_Integer Index, const Extrema_POnCurv& T);
+ //! Inserts the sequence <S> in <me> after the
+ //! position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bound.
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertAfter (const Standard_Integer Index, Extrema_SeqPCOfPCFOfEPCOfExtPC& S);
+ //! Returns the first element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns A
Standard_EXPORT const Extrema_POnCurv& First() const;
+ //! Returns the last element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns C
Standard_EXPORT const Extrema_POnCurv& Last() const;
+ //! Keeps in <me> the items 1 to <Index>-1 and
+ //! puts in <Sub> the items <Index> to the end.
+ //! Example:
+ //! before
+ //! me = (A B C D) ,Index = 3
+ //! after
+ //! me = (A B)
+ //! Sub = (C D)
void Split (const Standard_Integer Index, Extrema_SeqPCOfPCFOfEPCOfExtPC& Sub);
+ //! Returns the Item at position <Index> in <me>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT const Extrema_POnCurv& Value (const Standard_Integer Index) const;
const Extrema_POnCurv& operator() (const Standard_Integer Index) const
{
return Value(Index);
}
+ //! Changes the item at position <Index>
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1, Item = D
+ //! after
+ //! me = (D B C)
Standard_EXPORT void SetValue (const Standard_Integer Index, const Extrema_POnCurv& I);
+ //! Returns the Item at position <Index> in
+ //! <me>. This method may be used to modify
+ //! <me> : S.Value(Index) = Item.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT Extrema_POnCurv& ChangeValue (const Standard_Integer Index);
Extrema_POnCurv& operator() (const Standard_Integer Index)
{
return ChangeValue(Index);
}
+ //! Removes from <me> the item at position <Index>.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3
+ //! after
+ //! me = (A B)
Standard_EXPORT void Remove (const Standard_Integer Index);
+ //! Removes from <me> all the items of
+ //! positions between <FromIndex> and <ToIndex>.
+ //! Raises an exception if the indices are out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B C D E F), FromIndex = 1 ToIndex = 3
+ //! after
+ //! me = (D E F)
Standard_EXPORT void Remove (const Standard_Integer FromIndex, const Standard_Integer ToIndex);
DEFINE_STANDARD_ALLOC
+ //! Constructs an empty sequence.
+ //! Use:
+ //! - the function Append or Prepend to add an item or
+ //! a collection of items at the end, or at the beginning of the sequence,
+ //! - the function InsertAfter or InsertBefore to add an
+ //! item or a collection of items at any position in the sequence,
+ //! - operator() or the function SetValue to assign a
+ //! new value to an item of the sequence,
+ //! - operator() to read an item of the sequence,
+ //! - the function Remove to remove an item at any
+ //! position in the sequence.
+ //! Warning
+ //! To copy a sequence, you must explicitly call the
+ //! assignment operator (operator=).
Extrema_SeqPCOfPCFOfEPCOfExtPC2d();
+ //! Creation by copy of existing Sequence.
Standard_EXPORT Extrema_SeqPCOfPCFOfEPCOfExtPC2d(const Extrema_SeqPCOfPCFOfEPCOfExtPC2d& Other);
+ //! Removes all element(s) of the sequence <me>
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = ()
Standard_EXPORT void Clear();
~Extrema_SeqPCOfPCFOfEPCOfExtPC2d()
{
Clear();
}
+ //! Copies the contents of the sequence Other into this sequence.
+ //! If this sequence is not empty, it is automatically cleared before the copy.
Standard_EXPORT const Extrema_SeqPCOfPCFOfEPCOfExtPC2d& Assign (const Extrema_SeqPCOfPCFOfEPCOfExtPC2d& Other);
const Extrema_SeqPCOfPCFOfEPCOfExtPC2d& operator = (const Extrema_SeqPCOfPCFOfEPCOfExtPC2d& Other)
{
return Assign(Other);
}
+ //! Appends <T> at the end of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C T)
Standard_EXPORT void Append (const Extrema_POnCurv2d& T);
+ //! Concatenates <S> at the end of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void Append (Extrema_SeqPCOfPCFOfEPCOfExtPC2d& S);
+ //! Add <T> at the beginning of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (T A B C )
Standard_EXPORT void Prepend (const Extrema_POnCurv2d& T);
+ //! Concatenates <S> at the beginning of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C) S = (D E F)
+ //! after me = (D E F A B C)
+ //! S = ()
void Prepend (Extrema_SeqPCOfPCFOfEPCOfExtPC2d& S);
+ //! Inserts <T> in <me> before the position <Index>.
+ //! Raises an exception if the index is out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B D), Index = 3, T = C
+ //! after
+ //! me = (A B C D )
void InsertBefore (const Standard_Integer Index, const Extrema_POnCurv2d& T);
+ //! Inserts the sequence <S> in <me> before
+ //! the position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B F), Index = 3, S = (C D E)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertBefore (const Standard_Integer Index, Extrema_SeqPCOfPCFOfEPCOfExtPC2d& S);
+ //! Inserts <T> in <me> after the position <Index>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, T = D
+ //! after
+ //! me = (A B C D)
Standard_EXPORT void InsertAfter (const Standard_Integer Index, const Extrema_POnCurv2d& T);
+ //! Inserts the sequence <S> in <me> after the
+ //! position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bound.
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertAfter (const Standard_Integer Index, Extrema_SeqPCOfPCFOfEPCOfExtPC2d& S);
+ //! Returns the first element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns A
Standard_EXPORT const Extrema_POnCurv2d& First() const;
+ //! Returns the last element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns C
Standard_EXPORT const Extrema_POnCurv2d& Last() const;
+ //! Keeps in <me> the items 1 to <Index>-1 and
+ //! puts in <Sub> the items <Index> to the end.
+ //! Example:
+ //! before
+ //! me = (A B C D) ,Index = 3
+ //! after
+ //! me = (A B)
+ //! Sub = (C D)
void Split (const Standard_Integer Index, Extrema_SeqPCOfPCFOfEPCOfExtPC2d& Sub);
+ //! Returns the Item at position <Index> in <me>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT const Extrema_POnCurv2d& Value (const Standard_Integer Index) const;
const Extrema_POnCurv2d& operator() (const Standard_Integer Index) const
{
return Value(Index);
}
+ //! Changes the item at position <Index>
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1, Item = D
+ //! after
+ //! me = (D B C)
Standard_EXPORT void SetValue (const Standard_Integer Index, const Extrema_POnCurv2d& I);
+ //! Returns the Item at position <Index> in
+ //! <me>. This method may be used to modify
+ //! <me> : S.Value(Index) = Item.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT Extrema_POnCurv2d& ChangeValue (const Standard_Integer Index);
Extrema_POnCurv2d& operator() (const Standard_Integer Index)
{
return ChangeValue(Index);
}
+ //! Removes from <me> the item at position <Index>.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3
+ //! after
+ //! me = (A B)
Standard_EXPORT void Remove (const Standard_Integer Index);
+ //! Removes from <me> all the items of
+ //! positions between <FromIndex> and <ToIndex>.
+ //! Raises an exception if the indices are out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B C D E F), FromIndex = 1 ToIndex = 3
+ //! after
+ //! me = (D E F)
Standard_EXPORT void Remove (const Standard_Integer FromIndex, const Standard_Integer ToIndex);
DEFINE_STANDARD_ALLOC
+ //! Constructs an empty sequence.
+ //! Use:
+ //! - the function Append or Prepend to add an item or
+ //! a collection of items at the end, or at the beginning of the sequence,
+ //! - the function InsertAfter or InsertBefore to add an
+ //! item or a collection of items at any position in the sequence,
+ //! - operator() or the function SetValue to assign a
+ //! new value to an item of the sequence,
+ //! - operator() to read an item of the sequence,
+ //! - the function Remove to remove an item at any
+ //! position in the sequence.
+ //! Warning
+ //! To copy a sequence, you must explicitly call the
+ //! assignment operator (operator=).
Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC();
+ //! Creation by copy of existing Sequence.
Standard_EXPORT Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC(const Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC& Other);
+ //! Removes all element(s) of the sequence <me>
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = ()
Standard_EXPORT void Clear();
~Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC()
{
Clear();
}
+ //! Copies the contents of the sequence Other into this sequence.
+ //! If this sequence is not empty, it is automatically cleared before the copy.
Standard_EXPORT const Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC& Assign (const Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC& Other);
const Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC& operator = (const Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC& Other)
{
return Assign(Other);
}
+ //! Appends <T> at the end of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C T)
Standard_EXPORT void Append (const Extrema_POnCurv& T);
+ //! Concatenates <S> at the end of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void Append (Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC& S);
+ //! Add <T> at the beginning of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (T A B C )
Standard_EXPORT void Prepend (const Extrema_POnCurv& T);
+ //! Concatenates <S> at the beginning of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C) S = (D E F)
+ //! after me = (D E F A B C)
+ //! S = ()
void Prepend (Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC& S);
+ //! Inserts <T> in <me> before the position <Index>.
+ //! Raises an exception if the index is out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B D), Index = 3, T = C
+ //! after
+ //! me = (A B C D )
void InsertBefore (const Standard_Integer Index, const Extrema_POnCurv& T);
+ //! Inserts the sequence <S> in <me> before
+ //! the position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B F), Index = 3, S = (C D E)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertBefore (const Standard_Integer Index, Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC& S);
+ //! Inserts <T> in <me> after the position <Index>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, T = D
+ //! after
+ //! me = (A B C D)
Standard_EXPORT void InsertAfter (const Standard_Integer Index, const Extrema_POnCurv& T);
+ //! Inserts the sequence <S> in <me> after the
+ //! position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bound.
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertAfter (const Standard_Integer Index, Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC& S);
+ //! Returns the first element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns A
Standard_EXPORT const Extrema_POnCurv& First() const;
+ //! Returns the last element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns C
Standard_EXPORT const Extrema_POnCurv& Last() const;
+ //! Keeps in <me> the items 1 to <Index>-1 and
+ //! puts in <Sub> the items <Index> to the end.
+ //! Example:
+ //! before
+ //! me = (A B C D) ,Index = 3
+ //! after
+ //! me = (A B)
+ //! Sub = (C D)
void Split (const Standard_Integer Index, Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC& Sub);
+ //! Returns the Item at position <Index> in <me>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT const Extrema_POnCurv& Value (const Standard_Integer Index) const;
const Extrema_POnCurv& operator() (const Standard_Integer Index) const
{
return Value(Index);
}
+ //! Changes the item at position <Index>
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1, Item = D
+ //! after
+ //! me = (D B C)
Standard_EXPORT void SetValue (const Standard_Integer Index, const Extrema_POnCurv& I);
+ //! Returns the Item at position <Index> in
+ //! <me>. This method may be used to modify
+ //! <me> : S.Value(Index) = Item.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT Extrema_POnCurv& ChangeValue (const Standard_Integer Index);
Extrema_POnCurv& operator() (const Standard_Integer Index)
{
return ChangeValue(Index);
}
+ //! Removes from <me> the item at position <Index>.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3
+ //! after
+ //! me = (A B)
Standard_EXPORT void Remove (const Standard_Integer Index);
+ //! Removes from <me> all the items of
+ //! positions between <FromIndex> and <ToIndex>.
+ //! Raises an exception if the indices are out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B C D E F), FromIndex = 1 ToIndex = 3
+ //! after
+ //! me = (D E F)
Standard_EXPORT void Remove (const Standard_Integer FromIndex, const Standard_Integer ToIndex);
DEFINE_STANDARD_ALLOC
+ //! Constructs an empty sequence.
+ //! Use:
+ //! - the function Append or Prepend to add an item or
+ //! a collection of items at the end, or at the beginning of the sequence,
+ //! - the function InsertAfter or InsertBefore to add an
+ //! item or a collection of items at any position in the sequence,
+ //! - operator() or the function SetValue to assign a
+ //! new value to an item of the sequence,
+ //! - operator() to read an item of the sequence,
+ //! - the function Remove to remove an item at any
+ //! position in the sequence.
+ //! Warning
+ //! To copy a sequence, you must explicitly call the
+ //! assignment operator (operator=).
Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC2d();
+ //! Creation by copy of existing Sequence.
Standard_EXPORT Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC2d(const Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC2d& Other);
+ //! Removes all element(s) of the sequence <me>
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = ()
Standard_EXPORT void Clear();
~Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC2d()
{
Clear();
}
+ //! Copies the contents of the sequence Other into this sequence.
+ //! If this sequence is not empty, it is automatically cleared before the copy.
Standard_EXPORT const Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC2d& Assign (const Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC2d& Other);
const Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC2d& operator = (const Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC2d& Other)
{
return Assign(Other);
}
+ //! Appends <T> at the end of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C T)
Standard_EXPORT void Append (const Extrema_POnCurv2d& T);
+ //! Concatenates <S> at the end of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void Append (Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC2d& S);
+ //! Add <T> at the beginning of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (T A B C )
Standard_EXPORT void Prepend (const Extrema_POnCurv2d& T);
+ //! Concatenates <S> at the beginning of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C) S = (D E F)
+ //! after me = (D E F A B C)
+ //! S = ()
void Prepend (Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC2d& S);
+ //! Inserts <T> in <me> before the position <Index>.
+ //! Raises an exception if the index is out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B D), Index = 3, T = C
+ //! after
+ //! me = (A B C D )
void InsertBefore (const Standard_Integer Index, const Extrema_POnCurv2d& T);
+ //! Inserts the sequence <S> in <me> before
+ //! the position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B F), Index = 3, S = (C D E)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertBefore (const Standard_Integer Index, Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC2d& S);
+ //! Inserts <T> in <me> after the position <Index>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, T = D
+ //! after
+ //! me = (A B C D)
Standard_EXPORT void InsertAfter (const Standard_Integer Index, const Extrema_POnCurv2d& T);
+ //! Inserts the sequence <S> in <me> after the
+ //! position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bound.
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertAfter (const Standard_Integer Index, Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC2d& S);
+ //! Returns the first element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns A
Standard_EXPORT const Extrema_POnCurv2d& First() const;
+ //! Returns the last element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns C
Standard_EXPORT const Extrema_POnCurv2d& Last() const;
+ //! Keeps in <me> the items 1 to <Index>-1 and
+ //! puts in <Sub> the items <Index> to the end.
+ //! Example:
+ //! before
+ //! me = (A B C D) ,Index = 3
+ //! after
+ //! me = (A B)
+ //! Sub = (C D)
void Split (const Standard_Integer Index, Extrema_SeqPCOfPCLocFOfLocEPCOfLocateExtPC2d& Sub);
+ //! Returns the Item at position <Index> in <me>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT const Extrema_POnCurv2d& Value (const Standard_Integer Index) const;
const Extrema_POnCurv2d& operator() (const Standard_Integer Index) const
{
return Value(Index);
}
+ //! Changes the item at position <Index>
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1, Item = D
+ //! after
+ //! me = (D B C)
Standard_EXPORT void SetValue (const Standard_Integer Index, const Extrema_POnCurv2d& I);
+ //! Returns the Item at position <Index> in
+ //! <me>. This method may be used to modify
+ //! <me> : S.Value(Index) = Item.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT Extrema_POnCurv2d& ChangeValue (const Standard_Integer Index);
Extrema_POnCurv2d& operator() (const Standard_Integer Index)
{
return ChangeValue(Index);
}
+ //! Removes from <me> the item at position <Index>.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3
+ //! after
+ //! me = (A B)
Standard_EXPORT void Remove (const Standard_Integer Index);
+ //! Removes from <me> all the items of
+ //! positions between <FromIndex> and <ToIndex>.
+ //! Raises an exception if the indices are out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B C D E F), FromIndex = 1 ToIndex = 3
+ //! after
+ //! me = (D E F)
Standard_EXPORT void Remove (const Standard_Integer FromIndex, const Standard_Integer ToIndex);
DEFINE_STANDARD_ALLOC
+ //! Constructs an empty sequence.
+ //! Use:
+ //! - the function Append or Prepend to add an item or
+ //! a collection of items at the end, or at the beginning of the sequence,
+ //! - the function InsertAfter or InsertBefore to add an
+ //! item or a collection of items at any position in the sequence,
+ //! - operator() or the function SetValue to assign a
+ //! new value to an item of the sequence,
+ //! - operator() to read an item of the sequence,
+ //! - the function Remove to remove an item at any
+ //! position in the sequence.
+ //! Warning
+ //! To copy a sequence, you must explicitly call the
+ //! assignment operator (operator=).
Extrema_SeqPOnCOfCCLocFOfLocECC();
+ //! Creation by copy of existing Sequence.
Standard_EXPORT Extrema_SeqPOnCOfCCLocFOfLocECC(const Extrema_SeqPOnCOfCCLocFOfLocECC& Other);
+ //! Removes all element(s) of the sequence <me>
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = ()
Standard_EXPORT void Clear();
~Extrema_SeqPOnCOfCCLocFOfLocECC()
{
Clear();
}
+ //! Copies the contents of the sequence Other into this sequence.
+ //! If this sequence is not empty, it is automatically cleared before the copy.
Standard_EXPORT const Extrema_SeqPOnCOfCCLocFOfLocECC& Assign (const Extrema_SeqPOnCOfCCLocFOfLocECC& Other);
const Extrema_SeqPOnCOfCCLocFOfLocECC& operator = (const Extrema_SeqPOnCOfCCLocFOfLocECC& Other)
{
return Assign(Other);
}
+ //! Appends <T> at the end of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C T)
Standard_EXPORT void Append (const Extrema_POnCurv& T);
+ //! Concatenates <S> at the end of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void Append (Extrema_SeqPOnCOfCCLocFOfLocECC& S);
+ //! Add <T> at the beginning of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (T A B C )
Standard_EXPORT void Prepend (const Extrema_POnCurv& T);
+ //! Concatenates <S> at the beginning of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C) S = (D E F)
+ //! after me = (D E F A B C)
+ //! S = ()
void Prepend (Extrema_SeqPOnCOfCCLocFOfLocECC& S);
+ //! Inserts <T> in <me> before the position <Index>.
+ //! Raises an exception if the index is out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B D), Index = 3, T = C
+ //! after
+ //! me = (A B C D )
void InsertBefore (const Standard_Integer Index, const Extrema_POnCurv& T);
+ //! Inserts the sequence <S> in <me> before
+ //! the position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B F), Index = 3, S = (C D E)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertBefore (const Standard_Integer Index, Extrema_SeqPOnCOfCCLocFOfLocECC& S);
+ //! Inserts <T> in <me> after the position <Index>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, T = D
+ //! after
+ //! me = (A B C D)
Standard_EXPORT void InsertAfter (const Standard_Integer Index, const Extrema_POnCurv& T);
+ //! Inserts the sequence <S> in <me> after the
+ //! position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bound.
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertAfter (const Standard_Integer Index, Extrema_SeqPOnCOfCCLocFOfLocECC& S);
+ //! Returns the first element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns A
Standard_EXPORT const Extrema_POnCurv& First() const;
+ //! Returns the last element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns C
Standard_EXPORT const Extrema_POnCurv& Last() const;
+ //! Keeps in <me> the items 1 to <Index>-1 and
+ //! puts in <Sub> the items <Index> to the end.
+ //! Example:
+ //! before
+ //! me = (A B C D) ,Index = 3
+ //! after
+ //! me = (A B)
+ //! Sub = (C D)
void Split (const Standard_Integer Index, Extrema_SeqPOnCOfCCLocFOfLocECC& Sub);
+ //! Returns the Item at position <Index> in <me>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT const Extrema_POnCurv& Value (const Standard_Integer Index) const;
const Extrema_POnCurv& operator() (const Standard_Integer Index) const
{
return Value(Index);
}
+ //! Changes the item at position <Index>
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1, Item = D
+ //! after
+ //! me = (D B C)
Standard_EXPORT void SetValue (const Standard_Integer Index, const Extrema_POnCurv& I);
+ //! Returns the Item at position <Index> in
+ //! <me>. This method may be used to modify
+ //! <me> : S.Value(Index) = Item.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT Extrema_POnCurv& ChangeValue (const Standard_Integer Index);
Extrema_POnCurv& operator() (const Standard_Integer Index)
{
return ChangeValue(Index);
}
+ //! Removes from <me> the item at position <Index>.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3
+ //! after
+ //! me = (A B)
Standard_EXPORT void Remove (const Standard_Integer Index);
+ //! Removes from <me> all the items of
+ //! positions between <FromIndex> and <ToIndex>.
+ //! Raises an exception if the indices are out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B C D E F), FromIndex = 1 ToIndex = 3
+ //! after
+ //! me = (D E F)
Standard_EXPORT void Remove (const Standard_Integer FromIndex, const Standard_Integer ToIndex);
DEFINE_STANDARD_ALLOC
+ //! Constructs an empty sequence.
+ //! Use:
+ //! - the function Append or Prepend to add an item or
+ //! a collection of items at the end, or at the beginning of the sequence,
+ //! - the function InsertAfter or InsertBefore to add an
+ //! item or a collection of items at any position in the sequence,
+ //! - operator() or the function SetValue to assign a
+ //! new value to an item of the sequence,
+ //! - operator() to read an item of the sequence,
+ //! - the function Remove to remove an item at any
+ //! position in the sequence.
+ //! Warning
+ //! To copy a sequence, you must explicitly call the
+ //! assignment operator (operator=).
Extrema_SeqPOnCOfCCLocFOfLocECC2d();
+ //! Creation by copy of existing Sequence.
Standard_EXPORT Extrema_SeqPOnCOfCCLocFOfLocECC2d(const Extrema_SeqPOnCOfCCLocFOfLocECC2d& Other);
+ //! Removes all element(s) of the sequence <me>
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = ()
Standard_EXPORT void Clear();
~Extrema_SeqPOnCOfCCLocFOfLocECC2d()
{
Clear();
}
+ //! Copies the contents of the sequence Other into this sequence.
+ //! If this sequence is not empty, it is automatically cleared before the copy.
Standard_EXPORT const Extrema_SeqPOnCOfCCLocFOfLocECC2d& Assign (const Extrema_SeqPOnCOfCCLocFOfLocECC2d& Other);
const Extrema_SeqPOnCOfCCLocFOfLocECC2d& operator = (const Extrema_SeqPOnCOfCCLocFOfLocECC2d& Other)
{
return Assign(Other);
}
+ //! Appends <T> at the end of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C T)
Standard_EXPORT void Append (const Extrema_POnCurv2d& T);
+ //! Concatenates <S> at the end of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void Append (Extrema_SeqPOnCOfCCLocFOfLocECC2d& S);
+ //! Add <T> at the beginning of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (T A B C )
Standard_EXPORT void Prepend (const Extrema_POnCurv2d& T);
+ //! Concatenates <S> at the beginning of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C) S = (D E F)
+ //! after me = (D E F A B C)
+ //! S = ()
void Prepend (Extrema_SeqPOnCOfCCLocFOfLocECC2d& S);
+ //! Inserts <T> in <me> before the position <Index>.
+ //! Raises an exception if the index is out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B D), Index = 3, T = C
+ //! after
+ //! me = (A B C D )
void InsertBefore (const Standard_Integer Index, const Extrema_POnCurv2d& T);
+ //! Inserts the sequence <S> in <me> before
+ //! the position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B F), Index = 3, S = (C D E)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertBefore (const Standard_Integer Index, Extrema_SeqPOnCOfCCLocFOfLocECC2d& S);
+ //! Inserts <T> in <me> after the position <Index>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, T = D
+ //! after
+ //! me = (A B C D)
Standard_EXPORT void InsertAfter (const Standard_Integer Index, const Extrema_POnCurv2d& T);
+ //! Inserts the sequence <S> in <me> after the
+ //! position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bound.
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertAfter (const Standard_Integer Index, Extrema_SeqPOnCOfCCLocFOfLocECC2d& S);
+ //! Returns the first element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns A
Standard_EXPORT const Extrema_POnCurv2d& First() const;
+ //! Returns the last element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns C
Standard_EXPORT const Extrema_POnCurv2d& Last() const;
+ //! Keeps in <me> the items 1 to <Index>-1 and
+ //! puts in <Sub> the items <Index> to the end.
+ //! Example:
+ //! before
+ //! me = (A B C D) ,Index = 3
+ //! after
+ //! me = (A B)
+ //! Sub = (C D)
void Split (const Standard_Integer Index, Extrema_SeqPOnCOfCCLocFOfLocECC2d& Sub);
+ //! Returns the Item at position <Index> in <me>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT const Extrema_POnCurv2d& Value (const Standard_Integer Index) const;
const Extrema_POnCurv2d& operator() (const Standard_Integer Index) const
{
return Value(Index);
}
+ //! Changes the item at position <Index>
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1, Item = D
+ //! after
+ //! me = (D B C)
Standard_EXPORT void SetValue (const Standard_Integer Index, const Extrema_POnCurv2d& I);
+ //! Returns the Item at position <Index> in
+ //! <me>. This method may be used to modify
+ //! <me> : S.Value(Index) = Item.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT Extrema_POnCurv2d& ChangeValue (const Standard_Integer Index);
Extrema_POnCurv2d& operator() (const Standard_Integer Index)
{
return ChangeValue(Index);
}
+ //! Removes from <me> the item at position <Index>.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3
+ //! after
+ //! me = (A B)
Standard_EXPORT void Remove (const Standard_Integer Index);
+ //! Removes from <me> all the items of
+ //! positions between <FromIndex> and <ToIndex>.
+ //! Raises an exception if the indices are out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B C D E F), FromIndex = 1 ToIndex = 3
+ //! after
+ //! me = (D E F)
Standard_EXPORT void Remove (const Standard_Integer FromIndex, const Standard_Integer ToIndex);
public:
+ //! Creates an empty GenHCurve2d.
Standard_EXPORT Geom2dAdaptor_GHCurve();
+ //! Creates a GenHCurve2d from a Curve
Standard_EXPORT Geom2dAdaptor_GHCurve(const Geom2dAdaptor_Curve& C);
+ //! Sets the field of the GenHCurve2d.
Standard_EXPORT void Set (const Geom2dAdaptor_Curve& C);
+ //! Returns the curve used to create the GenHCurve2d.
+ //! This is redefined from HCurve2d, cannot be inline.
Standard_EXPORT const Adaptor2d_Curve2d& Curve2d() const;
+ //! Returns the curve used to create the GenHCurve.
Geom2dAdaptor_Curve& ChangeCurve2d();
DEFINE_STANDARD_ALLOC
+ //! Empty constructor, undefined algorithm.
Standard_EXPORT Geom2dHatch_Classifier();
+ //! Creates an algorithm to classify the Point P with
+ //! Tolerance <T> on the face described by <F>.
Standard_EXPORT Geom2dHatch_Classifier(Geom2dHatch_Elements& F, const gp_Pnt2d& P, const Standard_Real Tol);
+ //! Classify the Point P with Tolerance <T> on the
+ //! face described by <F>.
Standard_EXPORT void Perform (Geom2dHatch_Elements& F, const gp_Pnt2d& P, const Standard_Real Tol);
+ //! Returns the result of the classification.
Standard_EXPORT TopAbs_State State() const;
+ //! Returns True when the state was computed by a
+ //! rejection. The state is OUT.
Standard_Boolean Rejected() const;
+ //! Returns True if the face contains no wire. The
+ //! state is IN.
Standard_Boolean NoWires() const;
+ //! Returns the Edge used to determine the
+ //! classification. When the State is ON this is the
+ //! Edge containing the point.
Standard_EXPORT const Geom2dAdaptor_Curve& Edge() const;
+ //! Returns the parameter on Edge() used to determine the
+ //! classification.
Standard_EXPORT Standard_Real EdgeParameter() const;
+ //! Returns the position of the point on the edge
+ //! returned by Edge.
IntRes2d_Position Position() const;
DEFINE_STANDARD_ALLOC
+ //! Creates an undefined classifier.
Standard_EXPORT Geom2dHatch_FClass2dOfClassifier();
+ //! Starts a classification process. The point to
+ //! classify is the origin of the line <L>. <P> is
+ //! the original length of the segment on <L> used to
+ //! compute intersections. <Tol> is the tolerance
+ //! attached to the line segment in intersections.
Standard_EXPORT void Reset (const gp_Lin2d& L, const Standard_Real P, const Standard_Real Tol);
+ //! Updates the classification process with the edge
+ //! <E> from the boundary.
Standard_EXPORT void Compare (const Geom2dAdaptor_Curve& E, const TopAbs_Orientation Or);
+ //! Returns the current value of the parameter.
Standard_Real Parameter() const;
+ //! Returns the intersecting algorithm.
Geom2dHatch_Intersector& Intersector();
+ //! Returns 0 if the last compared edge had no
+ //! relevant intersection. Else returns the index of
+ //! this intersection in the last intersection
+ //! algorithm.
Standard_Integer ClosestIntersection() const;
+ //! Returns the current state of the point.
TopAbs_State State() const;
+ //! Returns the Standard_True if the closest intersection point
+ //! represents head or end of the edge. Returns Standard_False
+ //! otherwise.
Standard_Boolean IsHeadOrEnd() const;
DEFINE_STANDARD_ALLOC
+ //! Empty constructor.
Geom2dInt_GInter();
+ //! Self Intersection of a curve
Geom2dInt_GInter(const Adaptor2d_Curve2d& C, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Self Intersection of a curve with a domain.
Geom2dInt_GInter(const Adaptor2d_Curve2d& C, const IntRes2d_Domain& D, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between 2 curves.
Geom2dInt_GInter(const Adaptor2d_Curve2d& C1, const Adaptor2d_Curve2d& C2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between 2 curves.
Geom2dInt_GInter(const Adaptor2d_Curve2d& C1, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& C2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between 2 curves.
Geom2dInt_GInter(const Adaptor2d_Curve2d& C1, const Adaptor2d_Curve2d& C2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between 2 curves.
Geom2dInt_GInter(const Adaptor2d_Curve2d& C1, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& C2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between 2 curves.
Standard_EXPORT void Perform (const Adaptor2d_Curve2d& C1, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& C2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between 2 curves.
void Perform (const Adaptor2d_Curve2d& C1, const Adaptor2d_Curve2d& C2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between 2 curves.
Standard_EXPORT void Perform (const Adaptor2d_Curve2d& C1, const IntRes2d_Domain& D1, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between 2 curves.
Standard_EXPORT void Perform (const Adaptor2d_Curve2d& C1, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between 2 curves.
void Perform (const Adaptor2d_Curve2d& C1, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& C2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between 2 curves.
void Perform (const Adaptor2d_Curve2d& C1, const Adaptor2d_Curve2d& C2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Create a domain from a curve
Standard_EXPORT IntRes2d_Domain ComputeDomain (const Adaptor2d_Curve2d& C1, const Standard_Real TolDomain) const;
private:
+ //! Intersection between 2 curves.
Standard_EXPORT void InternalPerform (const Adaptor2d_Curve2d& C1, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& C2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol, const Standard_Boolean Composite);
+ //! Part of InternalCompositePerform function
Standard_EXPORT void InternalCompositePerform_noRecurs (const Standard_Integer NbInterC1, const Adaptor2d_Curve2d& C1, const Standard_Integer NumInterC1, const TColStd_Array1OfReal& Tab1, const IntRes2d_Domain& D1, const Standard_Integer NbInterC2, const Adaptor2d_Curve2d& C2, const Standard_Integer NumInterC2, const TColStd_Array1OfReal& Tab2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between 2 curves.
Standard_EXPORT void InternalCompositePerform (const Adaptor2d_Curve2d& C1, const IntRes2d_Domain& D1, const Standard_Integer N1, const Standard_Integer NB1, const TColStd_Array1OfReal& Tab1, const Adaptor2d_Curve2d& C2, const IntRes2d_Domain& D2, const Standard_Integer N2, const Standard_Integer NB2, const TColStd_Array1OfReal& Tab2, const Standard_Real TolConf, const Standard_Real Tol, const Standard_Boolean Composite);
DEFINE_STANDARD_ALLOC
+ //! Empty constructor.
Standard_EXPORT Geom2dInt_IntConicCurveOfGInter();
+ //! Intersection between a line and a parametric curve.
Standard_EXPORT Geom2dInt_IntConicCurveOfGInter(const gp_Lin2d& L, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between a line and a parametric curve.
Standard_EXPORT Geom2dInt_IntConicCurveOfGInter(const gp_Circ2d& C, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between an ellipse and a parametric curve.
Standard_EXPORT Geom2dInt_IntConicCurveOfGInter(const gp_Elips2d& E, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between a parabola and a parametric curve.
Standard_EXPORT Geom2dInt_IntConicCurveOfGInter(const gp_Parab2d& Prb, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between the main branch of an hyperbola
+ //! and a parametric curve.
Standard_EXPORT Geom2dInt_IntConicCurveOfGInter(const gp_Hypr2d& H, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between a line and a parametric curve.
Standard_EXPORT void Perform (const gp_Lin2d& L, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between a line and a parametric curve.
Standard_EXPORT void Perform (const gp_Circ2d& C, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between an ellipse and a parametric curve.
Standard_EXPORT void Perform (const gp_Elips2d& E, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between a parabola and a parametric curve.
Standard_EXPORT void Perform (const gp_Parab2d& Prb, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between the main branch of an hyperbola
+ //! and a parametric curve.
Standard_EXPORT void Perform (const gp_Hypr2d& H, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
DEFINE_STANDARD_ALLOC
+ //! Constructor of the class.
Standard_EXPORT Geom2dInt_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfGInter(const IntCurve_IConicTool& IT, const Adaptor2d_Curve2d& PC);
+ //! Computes the value of the signed distance between
+ //! the implicit curve and the point at parameter Param
+ //! on the parametrised curve.
Standard_EXPORT Standard_Boolean Value (const Standard_Real Param, Standard_Real& F) Standard_OVERRIDE;
+ //! Computes the derivative of the previous function at
+ //! parameter Param.
Standard_EXPORT Standard_Boolean Derivative (const Standard_Real Param, Standard_Real& D) Standard_OVERRIDE;
+ //! Computes the value and the derivative of the function.
Standard_EXPORT Standard_Boolean Values (const Standard_Real Param, Standard_Real& F, Standard_Real& D) Standard_OVERRIDE;
Standard_EXPORT Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter(const gp_Pnt2d& P, const Adaptor2d_Curve2d& C);
+ //! sets the field mycurve of the function.
Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& C);
+ //! sets the field P of the function.
Standard_EXPORT void SetPoint (const gp_Pnt2d& P);
+ //! Calculation of F(U).
Standard_EXPORT Standard_Boolean Value (const Standard_Real U, Standard_Real& F);
+ //! Calculation of F'(U).
Standard_EXPORT Standard_Boolean Derivative (const Standard_Real U, Standard_Real& DF);
+ //! Calculation of F(U) and F'(U).
Standard_EXPORT Standard_Boolean Values (const Standard_Real U, Standard_Real& F, Standard_Real& DF);
+ //! Save the found extremum.
Standard_EXPORT virtual Standard_Integer GetStateNumber() Standard_OVERRIDE;
+ //! Return the nunber of found extrema.
Standard_EXPORT Standard_Integer NbExt() const;
+ //! Returns the Nth distance.
Standard_EXPORT Standard_Real SquareDistance (const Standard_Integer N) const;
+ //! Shows if the Nth distance is a minimum.
Standard_EXPORT Standard_Boolean IsMin (const Standard_Integer N) const;
+ //! Returns the Nth extremum.
Standard_EXPORT const Extrema_POnCurv2d& Point (const Standard_Integer N) const;
+ //! Determines boundaries of subinterval for find of root.
Standard_EXPORT void SubIntervalInitialize (const Standard_Real theUfirst, const Standard_Real theUlast);
+ //! Computes a Tol value. If 1st derivative of curve
+ //! |D1|<Tol, it is considered D1=0.
Standard_EXPORT Standard_Real SearchOfTolerance();
DEFINE_STANDARD_ALLOC
+ //! Constructs an empty sequence.
+ //! Use:
+ //! - the function Append or Prepend to add an item or
+ //! a collection of items at the end, or at the beginning of the sequence,
+ //! - the function InsertAfter or InsertBefore to add an
+ //! item or a collection of items at any position in the sequence,
+ //! - operator() or the function SetValue to assign a
+ //! new value to an item of the sequence,
+ //! - operator() to read an item of the sequence,
+ //! - the function Remove to remove an item at any
+ //! position in the sequence.
+ //! Warning
+ //! To copy a sequence, you must explicitly call the
+ //! assignment operator (operator=).
Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter();
+ //! Creation by copy of existing Sequence.
Standard_EXPORT Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter(const Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter& Other);
+ //! Removes all element(s) of the sequence <me>
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = ()
Standard_EXPORT void Clear();
~Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter()
{
Clear();
}
+ //! Copies the contents of the sequence Other into this sequence.
+ //! If this sequence is not empty, it is automatically cleared before the copy.
Standard_EXPORT const Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter& Assign (const Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter& Other);
const Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter& operator = (const Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter& Other)
{
return Assign(Other);
}
+ //! Appends <T> at the end of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C T)
Standard_EXPORT void Append (const Extrema_POnCurv2d& T);
+ //! Concatenates <S> at the end of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void Append (Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter& S);
+ //! Add <T> at the beginning of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (T A B C )
Standard_EXPORT void Prepend (const Extrema_POnCurv2d& T);
+ //! Concatenates <S> at the beginning of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C) S = (D E F)
+ //! after me = (D E F A B C)
+ //! S = ()
void Prepend (Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter& S);
+ //! Inserts <T> in <me> before the position <Index>.
+ //! Raises an exception if the index is out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B D), Index = 3, T = C
+ //! after
+ //! me = (A B C D )
void InsertBefore (const Standard_Integer Index, const Extrema_POnCurv2d& T);
+ //! Inserts the sequence <S> in <me> before
+ //! the position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B F), Index = 3, S = (C D E)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertBefore (const Standard_Integer Index, Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter& S);
+ //! Inserts <T> in <me> after the position <Index>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, T = D
+ //! after
+ //! me = (A B C D)
Standard_EXPORT void InsertAfter (const Standard_Integer Index, const Extrema_POnCurv2d& T);
+ //! Inserts the sequence <S> in <me> after the
+ //! position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bound.
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertAfter (const Standard_Integer Index, Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter& S);
+ //! Returns the first element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns A
Standard_EXPORT const Extrema_POnCurv2d& First() const;
+ //! Returns the last element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns C
Standard_EXPORT const Extrema_POnCurv2d& Last() const;
+ //! Keeps in <me> the items 1 to <Index>-1 and
+ //! puts in <Sub> the items <Index> to the end.
+ //! Example:
+ //! before
+ //! me = (A B C D) ,Index = 3
+ //! after
+ //! me = (A B)
+ //! Sub = (C D)
void Split (const Standard_Integer Index, Geom2dInt_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfGInter& Sub);
+ //! Returns the Item at position <Index> in <me>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT const Extrema_POnCurv2d& Value (const Standard_Integer Index) const;
const Extrema_POnCurv2d& operator() (const Standard_Integer Index) const
{
return Value(Index);
}
+ //! Changes the item at position <Index>
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1, Item = D
+ //! after
+ //! me = (D B C)
Standard_EXPORT void SetValue (const Standard_Integer Index, const Extrema_POnCurv2d& I);
+ //! Returns the Item at position <Index> in
+ //! <me>. This method may be used to modify
+ //! <me> : S.Value(Index) = Item.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT Extrema_POnCurv2d& ChangeValue (const Standard_Integer Index);
Extrema_POnCurv2d& operator() (const Standard_Integer Index)
{
return ChangeValue(Index);
}
+ //! Removes from <me> the item at position <Index>.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3
+ //! after
+ //! me = (A B)
Standard_EXPORT void Remove (const Standard_Integer Index);
+ //! Removes from <me> all the items of
+ //! positions between <FromIndex> and <ToIndex>.
+ //! Raises an exception if the indices are out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B C D E F), FromIndex = 1 ToIndex = 3
+ //! after
+ //! me = (D E F)
Standard_EXPORT void Remove (const Standard_Integer FromIndex, const Standard_Integer ToIndex);
DEFINE_STANDARD_ALLOC
+ //! Among a set of points {C(ui),i=1,NbU}, locate the point
+ //! P=C(uj) such that:
+ //! distance(P,C) = Min{distance(P,C(ui))}
Standard_EXPORT static void Locate (const gp_Pnt2d& P, const Adaptor2d_Curve2d& C, const Standard_Integer NbU, Extrema_POnCurv2d& Papp);
+ //! Among a set of points {C(ui),i=1,NbU}, locate the point
+ //! P=C(uj) such that:
+ //! distance(P,C) = Min{distance(P,C(ui))}
+ //! The research is done between umin and usup.
Standard_EXPORT static void Locate (const gp_Pnt2d& P, const Adaptor2d_Curve2d& C, const Standard_Integer NbU, const Standard_Real Umin, const Standard_Real Usup, Extrema_POnCurv2d& Papp);
+ //! Among two sets of points {C1(ui),i=1,NbU} and
+ //! {C2(vj),j=1,NbV}, locate the two points P1=C1(uk) and
+ //! P2=C2(vl) such that:
+ //! distance(P1,P2) = Min {distance(C1(ui),C2(vj))}.
Standard_EXPORT static void Locate (const Adaptor2d_Curve2d& C1, const Adaptor2d_Curve2d& C2, const Standard_Integer NbU, const Standard_Integer NbV, Extrema_POnCurv2d& Papp1, Extrema_POnCurv2d& Papp2);
Standard_EXPORT Geom2dInt_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfGInter(const Adaptor2d_Curve2d& curve1, const Adaptor2d_Curve2d& curve2);
+ //! returns 2.
Standard_EXPORT Standard_Integer NbVariables() const;
+ //! returns 2.
Standard_EXPORT Standard_Integer NbEquations() const;
+ //! computes the values <F> of the Functions for the
+ //! variable <X>.
+ //! returns True if the computation was done successfully,
+ //! False otherwise.
Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F);
+ //! returns the values <D> of the derivatives for the
+ //! variable <X>.
+ //! returns True if the computation was done successfully,
+ //! False otherwise.
Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D);
+ //! returns the values <F> of the functions and the derivatives
+ //! <D> for the variable <X>.
+ //! returns True if the computation was done successfully,
+ //! False otherwise.
Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D);
DEFINE_STANDARD_ALLOC
+ //! Empty constructor.
Geom2dInt_TheIntConicCurveOfGInter();
+ //! Intersection between a line and a parametric curve.
Geom2dInt_TheIntConicCurveOfGInter(const gp_Lin2d& L, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between a line and a parametric curve.
Standard_EXPORT Geom2dInt_TheIntConicCurveOfGInter(const gp_Circ2d& C, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between an ellipse and a parametric curve.
Standard_EXPORT Geom2dInt_TheIntConicCurveOfGInter(const gp_Elips2d& E, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between a parabola and a parametric curve.
Standard_EXPORT Geom2dInt_TheIntConicCurveOfGInter(const gp_Parab2d& Prb, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between the main branch of an hyperbola
+ //! and a parametric curve.
Standard_EXPORT Geom2dInt_TheIntConicCurveOfGInter(const gp_Hypr2d& H, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between a line and a parametric curve.
void Perform (const gp_Lin2d& L, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between a line and a parametric curve.
void Perform (const gp_Circ2d& C, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between an ellipse and a parametric curve.
void Perform (const gp_Elips2d& E, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between a parabola and a parametric curve.
void Perform (const gp_Parab2d& Prb, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between the main branch of an hyperbola
+ //! and a parametric curve.
void Perform (const gp_Hypr2d& H, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
private:
+ //! Intersection between a conic fom gp
+ //! and a parametric curve.
void Perform (const IntCurve_IConicTool& ICurve, const IntRes2d_Domain& D1, const Adaptor2d_Curve2d& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
private:
+ //! Method to find intersection between two curves
+ //! : returns false for case when some points of polygon
+ //! : were replaced on line and exact point of intersection was not found
+ //! : for case when point of intersection was found
+ //! : during prelimanary search for line (case of bad paramerization of Bspline for example).
Standard_EXPORT Standard_Boolean findIntersect (const Adaptor2d_Curve2d& Curve1, const IntRes2d_Domain& Domain1, const Adaptor2d_Curve2d& Curve2, const IntRes2d_Domain& Domain2, const Standard_Real TolConf, const Standard_Real Tol, const Standard_Integer NbIter, const Standard_Real DeltaU, const Standard_Real DeltaV, const Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter& thePoly1, const Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter& thePoly2, const Standard_Boolean isFullRepresentation);
DEFINE_STANDARD_ALLOC
+ //! Empty constructor.
Standard_EXPORT Geom2dInt_TheIntersectorOfTheIntConicCurveOfGInter();
+ //! Intersection between an implicit curve and
+ //! a parametrised curve.
+ //! The exception ConstructionError is raised if the domain
+ //! of the parametrised curve does not verify HasFirstPoint
+ //! and HasLastPoint return True.
Standard_EXPORT Geom2dInt_TheIntersectorOfTheIntConicCurveOfGInter(const IntCurve_IConicTool& ITool, const IntRes2d_Domain& Dom1, const Adaptor2d_Curve2d& PCurve, const IntRes2d_Domain& Dom2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between an implicit curve and
+ //! a parametrised curve.
+ //! The exception ConstructionError is raised if the domain
+ //! of the parametrised curve does not verify HasFirstPoint
+ //! and HasLastPoint return True.
Standard_EXPORT void Perform (const IntCurve_IConicTool& ITool, const IntRes2d_Domain& Dom1, const Adaptor2d_Curve2d& PCurve, const IntRes2d_Domain& Dom2, const Standard_Real TolConf, const Standard_Real Tol);
Standard_EXPORT Standard_Real FindU (const Standard_Real parameter, gp_Pnt2d& point, const Adaptor2d_Curve2d& TheParCurev, const IntCurve_IConicTool& TheImpTool) const;
Standard_EXPORT Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter();
+ //! Calculates the distance with a close point.
+ //! The close point is defined by the parameter value
+ //! U0.
+ //! The function F(u)=distance(P,C(u)) has an extremum
+ //! when g(u)=dF/du=0. The algorithm searchs a zero
+ //! near the close point.
+ //! TolU is used to decide to stop the iterations.
+ //! At the nth iteration, the criteria is:
+ //! abs(Un - Un-1) < TolU.
Standard_EXPORT Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter(const gp_Pnt2d& P, const Adaptor2d_Curve2d& C, const Standard_Real U0, const Standard_Real TolU);
+ //! Calculates the distance with a close point.
+ //! The close point is defined by the parameter value
+ //! U0.
+ //! The function F(u)=distance(P,C(u)) has an extremum
+ //! when g(u)=dF/du=0. The algorithm searchs a zero
+ //! near the close point.
+ //! Zeros are searched between Umin et Usup.
+ //! TolU is used to decide to stop the iterations.
+ //! At the nth iteration, the criteria is:
+ //! abs(Un - Un-1) < TolU.
Standard_EXPORT Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter(const gp_Pnt2d& P, const Adaptor2d_Curve2d& C, const Standard_Real U0, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real TolU);
+ //! sets the fields of the algorithm.
Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& C, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real TolU);
+ //! the algorithm is done with the point P.
+ //! An exception is raised if the fields have not
+ //! been initialized.
Standard_EXPORT void Perform (const gp_Pnt2d& P, const Standard_Real U0);
+ //! Returns True if the distance is found.
Standard_EXPORT Standard_Boolean IsDone() const;
+ //! Returns the value of the extremum square distance.
Standard_EXPORT Standard_Real SquareDistance() const;
+ //! Returns True if the extremum distance is a minimum.
Standard_EXPORT Standard_Boolean IsMin() const;
+ //! Returns the point of the extremum distance.
Standard_EXPORT const Extrema_POnCurv2d& Point() const;
DEFINE_STANDARD_ALLOC
+ //! Compute a polygon on the domain of the curve.
Standard_EXPORT Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter(const Adaptor2d_Curve2d& Curve, const Standard_Integer NbPnt, const IntRes2d_Domain& Domain, const Standard_Real Tol);
+ //! The current polygon is modified if most
+ //! of the points of the polygon are are
+ //! outside the box <OtherBox>. In this
+ //! situation, bounds are computed to build
+ //! a polygon inside or near the OtherBox.
Standard_EXPORT void ComputeWithBox (const Adaptor2d_Curve2d& Curve, const Bnd_Box2d& OtherBox);
virtual Standard_Real DeflectionOverEstimation() const Standard_OVERRIDE;
void Closed (const Standard_Boolean clos);
+ //! Give the number of Segments in the polyline.
virtual Standard_Integer NbSegments() const Standard_OVERRIDE;
+ //! Returns the points of the segment <Index> in the Polygon.
Standard_EXPORT virtual void Segment (const Standard_Integer theIndex, gp_Pnt2d& theBegin, gp_Pnt2d& theEnd) const Standard_OVERRIDE;
+ //! Returns the parameter (On the curve)
+ //! of the first point of the Polygon
Standard_Real InfParameter() const;
+ //! Returns the parameter (On the curve)
+ //! of the last point of the Polygon
Standard_Real SupParameter() const;
Standard_EXPORT Standard_Boolean AutoIntersectionIsPossible() const;
+ //! Give an approximation of the parameter on the curve
+ //! according to the discretization of the Curve.
Standard_EXPORT Standard_Real ApproxParamOnCurve (const Standard_Integer Index, const Standard_Real ParamOnLine) const;
Standard_Integer CalculRegion (const Standard_Real x, const Standard_Real y, const Standard_Real x1, const Standard_Real x2, const Standard_Real y1, const Standard_Real y2) const;
DEFINE_STANDARD_ALLOC
+ //! Returns the parameter V of the point on the
+ //! parametric curve corresponding to the Point Pnt.
+ //! The Correspondance between Pnt and the point P(V)
+ //! on the parametric curve must be coherent with the
+ //! way of determination of the signed distance
+ //! between a point and the implicit curve.
+ //! Tol is the tolerance on the distance between a point
+ //! and the parametrised curve.
+ //! In that case, no bounds are given. The research of
+ //! the rigth parameter has to be made on the natural
+ //! parametric domain of the curve.
Standard_EXPORT static Standard_Real FindParameter (const Adaptor2d_Curve2d& C, const gp_Pnt2d& Pnt, const Standard_Real Tol);
+ //! Returns the parameter V of the point on the
+ //! parametric curve corresponding to the Point Pnt.
+ //! The Correspondance between Pnt and the point P(V)
+ //! on the parametric curve must be coherent with the
+ //! way of determination of the signed distance
+ //! between a point and the implicit curve.
+ //! Tol is the tolerance on the distance between a point
+ //! and the parametrised curve.
+ //! LowParameter and HighParameter give the
+ //! boundaries of the interval in wich the parameter
+ //! certainly lies. These parameters are given to
+ //! implement a more efficient algoritm. So, it is not
+ //! necessary to check that the returned value verifies
+ //! LowParameter <= Value <= HighParameter.
Standard_EXPORT static Standard_Real FindParameter (const Adaptor2d_Curve2d& C, const gp_Pnt2d& Pnt, const Standard_Real LowParameter, const Standard_Real HighParameter, const Standard_Real Tol);
DEFINE_STANDARD_ALLOC
+ //! Initializes the local properties of the curve <C>
+ //! The current point and the derivatives are
+ //! computed at the same time, which allows an
+ //! optimization of the computation time.
+ //! <N> indicates the maximum number of derivations to
+ //! be done (0, 1, 2 or 3). For example, to compute
+ //! only the tangent, N should be equal to 1.
+ //! <Resolution> is the linear tolerance (it is used to test
+ //! if a vector is null).
Standard_EXPORT Geom2dLProp_CLProps2d(const Handle(Geom2d_Curve)& C, const Standard_Integer N, const Standard_Real Resolution);
+ //! Same as previous constructor but here the parameter is
+ //! set to the value <U>.
+ //! All the computations done will be related to <C> and <U>.
Standard_EXPORT Geom2dLProp_CLProps2d(const Handle(Geom2d_Curve)& C, const Standard_Real U, const Standard_Integer N, const Standard_Real Resolution);
+ //! Same as previous constructor but here the parameter is
+ //! set to the value <U> and the curve is set
+ //! with SetCurve.
+ //! the curve can have a empty constructor
+ //! All the computations done will be related to <C> and <U>
+ //! when the functions "set" will be done.
Standard_EXPORT Geom2dLProp_CLProps2d(const Standard_Integer N, const Standard_Real Resolution);
+ //! Initializes the local properties of the curve
+ //! for the parameter value <U>.
Standard_EXPORT void SetParameter (const Standard_Real U);
+ //! Initializes the local properties of the curve
+ //! for the new curve.
Standard_EXPORT void SetCurve (const Handle(Geom2d_Curve)& C);
+ //! Returns the Point.
Standard_EXPORT const gp_Pnt2d& Value() const;
+ //! Returns the first derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec2d& D1();
+ //! Returns the second derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec2d& D2();
+ //! Returns the third derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec2d& D3();
+ //! Returns True if the tangent is defined.
+ //! For example, the tangent is not defined if the
+ //! three first derivatives are all null.
Standard_EXPORT Standard_Boolean IsTangentDefined();
+ //! output the tangent direction <D>
Standard_EXPORT void Tangent (gp_Dir2d& D);
+ //! Returns the curvature.
Standard_EXPORT Standard_Real Curvature();
+ //! Returns the normal direction <N>.
Standard_EXPORT void Normal (gp_Dir2d& N);
+ //! Returns the centre of curvature <P>.
Standard_EXPORT void CentreOfCurvature (gp_Pnt2d& P);
public:
+ //! Creates an empty GenHCurve.
Standard_EXPORT GeomAdaptor_GHCurve();
+ //! Creates a GenHCurve from a Curve
Standard_EXPORT GeomAdaptor_GHCurve(const GeomAdaptor_Curve& C);
+ //! Sets the field of the GenHCurve.
Standard_EXPORT void Set (const GeomAdaptor_Curve& C);
+ //! Returns the curve used to create the GenHCurve.
+ //! This is redefined from HCurve, cannot be inline.
Standard_EXPORT const Adaptor3d_Curve& Curve() const;
+ //! Returns the curve used to create the GenHCurve.
+ //! This is redefined from HCurve, cannot be inline.
Standard_EXPORT Adaptor3d_Curve& GetCurve();
+ //! Returns the curve used to create the GenHCurve.
GeomAdaptor_Curve& ChangeCurve();
public:
+ //! Creates an empty GenHSurface.
Standard_EXPORT GeomAdaptor_GHSurface();
+ //! Creates a GenHSurface from a Surface.
Standard_EXPORT GeomAdaptor_GHSurface(const GeomAdaptor_Surface& S);
+ //! Sets the field of the GenHSurface.
Standard_EXPORT void Set (const GeomAdaptor_Surface& S);
+ //! Returns a reference to the Surface inside the HSurface.
+ //! This is redefined from HSurface, cannot be inline.
Standard_EXPORT const Adaptor3d_Surface& Surface() const;
+ //! Returns the surface used to create the GenHSurface.
GeomAdaptor_Surface& ChangeSurface();
Standard_EXPORT void Init (const Standard_Integer Degmin, const Standard_Integer Degmax, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIt, const Standard_Boolean KnownParameters = Standard_False);
+ //! Define the type of parametrization used in the approximation
Standard_EXPORT void SetParType (const Approx_ParametrizationType ParType);
+ //! Define the Continuity used in the approximation
Standard_EXPORT void SetContinuity (const GeomAbs_Shape C);
+ //! define the Weights associed to the criterium used in
+ //! the optimization.
+ //!
+ //! if Wi <= 0
Standard_EXPORT void SetCriteriumWeight (const Standard_Real W1, const Standard_Real W2, const Standard_Real W3);
+ //! returns the type of parametrization used in the approximation
Standard_EXPORT Approx_ParametrizationType ParType() const;
+ //! returns the Continuity used in the approximation
Standard_EXPORT GeomAbs_Shape Continuity() const;
+ //! returns the Weights (as percent) associed to the criterium used in
+ //! the optimization.
Standard_EXPORT void CriteriumWeight (Standard_Real& W1, Standard_Real& W2, Standard_Real& W3) const;
Standard_EXPORT void Perform (const Handle(GeomFill_Line)& Lin, GeomFill_SectionGenerator& SecGen, const Standard_Boolean SpApprox = Standard_False);
Standard_EXPORT void Init (const Standard_Integer Degmin, const Standard_Integer Degmax, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Integer NbIt, const Standard_Boolean KnownParameters = Standard_False);
+ //! Define the type of parametrization used in the approximation
Standard_EXPORT void SetParType (const Approx_ParametrizationType ParType);
+ //! Define the Continuity used in the approximation
Standard_EXPORT void SetContinuity (const GeomAbs_Shape C);
+ //! define the Weights associed to the criterium used in
+ //! the optimization.
+ //!
+ //! if Wi <= 0
Standard_EXPORT void SetCriteriumWeight (const Standard_Real W1, const Standard_Real W2, const Standard_Real W3);
+ //! returns the type of parametrization used in the approximation
Standard_EXPORT Approx_ParametrizationType ParType() const;
+ //! returns the Continuity used in the approximation
Standard_EXPORT GeomAbs_Shape Continuity() const;
+ //! returns the Weights (as percent) associed to the criterium used in
+ //! the optimization.
Standard_EXPORT void CriteriumWeight (Standard_Real& W1, Standard_Real& W2, Standard_Real& W3) const;
Standard_EXPORT void Perform (const Handle(GeomFill_Line)& Lin, GeomFill_SweepSectionGenerator& SecGen, const Standard_Boolean SpApprox = Standard_False);
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;
protected:
+ //! this method is used each time Value or Gradient is
+ //! needed.
Standard_EXPORT void Perform (const math_Vector& X);
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;
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);
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;
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;
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;
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;
protected:
+ //! this method is used each time Value or Gradient is
+ //! needed.
Standard_EXPORT void Perform (const math_Vector& X);
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;
protected:
+ //! this method is used each time Value or Gradient is
+ //! needed.
Standard_EXPORT void Perform (const math_Vector& X);
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;
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);
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;
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);
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;
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;
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;
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;
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;
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;
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;
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;
DEFINE_STANDARD_ALLOC
+ //! Raises Construction Error
Standard_EXPORT GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox();
Standard_EXPORT GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2);
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;
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);
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();
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;
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);
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);
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;
DEFINE_STANDARD_ALLOC
+ //! Initializes the local properties of the curve <C>
+ //! The current point and the derivatives are
+ //! computed at the same time, which allows an
+ //! optimization of the computation time.
+ //! <N> indicates the maximum number of derivations to
+ //! be done (0, 1, 2 or 3). For example, to compute
+ //! only the tangent, N should be equal to 1.
+ //! <Resolution> is the linear tolerance (it is used to test
+ //! if a vector is null).
Standard_EXPORT GeomLProp_CLProps(const Handle(Geom_Curve)& C, const Standard_Integer N, const Standard_Real Resolution);
+ //! Same as previous constructor but here the parameter is
+ //! set to the value <U>.
+ //! All the computations done will be related to <C> and <U>.
Standard_EXPORT GeomLProp_CLProps(const Handle(Geom_Curve)& C, const Standard_Real U, const Standard_Integer N, const Standard_Real Resolution);
+ //! Same as previous constructor but here the parameter is
+ //! set to the value <U> and the curve is set
+ //! with SetCurve.
+ //! the curve can have a empty constructor
+ //! All the computations done will be related to <C> and <U>
+ //! when the functions "set" will be done.
Standard_EXPORT GeomLProp_CLProps(const Standard_Integer N, const Standard_Real Resolution);
+ //! Initializes the local properties of the curve
+ //! for the parameter value <U>.
Standard_EXPORT void SetParameter (const Standard_Real U);
+ //! Initializes the local properties of the curve
+ //! for the new curve.
Standard_EXPORT void SetCurve (const Handle(Geom_Curve)& C);
+ //! Returns the Point.
Standard_EXPORT const gp_Pnt& Value() const;
+ //! Returns the first derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& D1();
+ //! Returns the second derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& D2();
+ //! Returns the third derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& D3();
+ //! Returns True if the tangent is defined.
+ //! For example, the tangent is not defined if the
+ //! three first derivatives are all null.
Standard_EXPORT Standard_Boolean IsTangentDefined();
+ //! output the tangent direction <D>
Standard_EXPORT void Tangent (gp_Dir& D);
+ //! Returns the curvature.
Standard_EXPORT Standard_Real Curvature();
+ //! Returns the normal direction <N>.
Standard_EXPORT void Normal (gp_Dir& N);
+ //! Returns the centre of curvature <P>.
Standard_EXPORT void CentreOfCurvature (gp_Pnt& P);
DEFINE_STANDARD_ALLOC
+ //! Initializes the local properties of the surface <S>
+ //! for the parameter values (<U>, <V>).
+ //! The current point and the derivatives are
+ //! computed at the same time, which allows an
+ //! optimization of the computation time.
+ //! <N> indicates the maximum number of derivations to
+ //! be done (0, 1, or 2). For example, to compute
+ //! only the tangent, N should be equal to 1.
+ //! <Resolution> is the linear tolerance (it is used to test
+ //! if a vector is null).
Standard_EXPORT GeomLProp_SLProps(const Handle(Geom_Surface)& S, const Standard_Real U, const Standard_Real V, const Standard_Integer N, const Standard_Real Resolution);
+ //! idem as previous constructor but without setting the value
+ //! of parameters <U> and <V>.
Standard_EXPORT GeomLProp_SLProps(const Handle(Geom_Surface)& S, const Standard_Integer N, const Standard_Real Resolution);
+ //! idem as previous constructor but without setting the value
+ //! of parameters <U> and <V> and the surface.
+ //! the surface can have an empty constructor.
Standard_EXPORT GeomLProp_SLProps(const Standard_Integer N, const Standard_Real Resolution);
+ //! Initializes the local properties of the surface S
+ //! for the new surface.
Standard_EXPORT void SetSurface (const Handle(Geom_Surface)& S);
+ //! Initializes the local properties of the surface S
+ //! for the new parameter values (<U>, <V>).
Standard_EXPORT void SetParameters (const Standard_Real U, const Standard_Real V);
+ //! Returns the point.
Standard_EXPORT const gp_Pnt& Value() const;
+ //! Returns the first U derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& D1U();
+ //! Returns the first V derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& D1V();
+ //! Returns the second U derivatives
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& D2U();
+ //! Returns the second V derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& D2V();
+ //! Returns the second UV cross-derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& DUV();
+ //! returns True if the U tangent is defined.
+ //! For example, the tangent is not defined if the
+ //! two first U derivatives are null.
Standard_EXPORT Standard_Boolean IsTangentUDefined();
+ //! Returns the tangent direction <D> on the iso-V.
Standard_EXPORT void TangentU (gp_Dir& D);
+ //! returns if the V tangent is defined.
+ //! For example, the tangent is not defined if the
+ //! two first V derivatives are null.
Standard_EXPORT Standard_Boolean IsTangentVDefined();
+ //! Returns the tangent direction <D> on the iso-V.
Standard_EXPORT void TangentV (gp_Dir& D);
+ //! Tells if the normal is defined.
Standard_EXPORT Standard_Boolean IsNormalDefined();
+ //! Returns the normal direction.
Standard_EXPORT const gp_Dir& Normal();
+ //! returns True if the curvature is defined.
Standard_EXPORT Standard_Boolean IsCurvatureDefined();
+ //! returns True if the point is umbilic (i.e. if the
+ //! curvature is constant).
Standard_EXPORT Standard_Boolean IsUmbilic();
+ //! Returns the maximum curvature
Standard_EXPORT Standard_Real MaxCurvature();
+ //! Returns the minimum curvature
Standard_EXPORT Standard_Real MinCurvature();
+ //! Returns the direction of the maximum and minimum curvature
+ //! <MaxD> and <MinD>
Standard_EXPORT void CurvatureDirections (gp_Dir& MaxD, gp_Dir& MinD);
+ //! Returns the mean curvature.
Standard_EXPORT Standard_Real MeanCurvature();
+ //! Returns the Gaussian curvature
Standard_EXPORT Standard_Real GaussianCurvature();
DEFINE_STANDARD_ALLOC
+ //! Empty constructor.
HLRBRep_CInter();
+ //! Self Intersection of a curve
HLRBRep_CInter(const Standard_Address& C, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Self Intersection of a curve with a domain.
HLRBRep_CInter(const Standard_Address& C, const IntRes2d_Domain& D, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between 2 curves.
HLRBRep_CInter(const Standard_Address& C1, const Standard_Address& C2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between 2 curves.
HLRBRep_CInter(const Standard_Address& C1, const IntRes2d_Domain& D1, const Standard_Address& C2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between 2 curves.
HLRBRep_CInter(const Standard_Address& C1, const Standard_Address& C2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between 2 curves.
HLRBRep_CInter(const Standard_Address& C1, const IntRes2d_Domain& D1, const Standard_Address& C2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between 2 curves.
Standard_EXPORT void Perform (const Standard_Address& C1, const IntRes2d_Domain& D1, const Standard_Address& C2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between 2 curves.
void Perform (const Standard_Address& C1, const Standard_Address& C2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between 2 curves.
Standard_EXPORT void Perform (const Standard_Address& C1, const IntRes2d_Domain& D1, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between 2 curves.
Standard_EXPORT void Perform (const Standard_Address& C1, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between 2 curves.
void Perform (const Standard_Address& C1, const IntRes2d_Domain& D1, const Standard_Address& C2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between 2 curves.
void Perform (const Standard_Address& C1, const Standard_Address& C2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Create a domain from a curve
Standard_EXPORT IntRes2d_Domain ComputeDomain (const Standard_Address& C1, const Standard_Real TolDomain) const;
private:
+ //! Intersection between 2 curves.
Standard_EXPORT void InternalPerform (const Standard_Address& C1, const IntRes2d_Domain& D1, const Standard_Address& C2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol, const Standard_Boolean Composite);
+ //! Part of InternalCompositePerform function
Standard_EXPORT void InternalCompositePerform_noRecurs (const Standard_Integer NbInterC1, const Standard_Address& C1, const Standard_Integer NumInterC1, const TColStd_Array1OfReal& Tab1, const IntRes2d_Domain& D1, const Standard_Integer NbInterC2, const Standard_Address& C2, const Standard_Integer NumInterC2, const TColStd_Array1OfReal& Tab2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between 2 curves.
Standard_EXPORT void InternalCompositePerform (const Standard_Address& C1, const IntRes2d_Domain& D1, const Standard_Integer N1, const Standard_Integer NB1, const TColStd_Array1OfReal& Tab1, const Standard_Address& C2, const IntRes2d_Domain& D2, const Standard_Integer N2, const Standard_Integer NB2, const TColStd_Array1OfReal& Tab2, const Standard_Real TolConf, const Standard_Real Tol, const Standard_Boolean Composite);
DEFINE_STANDARD_ALLOC
+ //! Initializes the local properties of the curve <C>
+ //! The current point and the derivatives are
+ //! computed at the same time, which allows an
+ //! optimization of the computation time.
+ //! <N> indicates the maximum number of derivations to
+ //! be done (0, 1, 2 or 3). For example, to compute
+ //! only the tangent, N should be equal to 1.
+ //! <Resolution> is the linear tolerance (it is used to test
+ //! if a vector is null).
Standard_EXPORT HLRBRep_CLProps(const Standard_Address& C, const Standard_Integer N, const Standard_Real Resolution);
+ //! Same as previous constructor but here the parameter is
+ //! set to the value <U>.
+ //! All the computations done will be related to <C> and <U>.
Standard_EXPORT HLRBRep_CLProps(const Standard_Address& C, const Standard_Real U, const Standard_Integer N, const Standard_Real Resolution);
+ //! Same as previous constructor but here the parameter is
+ //! set to the value <U> and the curve is set
+ //! with SetCurve.
+ //! the curve can have a empty constructor
+ //! All the computations done will be related to <C> and <U>
+ //! when the functions "set" will be done.
Standard_EXPORT HLRBRep_CLProps(const Standard_Integer N, const Standard_Real Resolution);
+ //! Initializes the local properties of the curve
+ //! for the parameter value <U>.
Standard_EXPORT void SetParameter (const Standard_Real U);
+ //! Initializes the local properties of the curve
+ //! for the new curve.
Standard_EXPORT void SetCurve (const Standard_Address& C);
+ //! Returns the Point.
Standard_EXPORT const gp_Pnt2d& Value() const;
+ //! Returns the first derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec2d& D1();
+ //! Returns the second derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec2d& D2();
+ //! Returns the third derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec2d& D3();
+ //! Returns True if the tangent is defined.
+ //! For example, the tangent is not defined if the
+ //! three first derivatives are all null.
Standard_EXPORT Standard_Boolean IsTangentDefined();
+ //! output the tangent direction <D>
Standard_EXPORT void Tangent (gp_Dir2d& D);
+ //! Returns the curvature.
Standard_EXPORT Standard_Real Curvature();
+ //! Returns the normal direction <N>.
Standard_EXPORT void Normal (gp_Dir2d& N);
+ //! Returns the centre of curvature <P>.
Standard_EXPORT void CentreOfCurvature (gp_Pnt2d& P);
DEFINE_STANDARD_ALLOC
+ //! Empty constructor.
Standard_EXPORT HLRBRep_IntConicCurveOfCInter();
+ //! Intersection between a line and a parametric curve.
Standard_EXPORT HLRBRep_IntConicCurveOfCInter(const gp_Lin2d& L, const IntRes2d_Domain& D1, const Standard_Address& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between a line and a parametric curve.
Standard_EXPORT HLRBRep_IntConicCurveOfCInter(const gp_Circ2d& C, const IntRes2d_Domain& D1, const Standard_Address& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between an ellipse and a parametric curve.
Standard_EXPORT HLRBRep_IntConicCurveOfCInter(const gp_Elips2d& E, const IntRes2d_Domain& D1, const Standard_Address& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between a parabola and a parametric curve.
Standard_EXPORT HLRBRep_IntConicCurveOfCInter(const gp_Parab2d& Prb, const IntRes2d_Domain& D1, const Standard_Address& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between the main branch of an hyperbola
+ //! and a parametric curve.
Standard_EXPORT HLRBRep_IntConicCurveOfCInter(const gp_Hypr2d& H, const IntRes2d_Domain& D1, const Standard_Address& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between a line and a parametric curve.
Standard_EXPORT void Perform (const gp_Lin2d& L, const IntRes2d_Domain& D1, const Standard_Address& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between a line and a parametric curve.
Standard_EXPORT void Perform (const gp_Circ2d& C, const IntRes2d_Domain& D1, const Standard_Address& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between an ellipse and a parametric curve.
Standard_EXPORT void Perform (const gp_Elips2d& E, const IntRes2d_Domain& D1, const Standard_Address& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between a parabola and a parametric curve.
Standard_EXPORT void Perform (const gp_Parab2d& Prb, const IntRes2d_Domain& D1, const Standard_Address& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between the main branch of an hyperbola
+ //! and a parametric curve.
Standard_EXPORT void Perform (const gp_Hypr2d& H, const IntRes2d_Domain& D1, const Standard_Address& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
DEFINE_STANDARD_ALLOC
+ //! Empty Constructor
Standard_EXPORT HLRBRep_InterCSurf();
+ //! Compute the Intersection between the curve and the
+ //! surface
Standard_EXPORT void Perform (const gp_Lin& Curve, const Standard_Address& Surface);
+ //! Compute the Intersection between the curve and
+ //! the surface. The Curve is already sampled and
+ //! its polygon : <Polygon> is given.
Standard_EXPORT void Perform (const gp_Lin& Curve, const HLRBRep_ThePolygonOfInterCSurf& Polygon, const Standard_Address& Surface);
+ //! Compute the Intersection between the curve and
+ //! the surface. The Curve is already sampled and
+ //! its polygon : <Polygon> is given. The Surface is
+ //! also sampled and <Polyhedron> is given.
Standard_EXPORT void Perform (const gp_Lin& Curve, const HLRBRep_ThePolygonOfInterCSurf& ThePolygon, const Standard_Address& Surface, const HLRBRep_ThePolyhedronOfInterCSurf& Polyhedron);
+ //! Compute the Intersection between the curve and
+ //! the surface. The Curve is already sampled and
+ //! its polygon : <Polygon> is given. The Surface is
+ //! also sampled and <Polyhedron> is given.
Standard_EXPORT void Perform (const gp_Lin& Curve, const HLRBRep_ThePolygonOfInterCSurf& ThePolygon, const Standard_Address& Surface, const HLRBRep_ThePolyhedronOfInterCSurf& Polyhedron, Bnd_BoundSortBox& BndBSB);
+ //! Compute the Intersection between the curve and
+ //! the surface. The Surface is already sampled and
+ //! its polyhedron : <Polyhedron> is given.
Standard_EXPORT void Perform (const gp_Lin& Curve, const Standard_Address& Surface, const HLRBRep_ThePolyhedronOfInterCSurf& Polyhedron);
protected:
+ //! Compute the Intersection between the curve and the
+ //! surface
Standard_EXPORT void Perform (const gp_Lin& Curve, const Standard_Address& Surface, const Standard_Real U0, const Standard_Real V0, const Standard_Real U1, const Standard_Real V1);
Standard_EXPORT void InternalPerformCurveQuadric (const gp_Lin& Curve, const Standard_Address& Surface);
DEFINE_STANDARD_ALLOC
+ //! Constructor of the class.
Standard_EXPORT HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter(const IntCurve_IConicTool& IT, const Standard_Address& PC);
+ //! Computes the value of the signed distance between
+ //! the implicit curve and the point at parameter Param
+ //! on the parametrised curve.
Standard_EXPORT Standard_Boolean Value (const Standard_Real Param, Standard_Real& F) Standard_OVERRIDE;
+ //! Computes the derivative of the previous function at
+ //! parameter Param.
Standard_EXPORT Standard_Boolean Derivative (const Standard_Real Param, Standard_Real& D) Standard_OVERRIDE;
+ //! Computes the value and the derivative of the function.
Standard_EXPORT Standard_Boolean Values (const Standard_Real Param, Standard_Real& F, Standard_Real& D) Standard_OVERRIDE;
Standard_EXPORT HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter(const gp_Pnt2d& P, const Standard_Address& C);
+ //! sets the field mycurve of the function.
Standard_EXPORT void Initialize (const Standard_Address& C);
+ //! sets the field P of the function.
Standard_EXPORT void SetPoint (const gp_Pnt2d& P);
+ //! Calculation of F(U).
Standard_EXPORT Standard_Boolean Value (const Standard_Real U, Standard_Real& F);
+ //! Calculation of F'(U).
Standard_EXPORT Standard_Boolean Derivative (const Standard_Real U, Standard_Real& DF);
+ //! Calculation of F(U) and F'(U).
Standard_EXPORT Standard_Boolean Values (const Standard_Real U, Standard_Real& F, Standard_Real& DF);
+ //! Save the found extremum.
Standard_EXPORT virtual Standard_Integer GetStateNumber() Standard_OVERRIDE;
+ //! Return the nunber of found extrema.
Standard_EXPORT Standard_Integer NbExt() const;
+ //! Returns the Nth distance.
Standard_EXPORT Standard_Real SquareDistance (const Standard_Integer N) const;
+ //! Shows if the Nth distance is a minimum.
Standard_EXPORT Standard_Boolean IsMin (const Standard_Integer N) const;
+ //! Returns the Nth extremum.
Standard_EXPORT const Extrema_POnCurv2d& Point (const Standard_Integer N) const;
+ //! Determines boundaries of subinterval for find of root.
Standard_EXPORT void SubIntervalInitialize (const Standard_Real theUfirst, const Standard_Real theUlast);
+ //! Computes a Tol value. If 1st derivative of curve
+ //! |D1|<Tol, it is considered D1=0.
Standard_EXPORT Standard_Real SearchOfTolerance();
DEFINE_STANDARD_ALLOC
+ //! Initializes the local properties of the surface <S>
+ //! for the parameter values (<U>, <V>).
+ //! The current point and the derivatives are
+ //! computed at the same time, which allows an
+ //! optimization of the computation time.
+ //! <N> indicates the maximum number of derivations to
+ //! be done (0, 1, or 2). For example, to compute
+ //! only the tangent, N should be equal to 1.
+ //! <Resolution> is the linear tolerance (it is used to test
+ //! if a vector is null).
Standard_EXPORT HLRBRep_SLProps(const Standard_Address& S, const Standard_Real U, const Standard_Real V, const Standard_Integer N, const Standard_Real Resolution);
+ //! idem as previous constructor but without setting the value
+ //! of parameters <U> and <V>.
Standard_EXPORT HLRBRep_SLProps(const Standard_Address& S, const Standard_Integer N, const Standard_Real Resolution);
+ //! idem as previous constructor but without setting the value
+ //! of parameters <U> and <V> and the surface.
+ //! the surface can have an empty constructor.
Standard_EXPORT HLRBRep_SLProps(const Standard_Integer N, const Standard_Real Resolution);
+ //! Initializes the local properties of the surface S
+ //! for the new surface.
Standard_EXPORT void SetSurface (const Standard_Address& S);
+ //! Initializes the local properties of the surface S
+ //! for the new parameter values (<U>, <V>).
Standard_EXPORT void SetParameters (const Standard_Real U, const Standard_Real V);
+ //! Returns the point.
Standard_EXPORT const gp_Pnt& Value() const;
+ //! Returns the first U derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& D1U();
+ //! Returns the first V derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& D1V();
+ //! Returns the second U derivatives
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& D2U();
+ //! Returns the second V derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& D2V();
+ //! Returns the second UV cross-derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& DUV();
+ //! returns True if the U tangent is defined.
+ //! For example, the tangent is not defined if the
+ //! two first U derivatives are null.
Standard_EXPORT Standard_Boolean IsTangentUDefined();
+ //! Returns the tangent direction <D> on the iso-V.
Standard_EXPORT void TangentU (gp_Dir& D);
+ //! returns if the V tangent is defined.
+ //! For example, the tangent is not defined if the
+ //! two first V derivatives are null.
Standard_EXPORT Standard_Boolean IsTangentVDefined();
+ //! Returns the tangent direction <D> on the iso-V.
Standard_EXPORT void TangentV (gp_Dir& D);
+ //! Tells if the normal is defined.
Standard_EXPORT Standard_Boolean IsNormalDefined();
+ //! Returns the normal direction.
Standard_EXPORT const gp_Dir& Normal();
+ //! returns True if the curvature is defined.
Standard_EXPORT Standard_Boolean IsCurvatureDefined();
+ //! returns True if the point is umbilic (i.e. if the
+ //! curvature is constant).
Standard_EXPORT Standard_Boolean IsUmbilic();
+ //! Returns the maximum curvature
Standard_EXPORT Standard_Real MaxCurvature();
+ //! Returns the minimum curvature
Standard_EXPORT Standard_Real MinCurvature();
+ //! Returns the direction of the maximum and minimum curvature
+ //! <MaxD> and <MinD>
Standard_EXPORT void CurvatureDirections (gp_Dir& MaxD, gp_Dir& MinD);
+ //! Returns the mean curvature.
Standard_EXPORT Standard_Real MeanCurvature();
+ //! Returns the Gaussian curvature
Standard_EXPORT Standard_Real GaussianCurvature();
DEFINE_STANDARD_ALLOC
+ //! Constructs an empty sequence.
+ //! Use:
+ //! - the function Append or Prepend to add an item or
+ //! a collection of items at the end, or at the beginning of the sequence,
+ //! - the function InsertAfter or InsertBefore to add an
+ //! item or a collection of items at any position in the sequence,
+ //! - operator() or the function SetValue to assign a
+ //! new value to an item of the sequence,
+ //! - operator() to read an item of the sequence,
+ //! - the function Remove to remove an item at any
+ //! position in the sequence.
+ //! Warning
+ //! To copy a sequence, you must explicitly call the
+ //! assignment operator (operator=).
HLRBRep_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfCInter();
+ //! Creation by copy of existing Sequence.
Standard_EXPORT HLRBRep_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfCInter(const HLRBRep_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfCInter& Other);
+ //! Removes all element(s) of the sequence <me>
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = ()
Standard_EXPORT void Clear();
~HLRBRep_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfCInter()
{
Clear();
}
+ //! Copies the contents of the sequence Other into this sequence.
+ //! If this sequence is not empty, it is automatically cleared before the copy.
Standard_EXPORT const HLRBRep_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfCInter& Assign (const HLRBRep_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfCInter& Other);
const HLRBRep_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfCInter& operator = (const HLRBRep_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfCInter& Other)
{
return Assign(Other);
}
+ //! Appends <T> at the end of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C T)
Standard_EXPORT void Append (const Extrema_POnCurv2d& T);
+ //! Concatenates <S> at the end of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void Append (HLRBRep_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfCInter& S);
+ //! Add <T> at the beginning of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (T A B C )
Standard_EXPORT void Prepend (const Extrema_POnCurv2d& T);
+ //! Concatenates <S> at the beginning of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C) S = (D E F)
+ //! after me = (D E F A B C)
+ //! S = ()
void Prepend (HLRBRep_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfCInter& S);
+ //! Inserts <T> in <me> before the position <Index>.
+ //! Raises an exception if the index is out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B D), Index = 3, T = C
+ //! after
+ //! me = (A B C D )
void InsertBefore (const Standard_Integer Index, const Extrema_POnCurv2d& T);
+ //! Inserts the sequence <S> in <me> before
+ //! the position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B F), Index = 3, S = (C D E)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertBefore (const Standard_Integer Index, HLRBRep_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfCInter& S);
+ //! Inserts <T> in <me> after the position <Index>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, T = D
+ //! after
+ //! me = (A B C D)
Standard_EXPORT void InsertAfter (const Standard_Integer Index, const Extrema_POnCurv2d& T);
+ //! Inserts the sequence <S> in <me> after the
+ //! position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bound.
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertAfter (const Standard_Integer Index, HLRBRep_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfCInter& S);
+ //! Returns the first element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns A
Standard_EXPORT const Extrema_POnCurv2d& First() const;
+ //! Returns the last element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns C
Standard_EXPORT const Extrema_POnCurv2d& Last() const;
+ //! Keeps in <me> the items 1 to <Index>-1 and
+ //! puts in <Sub> the items <Index> to the end.
+ //! Example:
+ //! before
+ //! me = (A B C D) ,Index = 3
+ //! after
+ //! me = (A B)
+ //! Sub = (C D)
void Split (const Standard_Integer Index, HLRBRep_SeqPCOfPCLocFOfTheLocateExtPCOfTheProjPCurOfCInter& Sub);
+ //! Returns the Item at position <Index> in <me>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT const Extrema_POnCurv2d& Value (const Standard_Integer Index) const;
const Extrema_POnCurv2d& operator() (const Standard_Integer Index) const
{
return Value(Index);
}
+ //! Changes the item at position <Index>
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1, Item = D
+ //! after
+ //! me = (D B C)
Standard_EXPORT void SetValue (const Standard_Integer Index, const Extrema_POnCurv2d& I);
+ //! Returns the Item at position <Index> in
+ //! <me>. This method may be used to modify
+ //! <me> : S.Value(Index) = Item.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT Extrema_POnCurv2d& ChangeValue (const Standard_Integer Index);
Extrema_POnCurv2d& operator() (const Standard_Integer Index)
{
return ChangeValue(Index);
}
+ //! Removes from <me> the item at position <Index>.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3
+ //! after
+ //! me = (A B)
Standard_EXPORT void Remove (const Standard_Integer Index);
+ //! Removes from <me> all the items of
+ //! positions between <FromIndex> and <ToIndex>.
+ //! Raises an exception if the indices are out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B C D E F), FromIndex = 1 ToIndex = 3
+ //! after
+ //! me = (D E F)
Standard_EXPORT void Remove (const Standard_Integer FromIndex, const Standard_Integer ToIndex);
DEFINE_STANDARD_ALLOC
+ //! Among a set of points {C(ui),i=1,NbU}, locate the point
+ //! P=C(uj) such that:
+ //! distance(P,C) = Min{distance(P,C(ui))}
Standard_EXPORT static void Locate (const gp_Pnt2d& P, const Standard_Address& C, const Standard_Integer NbU, Extrema_POnCurv2d& Papp);
+ //! Among a set of points {C(ui),i=1,NbU}, locate the point
+ //! P=C(uj) such that:
+ //! distance(P,C) = Min{distance(P,C(ui))}
+ //! The research is done between umin and usup.
Standard_EXPORT static void Locate (const gp_Pnt2d& P, const Standard_Address& C, const Standard_Integer NbU, const Standard_Real Umin, const Standard_Real Usup, Extrema_POnCurv2d& Papp);
+ //! Among two sets of points {C1(ui),i=1,NbU} and
+ //! {C2(vj),j=1,NbV}, locate the two points P1=C1(uk) and
+ //! P2=C2(vl) such that:
+ //! distance(P1,P2) = Min {distance(C1(ui),C2(vj))}.
Standard_EXPORT static void Locate (const Standard_Address& C1, const Standard_Address& C2, const Standard_Integer NbU, const Standard_Integer NbV, Extrema_POnCurv2d& Papp1, Extrema_POnCurv2d& Papp2);
Standard_EXPORT HLRBRep_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfCInter(const Standard_Address& curve1, const Standard_Address& curve2);
+ //! returns 2.
Standard_EXPORT Standard_Integer NbVariables() const;
+ //! returns 2.
Standard_EXPORT Standard_Integer NbEquations() const;
+ //! computes the values <F> of the Functions for the
+ //! variable <X>.
+ //! returns True if the computation was done successfully,
+ //! False otherwise.
Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F);
+ //! returns the values <D> of the derivatives for the
+ //! variable <X>.
+ //! returns True if the computation was done successfully,
+ //! False otherwise.
Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D);
+ //! returns the values <F> of the functions and the derivatives
+ //! <D> for the variable <X>.
+ //! returns True if the computation was done successfully,
+ //! False otherwise.
Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D);
DEFINE_STANDARD_ALLOC
+ //! compute the solution point with the close point
+ //! MarginCoef is the coefficient for extension of UV bounds.
+ //! Ex., UFirst -= MarginCoef*(ULast-UFirst)
Standard_EXPORT HLRBRep_TheExactInterCSurf(const Standard_Real U, const Standard_Real V, const Standard_Real W, const HLRBRep_TheCSFunctionOfInterCSurf& F, const Standard_Real TolTangency, const Standard_Real MarginCoef = 0.0);
+ //! initialize the parameters to compute the solution
Standard_EXPORT HLRBRep_TheExactInterCSurf(const HLRBRep_TheCSFunctionOfInterCSurf& F, const Standard_Real TolTangency);
+ //! compute the solution
+ //! it's possible to write to optimize:
+ //! IntImp_IntCS inter(S1,C1,Toltangency)
+ //! math_FunctionSetRoot rsnld(Inter.function())
+ //! while ...{
+ //! u=...
+ //! v=...
+ //! w=...
+ //! inter.Perform(u,v,w,rsnld)
+ //! }
+ //! or
+ //! IntImp_IntCS inter(Toltangency)
+ //! inter.SetSurface(S);
+ //! math_FunctionSetRoot rsnld(Inter.function())
+ //! while ...{
+ //! C=...
+ //! inter.SetCurve(C);
+ //! u=...
+ //! v=...
+ //! w=...
+ //! inter.Perform(u,v,w,rsnld)
+ //! }
Standard_EXPORT void Perform (const Standard_Real U, const Standard_Real V, const Standard_Real W, math_FunctionSetRoot& Rsnld, const Standard_Real u0, const Standard_Real v0, const Standard_Real u1, const Standard_Real v1, const Standard_Real w0, const Standard_Real w1);
+ //! Returns TRUE if the creation completed without failure.
Standard_EXPORT Standard_Boolean IsDone() const;
Standard_EXPORT Standard_Boolean IsEmpty() const;
+ //! returns the intersection point
+ //! The exception NotDone is raised if IsDone is false.
+ //! The exception DomainError is raised if IsEmpty is true.
Standard_EXPORT const gp_Pnt& Point() const;
Standard_EXPORT Standard_Real ParameterOnCurve() const;
Standard_EXPORT void ParameterOnSurface (Standard_Real& U, Standard_Real& V) const;
+ //! return the math function which
+ //! is used to compute the intersection
Standard_EXPORT HLRBRep_TheCSFunctionOfInterCSurf& Function();
DEFINE_STANDARD_ALLOC
+ //! Empty constructor.
HLRBRep_TheIntConicCurveOfCInter();
+ //! Intersection between a line and a parametric curve.
HLRBRep_TheIntConicCurveOfCInter(const gp_Lin2d& L, const IntRes2d_Domain& D1, const Standard_Address& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between a line and a parametric curve.
Standard_EXPORT HLRBRep_TheIntConicCurveOfCInter(const gp_Circ2d& C, const IntRes2d_Domain& D1, const Standard_Address& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between an ellipse and a parametric curve.
Standard_EXPORT HLRBRep_TheIntConicCurveOfCInter(const gp_Elips2d& E, const IntRes2d_Domain& D1, const Standard_Address& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between a parabola and a parametric curve.
Standard_EXPORT HLRBRep_TheIntConicCurveOfCInter(const gp_Parab2d& Prb, const IntRes2d_Domain& D1, const Standard_Address& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between the main branch of an hyperbola
+ //! and a parametric curve.
Standard_EXPORT HLRBRep_TheIntConicCurveOfCInter(const gp_Hypr2d& H, const IntRes2d_Domain& D1, const Standard_Address& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between a line and a parametric curve.
void Perform (const gp_Lin2d& L, const IntRes2d_Domain& D1, const Standard_Address& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between a line and a parametric curve.
void Perform (const gp_Circ2d& C, const IntRes2d_Domain& D1, const Standard_Address& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between an ellipse and a parametric curve.
void Perform (const gp_Elips2d& E, const IntRes2d_Domain& D1, const Standard_Address& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between a parabola and a parametric curve.
void Perform (const gp_Parab2d& Prb, const IntRes2d_Domain& D1, const Standard_Address& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between the main branch of an hyperbola
+ //! and a parametric curve.
void Perform (const gp_Hypr2d& H, const IntRes2d_Domain& D1, const Standard_Address& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
private:
+ //! Intersection between a conic fom gp
+ //! and a parametric curve.
void Perform (const IntCurve_IConicTool& ICurve, const IntRes2d_Domain& D1, const Standard_Address& PCurve, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol);
private:
+ //! Method to find intersection between two curves
+ //! : returns false for case when some points of polygon
+ //! : were replaced on line and exact point of intersection was not found
+ //! : for case when point of intersection was found
+ //! : during prelimanary search for line (case of bad paramerization of Bspline for example).
Standard_EXPORT Standard_Boolean findIntersect (const Standard_Address& Curve1, const IntRes2d_Domain& Domain1, const Standard_Address& Curve2, const IntRes2d_Domain& Domain2, const Standard_Real TolConf, const Standard_Real Tol, const Standard_Integer NbIter, const Standard_Real DeltaU, const Standard_Real DeltaV, const HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter& thePoly1, const HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter& thePoly2, const Standard_Boolean isFullRepresentation);
DEFINE_STANDARD_ALLOC
+ //! Constructs an empty interference between Polygon and
+ //! Polyhedron.
Standard_EXPORT HLRBRep_TheInterferenceOfInterCSurf();
+ //! Constructs and computes an interference between the Polygon
+ //! and the Polyhedron.
Standard_EXPORT HLRBRep_TheInterferenceOfInterCSurf(const HLRBRep_ThePolygonOfInterCSurf& thePolyg, const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh);
+ //! Constructs and computes an interference between the
+ //! Straight Line and the Polyhedron.
Standard_EXPORT HLRBRep_TheInterferenceOfInterCSurf(const gp_Lin& theLin, const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh);
+ //! Constructs and computes an interference between the
+ //! Straight Lines and the Polyhedron.
Standard_EXPORT HLRBRep_TheInterferenceOfInterCSurf(const Intf_Array1OfLin& theLins, const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh);
+ //! Computes an interference between the Polygon and the
+ //! Polyhedron.
Standard_EXPORT void Perform (const HLRBRep_ThePolygonOfInterCSurf& thePolyg, const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh);
+ //! Computes an interference between the Straight Line and the
+ //! Polyhedron.
Standard_EXPORT void Perform (const gp_Lin& theLin, const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh);
+ //! Computes an interference between the Straight Lines and
+ //! the Polyhedron.
Standard_EXPORT void Perform (const Intf_Array1OfLin& theLins, const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh);
+ //! Constructs and computes an interference between the Polygon
+ //! and the Polyhedron.
Standard_EXPORT HLRBRep_TheInterferenceOfInterCSurf(const HLRBRep_ThePolygonOfInterCSurf& thePolyg, const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh, Bnd_BoundSortBox& theBoundSB);
+ //! Constructs and computes an interference between the
+ //! Straight Line and the Polyhedron.
Standard_EXPORT HLRBRep_TheInterferenceOfInterCSurf(const gp_Lin& theLin, const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh, Bnd_BoundSortBox& theBoundSB);
+ //! Constructs and computes an interference between the
+ //! Straight Lines and the Polyhedron.
Standard_EXPORT HLRBRep_TheInterferenceOfInterCSurf(const Intf_Array1OfLin& theLins, const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh, Bnd_BoundSortBox& theBoundSB);
+ //! Computes an interference between the Polygon and the
+ //! Polyhedron.
Standard_EXPORT void Perform (const HLRBRep_ThePolygonOfInterCSurf& thePolyg, const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh, Bnd_BoundSortBox& theBoundSB);
+ //! Computes an interference between the Straight Line and the
+ //! Polyhedron.
Standard_EXPORT void Perform (const gp_Lin& theLin, const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh, Bnd_BoundSortBox& theBoundSB);
+ //! Computes an interference between the Straight Lines and
+ //! the Polyhedron.
Standard_EXPORT void Perform (const Intf_Array1OfLin& theLins, const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh, Bnd_BoundSortBox& theBoundSB);
+ //! Compares the boundings between the segment of <thePolyg> and
+ //! the facets of <thePolyh>.
Standard_EXPORT void Interference (const HLRBRep_ThePolygonOfInterCSurf& thePolyg, const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh, Bnd_BoundSortBox& theBoundSB);
+ //! Compares the boundings between the segment of <thePolyg> and
+ //! the facets of <thePolyh>.
Standard_EXPORT void Interference (const HLRBRep_ThePolygonOfInterCSurf& thePolyg, const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh);
private:
+ //! Computes the intersection between the segment <BegO><EndO>
+ //! and the triangle <TTri> of <thePolyh>.
Standard_EXPORT void Intersect (const gp_Pnt& BegO, const gp_Pnt& EndO, const Standard_Boolean Infinite, const Standard_Integer TTri, const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh);
+ //! Computes the intersection between the segment <BegO><EndO>
+ //! and the triangle <TTri> of <thePolyh>.
Standard_EXPORT void Intersect (const gp_Pnt& BegO, const gp_Pnt& EndO, const Standard_Boolean Infinite, const Standard_Integer TTri, const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh, const gp_XYZ& TriNormal, const Standard_Real TriDp, const Standard_Real dBegTri, const Standard_Real dEndTri);
DEFINE_STANDARD_ALLOC
+ //! Empty constructor.
Standard_EXPORT HLRBRep_TheIntersectorOfTheIntConicCurveOfCInter();
+ //! Intersection between an implicit curve and
+ //! a parametrised curve.
+ //! The exception ConstructionError is raised if the domain
+ //! of the parametrised curve does not verify HasFirstPoint
+ //! and HasLastPoint return True.
Standard_EXPORT HLRBRep_TheIntersectorOfTheIntConicCurveOfCInter(const IntCurve_IConicTool& ITool, const IntRes2d_Domain& Dom1, const Standard_Address& PCurve, const IntRes2d_Domain& Dom2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between an implicit curve and
+ //! a parametrised curve.
+ //! The exception ConstructionError is raised if the domain
+ //! of the parametrised curve does not verify HasFirstPoint
+ //! and HasLastPoint return True.
Standard_EXPORT void Perform (const IntCurve_IConicTool& ITool, const IntRes2d_Domain& Dom1, const Standard_Address& PCurve, const IntRes2d_Domain& Dom2, const Standard_Real TolConf, const Standard_Real Tol);
Standard_EXPORT Standard_Real FindU (const Standard_Real parameter, gp_Pnt2d& point, const Standard_Address& TheParCurev, const IntCurve_IConicTool& TheImpTool) const;
Standard_EXPORT HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter();
+ //! Calculates the distance with a close point.
+ //! The close point is defined by the parameter value
+ //! U0.
+ //! The function F(u)=distance(P,C(u)) has an extremum
+ //! when g(u)=dF/du=0. The algorithm searchs a zero
+ //! near the close point.
+ //! TolU is used to decide to stop the iterations.
+ //! At the nth iteration, the criteria is:
+ //! abs(Un - Un-1) < TolU.
Standard_EXPORT HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter(const gp_Pnt2d& P, const Standard_Address& C, const Standard_Real U0, const Standard_Real TolU);
+ //! Calculates the distance with a close point.
+ //! The close point is defined by the parameter value
+ //! U0.
+ //! The function F(u)=distance(P,C(u)) has an extremum
+ //! when g(u)=dF/du=0. The algorithm searchs a zero
+ //! near the close point.
+ //! Zeros are searched between Umin et Usup.
+ //! TolU is used to decide to stop the iterations.
+ //! At the nth iteration, the criteria is:
+ //! abs(Un - Un-1) < TolU.
Standard_EXPORT HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter(const gp_Pnt2d& P, const Standard_Address& C, const Standard_Real U0, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real TolU);
+ //! sets the fields of the algorithm.
Standard_EXPORT void Initialize (const Standard_Address& C, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real TolU);
+ //! the algorithm is done with the point P.
+ //! An exception is raised if the fields have not
+ //! been initialized.
Standard_EXPORT void Perform (const gp_Pnt2d& P, const Standard_Real U0);
+ //! Returns True if the distance is found.
Standard_EXPORT Standard_Boolean IsDone() const;
+ //! Returns the value of the extremum square distance.
Standard_EXPORT Standard_Real SquareDistance() const;
+ //! Returns True if the extremum distance is a minimum.
Standard_EXPORT Standard_Boolean IsMin() const;
+ //! Returns the point of the extremum distance.
Standard_EXPORT const Extrema_POnCurv2d& Point() const;
DEFINE_STANDARD_ALLOC
+ //! Compute a polygon on the domain of the curve.
Standard_EXPORT HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter(const Standard_Address& Curve, const Standard_Integer NbPnt, const IntRes2d_Domain& Domain, const Standard_Real Tol);
+ //! The current polygon is modified if most
+ //! of the points of the polygon are are
+ //! outside the box <OtherBox>. In this
+ //! situation, bounds are computed to build
+ //! a polygon inside or near the OtherBox.
Standard_EXPORT void ComputeWithBox (const Standard_Address& Curve, const Bnd_Box2d& OtherBox);
virtual Standard_Real DeflectionOverEstimation() const Standard_OVERRIDE;
void Closed (const Standard_Boolean clos);
+ //! Give the number of Segments in the polyline.
virtual Standard_Integer NbSegments() const Standard_OVERRIDE;
+ //! Returns the points of the segment <Index> in the Polygon.
Standard_EXPORT virtual void Segment (const Standard_Integer theIndex, gp_Pnt2d& theBegin, gp_Pnt2d& theEnd) const Standard_OVERRIDE;
+ //! Returns the parameter (On the curve)
+ //! of the first point of the Polygon
Standard_Real InfParameter() const;
+ //! Returns the parameter (On the curve)
+ //! of the last point of the Polygon
Standard_Real SupParameter() const;
Standard_EXPORT Standard_Boolean AutoIntersectionIsPossible() const;
+ //! Give an approximation of the parameter on the curve
+ //! according to the discretization of the Curve.
Standard_EXPORT Standard_Real ApproxParamOnCurve (const Standard_Integer Index, const Standard_Real ParamOnLine) const;
Standard_Integer CalculRegion (const Standard_Real x, const Standard_Real y, const Standard_Real x1, const Standard_Real x2, const Standard_Real y1, const Standard_Real y2) const;
Standard_EXPORT HLRBRep_ThePolygonOfInterCSurf(const gp_Lin& Curve, const TColStd_Array1OfReal& Upars);
+ //! Give the bounding box of the polygon.
const Bnd_Box& Bounding() const;
Standard_Real DeflectionOverEstimation() const;
Standard_Boolean Closed() const;
+ //! Give the number of Segments in the polyline.
Standard_Integer NbSegments() const;
+ //! Give the point of range Index in the Polygon.
const gp_Pnt& BeginOfSeg (const Standard_Integer Index) const;
+ //! Give the point of range Index in the Polygon.
const gp_Pnt& EndOfSeg (const Standard_Integer Index) const;
+ //! Returns the parameter (On the curve)
+ //! of the first point of the Polygon
Standard_Real InfParameter() const;
+ //! Returns the parameter (On the curve)
+ //! of the last point of the Polygon
Standard_Real SupParameter() const;
+ //! Give an approximation of the parameter on the curve
+ //! according to the discretization of the Curve.
Standard_EXPORT Standard_Real ApproxParamOnCurve (const Standard_Integer Index, const Standard_Real ParamOnLine) const;
Standard_EXPORT void Dump() const;
DEFINE_STANDARD_ALLOC
+ //! Give the bounding box of the polygon.
static const Bnd_Box& Bounding (const HLRBRep_ThePolygonOfInterCSurf& thePolygon);
static Standard_Real DeflectionOverEstimation (const HLRBRep_ThePolygonOfInterCSurf& thePolygon);
static Standard_Integer NbSegments (const HLRBRep_ThePolygonOfInterCSurf& thePolygon);
+ //! Give the point of range Index in the Polygon.
static const gp_Pnt& BeginOfSeg (const HLRBRep_ThePolygonOfInterCSurf& thePolygon, const Standard_Integer Index);
+ //! Give the point of range Index in the Polygon.
static const gp_Pnt& EndOfSeg (const HLRBRep_ThePolygonOfInterCSurf& thePolygon, const Standard_Integer Index);
Standard_EXPORT static void Dump (const HLRBRep_ThePolygonOfInterCSurf& thePolygon);
Standard_EXPORT void VMaxSingularity (const Standard_Boolean Sing);
+ //! get the size of the discretization.
Standard_EXPORT void Size (Standard_Integer& nbdu, Standard_Integer& nbdv) const;
+ //! Give the number of triangles in this double array of
Standard_EXPORT Standard_Integer NbTriangles() const;
+ //! Give the 3 points of the triangle of addresse Index in
+ //! the double array of triangles.
Standard_EXPORT void Triangle (const Standard_Integer Index, Standard_Integer& P1, Standard_Integer& P2, Standard_Integer& P3) const;
+ //! Give the addresse Tricon of the triangle connexe to the
+ //! triangle of address Triang by the edge Pivot Pedge and
+ //! the third point of this connexe triangle. When we are
+ //! on a free edge TriCon==0 but the function return the
+ //! value of the triangle in the other side of Pivot on
+ //! the free edge. Used to turn around a vertex.
Standard_EXPORT Standard_Integer TriConnex (const Standard_Integer Triang, const Standard_Integer Pivot, const Standard_Integer Pedge, Standard_Integer& TriCon, Standard_Integer& OtherP) const;
+ //! Give the number of point in the double array of
+ //! triangles ((nbdu+1)*(nbdv+1)).
Standard_EXPORT Standard_Integer NbPoints() const;
+ //! Set the value of a field of the double array of
+ //! points.
Standard_EXPORT void Point (const gp_Pnt& thePnt, const Standard_Integer lig, const Standard_Integer col, const Standard_Real U, const Standard_Real V);
+ //! Give the point of index i in the MaTriangle.
Standard_EXPORT const gp_Pnt& Point (const Standard_Integer Index, Standard_Real& U, Standard_Real& V) const;
+ //! Give the point of index i in the MaTriangle.
Standard_EXPORT const gp_Pnt& Point (const Standard_Integer Index) const;
+ //! Give the point of index i in the MaTriangle.
Standard_EXPORT void Point (const Standard_Integer Index, gp_Pnt& P) const;
+ //! Give the bounding box of the MaTriangle.
Standard_EXPORT const Bnd_Box& Bounding() const;
+ //! Compute the array of boxes. The box <n> corresponding
+ //! to the triangle <n>.
Standard_EXPORT void FillBounding();
+ //! Give the array of boxes. The box <n> corresponding
+ //! to the triangle <n>.
Standard_EXPORT const Handle(Bnd_HArray1OfBox)& ComponentsBounding() const;
Standard_EXPORT Standard_Real DeflectionOverEstimation() const;
Standard_EXPORT Standard_Boolean HasVMaxSingularity() const;
+ //! Give the plane equation of the triangle of addresse Triang.
Standard_EXPORT void PlaneEquation (const Standard_Integer Triang, gp_XYZ& NormalVector, Standard_Real& PolarDistance) const;
+ //! Give the plane equation of the triangle of addresse Triang.
Standard_EXPORT Standard_Boolean Contain (const Standard_Integer Triang, const gp_Pnt& ThePnt) const;
Standard_EXPORT void Parameters (const Standard_Integer Index, Standard_Real& U, Standard_Real& V) const;
+ //! This method returns true if the edge based on points with
+ //! indices Index1 and Index2 represents a boundary edge. It is
+ //! necessary to take into account the boundary deflection for
+ //! this edge.
Standard_EXPORT Standard_Boolean IsOnBound (const Standard_Integer Index1, const Standard_Integer Index2) const;
+ //! This method returns a border deflection.
Standard_Real GetBorderDeflection() const;
Standard_EXPORT void Dump() const;
private:
+ //! This method computes and returns a deflection of isoline
+ //! of given parameter on Surface.
Standard_EXPORT Standard_Real ComputeBorderDeflection (const Standard_Address& Surface, const Standard_Real Parameter, const Standard_Real PMin, const Standard_Real PMax, const Standard_Boolean isUIso) const;
DEFINE_STANDARD_ALLOC
+ //! Give the bounding box of the PolyhedronTool.
static const Bnd_Box& Bounding (const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh);
+ //! Give the array of boxes. The box <n> corresponding
+ //! to the triangle <n>.
static const Handle(Bnd_HArray1OfBox)& ComponentsBounding (const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh);
+ //! Give the tolerance of the polygon.
static Standard_Real DeflectionOverEstimation (const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh);
+ //! Give the number of triangles in this polyedral surface.
static Standard_Integer NbTriangles (const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh);
+ //! Give the indices of the 3 points of the triangle of
+ //! address Index in the PolyhedronTool.
static void Triangle (const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh, const Standard_Integer Index, Standard_Integer& P1, Standard_Integer& P2, Standard_Integer& P3);
+ //! Give the point of index i in the polyedral surface.
static const gp_Pnt& Point (const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh, const Standard_Integer Index);
+ //! Give the addresse Tricon of the triangle connexe to
+ //! the triangle of address Triang by the edge Pivot Pedge
+ //! and the third point of this connexe triangle. When we
+ //! are on a free edge TriCon==0 but the function return
+ //! the value of the triangle in the other side of Pivot
+ //! on the free edge. Used to turn around a vertex.
static Standard_Integer TriConnex (const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh, const Standard_Integer Triang, const Standard_Integer Pivot, const Standard_Integer Pedge, Standard_Integer& TriCon, Standard_Integer& OtherP);
+ //! This method returns true if the edge based on points with
+ //! indices Index1 and Index2 represents a boundary edge. It is
+ //! necessary to take into account the boundary deflection for
+ //! this edge.
static Standard_Boolean IsOnBound (const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh, const Standard_Integer Index1, const Standard_Integer Index2);
+ //! This method returns a border deflection of the polyhedron.
static Standard_Real GetBorderDeflection (const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh);
Standard_EXPORT static void Dump (const HLRBRep_ThePolyhedronOfInterCSurf& thePolyh);
DEFINE_STANDARD_ALLOC
+ //! Returns the parameter V of the point on the
+ //! parametric curve corresponding to the Point Pnt.
+ //! The Correspondance between Pnt and the point P(V)
+ //! on the parametric curve must be coherent with the
+ //! way of determination of the signed distance
+ //! between a point and the implicit curve.
+ //! Tol is the tolerance on the distance between a point
+ //! and the parametrised curve.
+ //! In that case, no bounds are given. The research of
+ //! the rigth parameter has to be made on the natural
+ //! parametric domain of the curve.
Standard_EXPORT static Standard_Real FindParameter (const Standard_Address& C, const gp_Pnt2d& Pnt, const Standard_Real Tol);
+ //! Returns the parameter V of the point on the
+ //! parametric curve corresponding to the Point Pnt.
+ //! The Correspondance between Pnt and the point P(V)
+ //! on the parametric curve must be coherent with the
+ //! way of determination of the signed distance
+ //! between a point and the implicit curve.
+ //! Tol is the tolerance on the distance between a point
+ //! and the parametrised curve.
+ //! LowParameter and HighParameter give the
+ //! boundaries of the interval in wich the parameter
+ //! certainly lies. These parameters are given to
+ //! implement a more efficient algoritm. So, it is not
+ //! necessary to check that the returned value verifies
+ //! LowParameter <= Value <= HighParameter.
Standard_EXPORT static Standard_Real FindParameter (const Standard_Address& C, const gp_Pnt2d& Pnt, const Standard_Real LowParameter, const Standard_Real HighParameter, const Standard_Real Tol);
DEFINE_STANDARD_ALLOC
+ //! Provides the signed distance function : Q(w)
+ //! and its first derivative dQ(w)/dw
Standard_EXPORT HLRBRep_TheQuadCurvExactInterCSurf(const Standard_Address& S, const gp_Lin& C);
Standard_EXPORT Standard_Boolean IsDone() const;
Standard_EXPORT Standard_Integer NbIntervals() const;
+ //! U1 and U2 are the parameters of
+ //! a segment on the curve.
Standard_EXPORT void Intervals (const Standard_Integer Index, Standard_Real& U1, Standard_Real& U2) const;
DEFINE_STANDARD_ALLOC
+ //! Create the function.
Standard_EXPORT HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf(const IntSurf_Quadric& Q, const gp_Lin& C);
+ //! Computes the value of the signed distance between
+ //! the implicit surface and the point at parameter
+ //! Param on the parametrised curve.
+ //! Value always returns True.
Standard_EXPORT Standard_Boolean Value (const Standard_Real Param, Standard_Real& F) Standard_OVERRIDE;
+ //! Computes the derivative of the previous function at
+ //! parameter Param.
+ //! Derivative always returns True.
Standard_EXPORT Standard_Boolean Derivative (const Standard_Real Param, Standard_Real& D) Standard_OVERRIDE;
+ //! Computes the value and the derivative of the function.
+ //! returns True.
Standard_EXPORT Standard_Boolean Values (const Standard_Real Param, Standard_Real& F, Standard_Real& D) Standard_OVERRIDE;
public:
+ //! Evaluates if recognition has a result, returns it if yes
+ //! In case of success, Returns True and puts result in "res"
+ //! In case of Failure, simply Returns False
+ //! Works by calling deferred method Eval, and in case of failure,
+ //! looks for Added Recognizers to work
Standard_EXPORT Standard_Boolean Evaluate (const IGESData_IGESType& akey, Handle(IGESData_IGESEntity)& res);
+ //! Returns result of last recognition (call of Evaluate)
Standard_EXPORT Handle(IGESData_IGESEntity) Result() const;
+ //! Adds a new Recognizer to the Compound, at the end
+ //! Several calls to Add work by adding in the order of calls :
+ //! Hence, when Eval has failed to recognize, Evaluate will call
+ //! Evaluate from the first added Recognizer if there is one,
+ //! and to the second if there is still no result, and so on
Standard_EXPORT void Add (const Handle(IGESData_FileRecognizer)& reco);
protected:
+ //! Assumes that no result has yet been recognized
Standard_EXPORT IGESData_FileRecognizer();
+ //! Records the result of the recognition. Called by specific
+ //! method Eval to record a result : after calling it, Eval has
+ //! finished and can return
Standard_EXPORT void SetOK (const Handle(IGESData_IGESEntity)& aresult);
+ //! Records that recognition gives no result
Standard_EXPORT void SetKO();
+ //! THIS METHOD DEFINES THE RECOGNITION PROTOCOL, it is proper to
+ //! each precise type of Recognizer
+ //! For a suitable type of akey, it calls SetOK(result) where
+ //! result is an empty result of appropriate type, then returns
Standard_EXPORT virtual void Eval (const IGESData_IGESType& akey) = 0;
public:
+ //! Creates an empty GlobalNode, with no Next
Standard_EXPORT IGESData_GlobalNodeOfSpecificLib();
+ //! Adds a Module bound with a Protocol to the list : does
+ //! nothing if already in the list, THAT IS, Same Type (exact
+ //! match) and Same State (that is, IsEqual is not required)
+ //! Once added, stores its attached Protocol in correspondance
Standard_EXPORT void Add (const Handle(IGESData_SpecificModule)& amodule, const Handle(IGESData_Protocol)& aprotocol);
+ //! Returns the Module stored in a given GlobalNode
Standard_EXPORT const Handle(IGESData_SpecificModule)& Module() const;
+ //! Returns the attached Protocol stored in a given GlobalNode
Standard_EXPORT const Handle(IGESData_Protocol)& Protocol() const;
+ //! Returns the Next GlobalNode. If none is defined, returned
+ //! value is a Null Handle
Standard_EXPORT const Handle(IGESData_GlobalNodeOfSpecificLib)& Next() const;
public:
+ //! Creates an empty GlobalNode, with no Next
Standard_EXPORT IGESData_GlobalNodeOfWriterLib();
+ //! Adds a Module bound with a Protocol to the list : does
+ //! nothing if already in the list, THAT IS, Same Type (exact
+ //! match) and Same State (that is, IsEqual is not required)
+ //! Once added, stores its attached Protocol in correspondance
Standard_EXPORT void Add (const Handle(IGESData_ReadWriteModule)& amodule, const Handle(IGESData_Protocol)& aprotocol);
+ //! Returns the Module stored in a given GlobalNode
Standard_EXPORT const Handle(IGESData_ReadWriteModule)& Module() const;
+ //! Returns the attached Protocol stored in a given GlobalNode
Standard_EXPORT const Handle(IGESData_Protocol)& Protocol() const;
+ //! Returns the Next GlobalNode. If none is defined, returned
+ //! value is a Null Handle
Standard_EXPORT const Handle(IGESData_GlobalNodeOfWriterLib)& Next() const;
public:
+ //! Creates an empty Node, with no Next
Standard_EXPORT IGESData_NodeOfSpecificLib();
+ //! Adds a couple (Module,Protocol), that is, stores it into
+ //! itself if not yet done, else creates a Next Node to do it
Standard_EXPORT void AddNode (const Handle(IGESData_GlobalNodeOfSpecificLib)& anode);
+ //! Returns the Module designated by a precise Node
Standard_EXPORT const Handle(IGESData_SpecificModule)& Module() const;
+ //! Returns the Protocol designated by a precise Node
Standard_EXPORT const Handle(IGESData_Protocol)& Protocol() const;
+ //! Returns the Next Node. If none was defined, returned value
+ //! is a Null Handle
Standard_EXPORT const Handle(IGESData_NodeOfSpecificLib)& Next() const;
public:
+ //! Creates an empty Node, with no Next
Standard_EXPORT IGESData_NodeOfWriterLib();
+ //! Adds a couple (Module,Protocol), that is, stores it into
+ //! itself if not yet done, else creates a Next Node to do it
Standard_EXPORT void AddNode (const Handle(IGESData_GlobalNodeOfWriterLib)& anode);
+ //! Returns the Module designated by a precise Node
Standard_EXPORT const Handle(IGESData_ReadWriteModule)& Module() const;
+ //! Returns the Protocol designated by a precise Node
Standard_EXPORT const Handle(IGESData_Protocol)& Protocol() const;
+ //! Returns the Next Node. If none was defined, returned value
+ //! is a Null Handle
Standard_EXPORT const Handle(IGESData_NodeOfWriterLib)& Next() const;
DEFINE_STANDARD_ALLOC
+ //! Adds a couple (Module-Protocol) into the global definition set
+ //! for this class of Library.
Standard_EXPORT static void SetGlobal (const Handle(IGESData_SpecificModule)& amodule, const Handle(IGESData_Protocol)& aprotocol);
+ //! Creates a Library which complies with a Protocol, that is :
+ //! Same class (criterium IsInstance)
+ //! This creation gets the Modules from the global set, those
+ //! which are bound to the given Protocol and its Resources
Standard_EXPORT IGESData_SpecificLib(const Handle(IGESData_Protocol)& aprotocol);
+ //! Creates an empty Library : it will later by filled by method
+ //! AddProtocol
Standard_EXPORT IGESData_SpecificLib();
+ //! Adds a couple (Module-Protocol) to the Library, given the
+ //! class of a Protocol. Takes Resources into account.
+ //! (if <aprotocol> is not of type TheProtocol, it is not added)
Standard_EXPORT void AddProtocol (const Handle(Standard_Transient)& aprotocol);
+ //! Clears the list of Modules of a library (can be used to
+ //! redefine the order of Modules before action : Clear then
+ //! refill the Library by calls to AddProtocol)
Standard_EXPORT void Clear();
+ //! Sets a library to be defined with the complete Global list
+ //! (all the couples Protocol/Modules recorded in it)
Standard_EXPORT void SetComplete();
+ //! Selects a Module from the Library, given an Object.
+ //! Returns True if Select has succeeded, False else.
+ //! Also Returns (as arguments) the selected Module and the Case
+ //! Number determined by the associated Protocol.
+ //! If Select has failed, <module> is Null Handle and CN is zero.
+ //! (Select can work on any criterium, such as Object DynamicType)
Standard_EXPORT Standard_Boolean Select (const Handle(IGESData_IGESEntity)& obj, Handle(IGESData_SpecificModule)& module, Standard_Integer& CN) const;
+ //! Starts Iteration on the Modules (sets it on the first one)
Standard_EXPORT void Start();
+ //! Returns True if there are more Modules to iterate on
Standard_EXPORT Standard_Boolean More() const;
+ //! Iterates by getting the next Module in the list
+ //! If there is none, the exception will be raised by Value
Standard_EXPORT void Next();
+ //! Returns the current Module in the Iteration
Standard_EXPORT const Handle(IGESData_SpecificModule)& Module() const;
+ //! Returns the current Protocol in the Iteration
Standard_EXPORT const Handle(IGESData_Protocol)& Protocol() const;
DEFINE_STANDARD_ALLOC
+ //! Adds a couple (Module-Protocol) into the global definition set
+ //! for this class of Library.
Standard_EXPORT static void SetGlobal (const Handle(IGESData_ReadWriteModule)& amodule, const Handle(IGESData_Protocol)& aprotocol);
+ //! Creates a Library which complies with a Protocol, that is :
+ //! Same class (criterium IsInstance)
+ //! This creation gets the Modules from the global set, those
+ //! which are bound to the given Protocol and its Resources
Standard_EXPORT IGESData_WriterLib(const Handle(IGESData_Protocol)& aprotocol);
+ //! Creates an empty Library : it will later by filled by method
+ //! AddProtocol
Standard_EXPORT IGESData_WriterLib();
+ //! Adds a couple (Module-Protocol) to the Library, given the
+ //! class of a Protocol. Takes Resources into account.
+ //! (if <aprotocol> is not of type TheProtocol, it is not added)
Standard_EXPORT void AddProtocol (const Handle(Standard_Transient)& aprotocol);
+ //! Clears the list of Modules of a library (can be used to
+ //! redefine the order of Modules before action : Clear then
+ //! refill the Library by calls to AddProtocol)
Standard_EXPORT void Clear();
+ //! Sets a library to be defined with the complete Global list
+ //! (all the couples Protocol/Modules recorded in it)
Standard_EXPORT void SetComplete();
+ //! Selects a Module from the Library, given an Object.
+ //! Returns True if Select has succeeded, False else.
+ //! Also Returns (as arguments) the selected Module and the Case
+ //! Number determined by the associated Protocol.
+ //! If Select has failed, <module> is Null Handle and CN is zero.
+ //! (Select can work on any criterium, such as Object DynamicType)
Standard_EXPORT Standard_Boolean Select (const Handle(IGESData_IGESEntity)& obj, Handle(IGESData_ReadWriteModule)& module, Standard_Integer& CN) const;
+ //! Starts Iteration on the Modules (sets it on the first one)
Standard_EXPORT void Start();
+ //! Returns True if there are more Modules to iterate on
Standard_EXPORT Standard_Boolean More() const;
+ //! Iterates by getting the next Module in the list
+ //! If there is none, the exception will be raised by Value
Standard_EXPORT void Next();
+ //! Returns the current Module in the Iteration
Standard_EXPORT const Handle(IGESData_ReadWriteModule)& Module() const;
+ //! Returns the current Protocol in the Iteration
Standard_EXPORT const Handle(IGESData_Protocol)& Protocol() const;
public:
+ //! Perform the action specific to each class of File Modifier
+ //! <ctx> is the ContextWrite, which brings : the model, the
+ //! protocol, the file name, plus the object AppliedModifiers
+ //! (not used here) and the CheckList
+ //! Remark that the model has to be casted for specific access
+ //!
+ //! <writer> is the Writer and is specific to each norm, on which
+ //! to act
Standard_EXPORT virtual void Perform (IFSelect_ContextWrite& ctx, IGESData_IGESWriter& writer) const = 0;
protected:
+ //! Sets a File Modifier to keep the graph of dependences
+ //! unchanges (because it works on the model already produced)
Standard_EXPORT IGESSelect_FileModifier();
public:
+ //! The inherited Perform does the required cast (and refuses to
+ //! go further if cast has failed) then calls the instantiated
+ //! Performing
Standard_EXPORT void Perform (IFSelect_ContextModif& ctx, const Handle(Interface_InterfaceModel)& target, const Handle(Interface_Protocol)& protocol, Interface_CopyTool& TC) const;
+ //! Specific Perform with Protocol. It is defined to let the
+ //! Protocol unused and to call Performing without Protocol
+ //! (most current case). It can be redefined if specific action
+ //! requires Protocol.
Standard_EXPORT virtual void PerformProtocol (IFSelect_ContextModif& ctx, const Handle(IGESData_IGESModel)& target, const Handle(IGESData_Protocol)& proto, Interface_CopyTool& TC) const;
+ //! Specific Perform, without Protocol. If Performing with
+ //! Protocol is redefined, Performing without Protocol must
+ //! though be defined to do nothing (not called, but demanded
+ //! by the linker)
Standard_EXPORT virtual void Performing (IFSelect_ContextModif& ctx, const Handle(IGESData_IGESModel)& target, Interface_CopyTool& TC) const = 0;
protected:
+ //! Calls inherited Initialize, transmits to it the information
+ //! <maychangegraph>
Standard_EXPORT IGESSelect_ModelModifier(const Standard_Boolean maychangegraph);
DEFINE_STANDARD_ALLOC
+ //! Empty constructor.
Standard_EXPORT IntCurve_IntImpConicParConic();
+ //! Intersection between an implicit curve and
+ //! a parametrised curve.
+ //! The exception ConstructionError is raised if the domain
+ //! of the parametrised curve does not verify HasFirstPoint
+ //! and HasLastPoint return True.
Standard_EXPORT IntCurve_IntImpConicParConic(const IntCurve_IConicTool& ITool, const IntRes2d_Domain& Dom1, const IntCurve_PConic& PCurve, const IntRes2d_Domain& Dom2, const Standard_Real TolConf, const Standard_Real Tol);
+ //! Intersection between an implicit curve and
+ //! a parametrised curve.
+ //! The exception ConstructionError is raised if the domain
+ //! of the parametrised curve does not verify HasFirstPoint
+ //! and HasLastPoint return True.
Standard_EXPORT void Perform (const IntCurve_IConicTool& ITool, const IntRes2d_Domain& Dom1, const IntCurve_PConic& PCurve, const IntRes2d_Domain& Dom2, const Standard_Real TolConf, const Standard_Real Tol);
Standard_EXPORT Standard_Real FindU (const Standard_Real parameter, gp_Pnt2d& point, const IntCurve_PConic& TheParCurev, const IntCurve_IConicTool& TheImpTool) const;
DEFINE_STANDARD_ALLOC
+ //! Constructor of the class.
Standard_EXPORT IntCurve_MyImpParToolOfIntImpConicParConic(const IntCurve_IConicTool& IT, const IntCurve_PConic& PC);
+ //! Computes the value of the signed distance between
+ //! the implicit curve and the point at parameter Param
+ //! on the parametrised curve.
Standard_EXPORT Standard_Boolean Value (const Standard_Real Param, Standard_Real& F) Standard_OVERRIDE;
+ //! Computes the derivative of the previous function at
+ //! parameter Param.
Standard_EXPORT Standard_Boolean Derivative (const Standard_Real Param, Standard_Real& D) Standard_OVERRIDE;
+ //! Computes the value and the derivative of the function.
Standard_EXPORT Standard_Boolean Values (const Standard_Real Param, Standard_Real& F, Standard_Real& D) Standard_OVERRIDE;
DEFINE_STANDARD_ALLOC
+ //! Empty Constructor
Standard_EXPORT IntCurveSurface_HInter();
+ //! Compute the Intersection between the curve and the
+ //! surface
Standard_EXPORT void Perform (const Handle(Adaptor3d_HCurve)& Curve, const Handle(Adaptor3d_HSurface)& Surface);
+ //! Compute the Intersection between the curve and
+ //! the surface. The Curve is already sampled and
+ //! its polygon : <Polygon> is given.
Standard_EXPORT void Perform (const Handle(Adaptor3d_HCurve)& Curve, const IntCurveSurface_ThePolygonOfHInter& Polygon, const Handle(Adaptor3d_HSurface)& Surface);
+ //! Compute the Intersection between the curve and
+ //! the surface. The Curve is already sampled and
+ //! its polygon : <Polygon> is given. The Surface is
+ //! also sampled and <Polyhedron> is given.
Standard_EXPORT void Perform (const Handle(Adaptor3d_HCurve)& Curve, const IntCurveSurface_ThePolygonOfHInter& ThePolygon, const Handle(Adaptor3d_HSurface)& Surface, const IntCurveSurface_ThePolyhedronOfHInter& Polyhedron);
+ //! Compute the Intersection between the curve and
+ //! the surface. The Curve is already sampled and
+ //! its polygon : <Polygon> is given. The Surface is
+ //! also sampled and <Polyhedron> is given.
Standard_EXPORT void Perform (const Handle(Adaptor3d_HCurve)& Curve, const IntCurveSurface_ThePolygonOfHInter& ThePolygon, const Handle(Adaptor3d_HSurface)& Surface, const IntCurveSurface_ThePolyhedronOfHInter& Polyhedron, Bnd_BoundSortBox& BndBSB);
+ //! Compute the Intersection between the curve and
+ //! the surface. The Surface is already sampled and
+ //! its polyhedron : <Polyhedron> is given.
Standard_EXPORT void Perform (const Handle(Adaptor3d_HCurve)& Curve, const Handle(Adaptor3d_HSurface)& Surface, const IntCurveSurface_ThePolyhedronOfHInter& Polyhedron);
protected:
+ //! Compute the Intersection between the curve and the
+ //! surface
Standard_EXPORT void Perform (const Handle(Adaptor3d_HCurve)& Curve, const Handle(Adaptor3d_HSurface)& Surface, const Standard_Real U0, const Standard_Real V0, const Standard_Real U1, const Standard_Real V1);
Standard_EXPORT void InternalPerformCurveQuadric (const Handle(Adaptor3d_HCurve)& Curve, const Handle(Adaptor3d_HSurface)& Surface);
DEFINE_STANDARD_ALLOC
+ //! compute the solution point with the close point
+ //! MarginCoef is the coefficient for extension of UV bounds.
+ //! Ex., UFirst -= MarginCoef*(ULast-UFirst)
Standard_EXPORT IntCurveSurface_TheExactHInter(const Standard_Real U, const Standard_Real V, const Standard_Real W, const IntCurveSurface_TheCSFunctionOfHInter& F, const Standard_Real TolTangency, const Standard_Real MarginCoef = 0.0);
+ //! initialize the parameters to compute the solution
Standard_EXPORT IntCurveSurface_TheExactHInter(const IntCurveSurface_TheCSFunctionOfHInter& F, const Standard_Real TolTangency);
+ //! compute the solution
+ //! it's possible to write to optimize:
+ //! IntImp_IntCS inter(S1,C1,Toltangency)
+ //! math_FunctionSetRoot rsnld(Inter.function())
+ //! while ...{
+ //! u=...
+ //! v=...
+ //! w=...
+ //! inter.Perform(u,v,w,rsnld)
+ //! }
+ //! or
+ //! IntImp_IntCS inter(Toltangency)
+ //! inter.SetSurface(S);
+ //! math_FunctionSetRoot rsnld(Inter.function())
+ //! while ...{
+ //! C=...
+ //! inter.SetCurve(C);
+ //! u=...
+ //! v=...
+ //! w=...
+ //! inter.Perform(u,v,w,rsnld)
+ //! }
Standard_EXPORT void Perform (const Standard_Real U, const Standard_Real V, const Standard_Real W, math_FunctionSetRoot& Rsnld, const Standard_Real u0, const Standard_Real v0, const Standard_Real u1, const Standard_Real v1, const Standard_Real w0, const Standard_Real w1);
+ //! Returns TRUE if the creation completed without failure.
Standard_EXPORT Standard_Boolean IsDone() const;
Standard_EXPORT Standard_Boolean IsEmpty() const;
+ //! returns the intersection point
+ //! The exception NotDone is raised if IsDone is false.
+ //! The exception DomainError is raised if IsEmpty is true.
Standard_EXPORT const gp_Pnt& Point() const;
Standard_EXPORT Standard_Real ParameterOnCurve() const;
Standard_EXPORT void ParameterOnSurface (Standard_Real& U, Standard_Real& V) const;
+ //! return the math function which
+ //! is used to compute the intersection
Standard_EXPORT IntCurveSurface_TheCSFunctionOfHInter& Function();
static GeomAbs_Shape Continuity (const Handle(Adaptor3d_HCurve)& C);
+ //! Returns the number of intervals for continuity
+ //! <S>. May be one if Continuity(myclass) >= <S>
static Standard_Integer NbIntervals (const Handle(Adaptor3d_HCurve)& C, const GeomAbs_Shape S);
+ //! Stores in <T> the parameters bounding the intervals
+ //! of continuity <S>.
+ //!
+ //! The array must provide enough room to accomodate
+ //! for the parameters. i.e. T.Length() > NbIntervals()
static void Intervals (const Handle(Adaptor3d_HCurve)& C, TColStd_Array1OfReal& T, const GeomAbs_Shape S);
static Standard_Boolean IsClosed (const Handle(Adaptor3d_HCurve)& C);
static Standard_Real Period (const Handle(Adaptor3d_HCurve)& C);
+ //! Computes the point of parameter U on the curve.
static gp_Pnt Value (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U);
+ //! Computes the point of parameter U on the curve.
static void D0 (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U, gp_Pnt& P);
+ //! Computes the point of parameter U on the curve with its
+ //! first derivative.
+ //! Raised if the continuity of the current interval
+ //! is not C1.
static void D1 (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V);
+
+ //! Returns the point P of parameter U, the first and second
+ //! derivatives V1 and V2.
+ //! Raised if the continuity of the current interval
+ //! is not C2.
static void D2 (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2);
+
+ //! Returns the point P of parameter U, the first, the second
+ //! and the third derivative.
+ //! Raised if the continuity of the current interval
+ //! is not C3.
static void D3 (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3);
+
+ //! The returned vector gives the value of the derivative for the
+ //! order of derivation N.
+ //! Raised if the continuity of the current interval
+ //! is not CN.
+ //! Raised if N < 1.
static gp_Vec DN (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U, const Standard_Integer N);
+ //! Returns the parametric resolution corresponding
+ //! to the real space resolution <R3d>.
static Standard_Real Resolution (const Handle(Adaptor3d_HCurve)& C, const Standard_Real R3d);
+ //! Returns the type of the curve in the current
+ //! interval : Line, Circle, Ellipse, Hyperbola,
+ //! Parabola, BezierCurve, BSplineCurve, OtherCurve.
static GeomAbs_CurveType GetType (const Handle(Adaptor3d_HCurve)& C);
static gp_Lin Line (const Handle(Adaptor3d_HCurve)& C);
DEFINE_STANDARD_ALLOC
+ //! Constructs an empty interference between Polygon and
+ //! Polyhedron.
Standard_EXPORT IntCurveSurface_TheInterferenceOfHInter();
+ //! Constructs and computes an interference between the Polygon
+ //! and the Polyhedron.
Standard_EXPORT IntCurveSurface_TheInterferenceOfHInter(const IntCurveSurface_ThePolygonOfHInter& thePolyg, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
+ //! Constructs and computes an interference between the
+ //! Straight Line and the Polyhedron.
Standard_EXPORT IntCurveSurface_TheInterferenceOfHInter(const gp_Lin& theLin, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
+ //! Constructs and computes an interference between the
+ //! Straight Lines and the Polyhedron.
Standard_EXPORT IntCurveSurface_TheInterferenceOfHInter(const Intf_Array1OfLin& theLins, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
+ //! Computes an interference between the Polygon and the
+ //! Polyhedron.
Standard_EXPORT void Perform (const IntCurveSurface_ThePolygonOfHInter& thePolyg, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
+ //! Computes an interference between the Straight Line and the
+ //! Polyhedron.
Standard_EXPORT void Perform (const gp_Lin& theLin, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
+ //! Computes an interference between the Straight Lines and
+ //! the Polyhedron.
Standard_EXPORT void Perform (const Intf_Array1OfLin& theLins, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
+ //! Constructs and computes an interference between the Polygon
+ //! and the Polyhedron.
Standard_EXPORT IntCurveSurface_TheInterferenceOfHInter(const IntCurveSurface_ThePolygonOfHInter& thePolyg, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh, Bnd_BoundSortBox& theBoundSB);
+ //! Constructs and computes an interference between the
+ //! Straight Line and the Polyhedron.
Standard_EXPORT IntCurveSurface_TheInterferenceOfHInter(const gp_Lin& theLin, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh, Bnd_BoundSortBox& theBoundSB);
+ //! Constructs and computes an interference between the
+ //! Straight Lines and the Polyhedron.
Standard_EXPORT IntCurveSurface_TheInterferenceOfHInter(const Intf_Array1OfLin& theLins, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh, Bnd_BoundSortBox& theBoundSB);
+ //! Computes an interference between the Polygon and the
+ //! Polyhedron.
Standard_EXPORT void Perform (const IntCurveSurface_ThePolygonOfHInter& thePolyg, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh, Bnd_BoundSortBox& theBoundSB);
+ //! Computes an interference between the Straight Line and the
+ //! Polyhedron.
Standard_EXPORT void Perform (const gp_Lin& theLin, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh, Bnd_BoundSortBox& theBoundSB);
+ //! Computes an interference between the Straight Lines and
+ //! the Polyhedron.
Standard_EXPORT void Perform (const Intf_Array1OfLin& theLins, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh, Bnd_BoundSortBox& theBoundSB);
+ //! Compares the boundings between the segment of <thePolyg> and
+ //! the facets of <thePolyh>.
Standard_EXPORT void Interference (const IntCurveSurface_ThePolygonOfHInter& thePolyg, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh, Bnd_BoundSortBox& theBoundSB);
+ //! Compares the boundings between the segment of <thePolyg> and
+ //! the facets of <thePolyh>.
Standard_EXPORT void Interference (const IntCurveSurface_ThePolygonOfHInter& thePolyg, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
private:
+ //! Computes the intersection between the segment <BegO><EndO>
+ //! and the triangle <TTri> of <thePolyh>.
Standard_EXPORT void Intersect (const gp_Pnt& BegO, const gp_Pnt& EndO, const Standard_Boolean Infinite, const Standard_Integer TTri, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
+ //! Computes the intersection between the segment <BegO><EndO>
+ //! and the triangle <TTri> of <thePolyh>.
Standard_EXPORT void Intersect (const gp_Pnt& BegO, const gp_Pnt& EndO, const Standard_Boolean Infinite, const Standard_Integer TTri, const IntCurveSurface_ThePolyhedronOfHInter& thePolyh, const gp_XYZ& TriNormal, const Standard_Real TriDp, const Standard_Real dBegTri, const Standard_Real dEndTri);
Standard_EXPORT IntCurveSurface_ThePolygonOfHInter(const Handle(Adaptor3d_HCurve)& Curve, const TColStd_Array1OfReal& Upars);
+ //! Give the bounding box of the polygon.
const Bnd_Box& Bounding() const;
Standard_Real DeflectionOverEstimation() const;
Standard_Boolean Closed() const;
+ //! Give the number of Segments in the polyline.
Standard_Integer NbSegments() const;
+ //! Give the point of range Index in the Polygon.
const gp_Pnt& BeginOfSeg (const Standard_Integer Index) const;
+ //! Give the point of range Index in the Polygon.
const gp_Pnt& EndOfSeg (const Standard_Integer Index) const;
+ //! Returns the parameter (On the curve)
+ //! of the first point of the Polygon
Standard_Real InfParameter() const;
+ //! Returns the parameter (On the curve)
+ //! of the last point of the Polygon
Standard_Real SupParameter() const;
+ //! Give an approximation of the parameter on the curve
+ //! according to the discretization of the Curve.
Standard_EXPORT Standard_Real ApproxParamOnCurve (const Standard_Integer Index, const Standard_Real ParamOnLine) const;
Standard_EXPORT void Dump() const;
DEFINE_STANDARD_ALLOC
+ //! Give the bounding box of the polygon.
static const Bnd_Box& Bounding (const IntCurveSurface_ThePolygonOfHInter& thePolygon);
static Standard_Real DeflectionOverEstimation (const IntCurveSurface_ThePolygonOfHInter& thePolygon);
static Standard_Integer NbSegments (const IntCurveSurface_ThePolygonOfHInter& thePolygon);
+ //! Give the point of range Index in the Polygon.
static const gp_Pnt& BeginOfSeg (const IntCurveSurface_ThePolygonOfHInter& thePolygon, const Standard_Integer Index);
+ //! Give the point of range Index in the Polygon.
static const gp_Pnt& EndOfSeg (const IntCurveSurface_ThePolygonOfHInter& thePolygon, const Standard_Integer Index);
Standard_EXPORT static void Dump (const IntCurveSurface_ThePolygonOfHInter& thePolygon);
Standard_EXPORT void VMaxSingularity (const Standard_Boolean Sing);
+ //! get the size of the discretization.
Standard_EXPORT void Size (Standard_Integer& nbdu, Standard_Integer& nbdv) const;
+ //! Give the number of triangles in this double array of
Standard_EXPORT Standard_Integer NbTriangles() const;
+ //! Give the 3 points of the triangle of addresse Index in
+ //! the double array of triangles.
Standard_EXPORT void Triangle (const Standard_Integer Index, Standard_Integer& P1, Standard_Integer& P2, Standard_Integer& P3) const;
+ //! Give the addresse Tricon of the triangle connexe to the
+ //! triangle of address Triang by the edge Pivot Pedge and
+ //! the third point of this connexe triangle. When we are
+ //! on a free edge TriCon==0 but the function return the
+ //! value of the triangle in the other side of Pivot on
+ //! the free edge. Used to turn around a vertex.
Standard_EXPORT Standard_Integer TriConnex (const Standard_Integer Triang, const Standard_Integer Pivot, const Standard_Integer Pedge, Standard_Integer& TriCon, Standard_Integer& OtherP) const;
+ //! Give the number of point in the double array of
+ //! triangles ((nbdu+1)*(nbdv+1)).
Standard_EXPORT Standard_Integer NbPoints() const;
+ //! Set the value of a field of the double array of
+ //! points.
Standard_EXPORT void Point (const gp_Pnt& thePnt, const Standard_Integer lig, const Standard_Integer col, const Standard_Real U, const Standard_Real V);
+ //! Give the point of index i in the MaTriangle.
Standard_EXPORT const gp_Pnt& Point (const Standard_Integer Index, Standard_Real& U, Standard_Real& V) const;
+ //! Give the point of index i in the MaTriangle.
Standard_EXPORT const gp_Pnt& Point (const Standard_Integer Index) const;
+ //! Give the point of index i in the MaTriangle.
Standard_EXPORT void Point (const Standard_Integer Index, gp_Pnt& P) const;
+ //! Give the bounding box of the MaTriangle.
Standard_EXPORT const Bnd_Box& Bounding() const;
+ //! Compute the array of boxes. The box <n> corresponding
+ //! to the triangle <n>.
Standard_EXPORT void FillBounding();
+ //! Give the array of boxes. The box <n> corresponding
+ //! to the triangle <n>.
Standard_EXPORT const Handle(Bnd_HArray1OfBox)& ComponentsBounding() const;
Standard_EXPORT Standard_Real DeflectionOverEstimation() const;
Standard_EXPORT Standard_Boolean HasVMaxSingularity() const;
+ //! Give the plane equation of the triangle of addresse Triang.
Standard_EXPORT void PlaneEquation (const Standard_Integer Triang, gp_XYZ& NormalVector, Standard_Real& PolarDistance) const;
+ //! Give the plane equation of the triangle of addresse Triang.
Standard_EXPORT Standard_Boolean Contain (const Standard_Integer Triang, const gp_Pnt& ThePnt) const;
Standard_EXPORT void Parameters (const Standard_Integer Index, Standard_Real& U, Standard_Real& V) const;
+ //! This method returns true if the edge based on points with
+ //! indices Index1 and Index2 represents a boundary edge. It is
+ //! necessary to take into account the boundary deflection for
+ //! this edge.
Standard_EXPORT Standard_Boolean IsOnBound (const Standard_Integer Index1, const Standard_Integer Index2) const;
+ //! This method returns a border deflection.
Standard_Real GetBorderDeflection() const;
Standard_EXPORT void Dump() const;
private:
+ //! This method computes and returns a deflection of isoline
+ //! of given parameter on Surface.
Standard_EXPORT Standard_Real ComputeBorderDeflection (const Handle(Adaptor3d_HSurface)& Surface, const Standard_Real Parameter, const Standard_Real PMin, const Standard_Real PMax, const Standard_Boolean isUIso) const;
DEFINE_STANDARD_ALLOC
+ //! Give the bounding box of the PolyhedronTool.
static const Bnd_Box& Bounding (const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
+ //! Give the array of boxes. The box <n> corresponding
+ //! to the triangle <n>.
static const Handle(Bnd_HArray1OfBox)& ComponentsBounding (const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
+ //! Give the tolerance of the polygon.
static Standard_Real DeflectionOverEstimation (const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
+ //! Give the number of triangles in this polyedral surface.
static Standard_Integer NbTriangles (const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
+ //! Give the indices of the 3 points of the triangle of
+ //! address Index in the PolyhedronTool.
static void Triangle (const IntCurveSurface_ThePolyhedronOfHInter& thePolyh, const Standard_Integer Index, Standard_Integer& P1, Standard_Integer& P2, Standard_Integer& P3);
+ //! Give the point of index i in the polyedral surface.
static const gp_Pnt& Point (const IntCurveSurface_ThePolyhedronOfHInter& thePolyh, const Standard_Integer Index);
+ //! Give the addresse Tricon of the triangle connexe to
+ //! the triangle of address Triang by the edge Pivot Pedge
+ //! and the third point of this connexe triangle. When we
+ //! are on a free edge TriCon==0 but the function return
+ //! the value of the triangle in the other side of Pivot
+ //! on the free edge. Used to turn around a vertex.
static Standard_Integer TriConnex (const IntCurveSurface_ThePolyhedronOfHInter& thePolyh, const Standard_Integer Triang, const Standard_Integer Pivot, const Standard_Integer Pedge, Standard_Integer& TriCon, Standard_Integer& OtherP);
+ //! This method returns true if the edge based on points with
+ //! indices Index1 and Index2 represents a boundary edge. It is
+ //! necessary to take into account the boundary deflection for
+ //! this edge.
static Standard_Boolean IsOnBound (const IntCurveSurface_ThePolyhedronOfHInter& thePolyh, const Standard_Integer Index1, const Standard_Integer Index2);
+ //! This method returns a border deflection of the polyhedron.
static Standard_Real GetBorderDeflection (const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
Standard_EXPORT static void Dump (const IntCurveSurface_ThePolyhedronOfHInter& thePolyh);
DEFINE_STANDARD_ALLOC
+ //! Provides the signed distance function : Q(w)
+ //! and its first derivative dQ(w)/dw
Standard_EXPORT IntCurveSurface_TheQuadCurvExactHInter(const Handle(Adaptor3d_HSurface)& S, const Handle(Adaptor3d_HCurve)& C);
Standard_EXPORT Standard_Boolean IsDone() const;
Standard_EXPORT Standard_Integer NbIntervals() const;
+ //! U1 and U2 are the parameters of
+ //! a segment on the curve.
Standard_EXPORT void Intervals (const Standard_Integer Index, Standard_Real& U1, Standard_Real& U2) const;
DEFINE_STANDARD_ALLOC
+ //! Create the function.
Standard_EXPORT IntCurveSurface_TheQuadCurvFuncOfTheQuadCurvExactHInter(const IntSurf_Quadric& Q, const Handle(Adaptor3d_HCurve)& C);
+ //! Computes the value of the signed distance between
+ //! the implicit surface and the point at parameter
+ //! Param on the parametrised curve.
+ //! Value always returns True.
Standard_EXPORT Standard_Boolean Value (const Standard_Real Param, Standard_Real& F) Standard_OVERRIDE;
+ //! Computes the derivative of the previous function at
+ //! parameter Param.
+ //! Derivative always returns True.
Standard_EXPORT Standard_Boolean Derivative (const Standard_Real Param, Standard_Real& D) Standard_OVERRIDE;
+ //! Computes the value and the derivative of the function.
+ //! returns True.
Standard_EXPORT Standard_Boolean Values (const Standard_Real Param, Standard_Real& F, Standard_Real& D) Standard_OVERRIDE;
DEFINE_STANDARD_ALLOC
+ //! compute the solution point with the close point
+ //! MarginCoef is the coefficient for extension of UV bounds.
+ //! Ex., UFirst -= MarginCoef*(ULast-UFirst)
Standard_EXPORT IntPatch_CurvIntSurf(const Standard_Real U, const Standard_Real V, const Standard_Real W, const IntPatch_CSFunction& F, const Standard_Real TolTangency, const Standard_Real MarginCoef = 0.0);
+ //! initialize the parameters to compute the solution
Standard_EXPORT IntPatch_CurvIntSurf(const IntPatch_CSFunction& F, const Standard_Real TolTangency);
+ //! compute the solution
+ //! it's possible to write to optimize:
+ //! IntImp_IntCS inter(S1,C1,Toltangency)
+ //! math_FunctionSetRoot rsnld(Inter.function())
+ //! while ...{
+ //! u=...
+ //! v=...
+ //! w=...
+ //! inter.Perform(u,v,w,rsnld)
+ //! }
+ //! or
+ //! IntImp_IntCS inter(Toltangency)
+ //! inter.SetSurface(S);
+ //! math_FunctionSetRoot rsnld(Inter.function())
+ //! while ...{
+ //! C=...
+ //! inter.SetCurve(C);
+ //! u=...
+ //! v=...
+ //! w=...
+ //! inter.Perform(u,v,w,rsnld)
+ //! }
Standard_EXPORT void Perform (const Standard_Real U, const Standard_Real V, const Standard_Real W, math_FunctionSetRoot& Rsnld, const Standard_Real u0, const Standard_Real v0, const Standard_Real u1, const Standard_Real v1, const Standard_Real w0, const Standard_Real w1);
+ //! Returns TRUE if the creation completed without failure.
Standard_EXPORT Standard_Boolean IsDone() const;
Standard_EXPORT Standard_Boolean IsEmpty() const;
+ //! returns the intersection point
+ //! The exception NotDone is raised if IsDone is false.
+ //! The exception DomainError is raised if IsEmpty is true.
Standard_EXPORT const gp_Pnt& Point() const;
Standard_EXPORT Standard_Real ParameterOnCurve() const;
Standard_EXPORT void ParameterOnSurface (Standard_Real& U, Standard_Real& V) const;
+ //! return the math function which
+ //! is used to compute the intersection
Standard_EXPORT IntPatch_CSFunction& Function();
DEFINE_STANDARD_ALLOC
+ //! Constructs an empty sequence.
+ //! Use:
+ //! - the function Append or Prepend to add an item or
+ //! a collection of items at the end, or at the beginning of the sequence,
+ //! - the function InsertAfter or InsertBefore to add an
+ //! item or a collection of items at any position in the sequence,
+ //! - operator() or the function SetValue to assign a
+ //! new value to an item of the sequence,
+ //! - operator() to read an item of the sequence,
+ //! - the function Remove to remove an item at any
+ //! position in the sequence.
+ //! Warning
+ //! To copy a sequence, you must explicitly call the
+ //! assignment operator (operator=).
IntPatch_SequenceOfIWLineOfTheIWalking();
+ //! Creation by copy of existing Sequence.
Standard_EXPORT IntPatch_SequenceOfIWLineOfTheIWalking(const IntPatch_SequenceOfIWLineOfTheIWalking& Other);
+ //! Removes all element(s) of the sequence <me>
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = ()
Standard_EXPORT void Clear();
~IntPatch_SequenceOfIWLineOfTheIWalking()
{
Clear();
}
+ //! Copies the contents of the sequence Other into this sequence.
+ //! If this sequence is not empty, it is automatically cleared before the copy.
Standard_EXPORT const IntPatch_SequenceOfIWLineOfTheIWalking& Assign (const IntPatch_SequenceOfIWLineOfTheIWalking& Other);
const IntPatch_SequenceOfIWLineOfTheIWalking& operator = (const IntPatch_SequenceOfIWLineOfTheIWalking& Other)
{
return Assign(Other);
}
+ //! Appends <T> at the end of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C T)
Standard_EXPORT void Append (const Handle(IntPatch_TheIWLineOfTheIWalking)& T);
+ //! Concatenates <S> at the end of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void Append (IntPatch_SequenceOfIWLineOfTheIWalking& S);
+ //! Add <T> at the beginning of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (T A B C )
Standard_EXPORT void Prepend (const Handle(IntPatch_TheIWLineOfTheIWalking)& T);
+ //! Concatenates <S> at the beginning of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C) S = (D E F)
+ //! after me = (D E F A B C)
+ //! S = ()
void Prepend (IntPatch_SequenceOfIWLineOfTheIWalking& S);
+ //! Inserts <T> in <me> before the position <Index>.
+ //! Raises an exception if the index is out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B D), Index = 3, T = C
+ //! after
+ //! me = (A B C D )
void InsertBefore (const Standard_Integer Index, const Handle(IntPatch_TheIWLineOfTheIWalking)& T);
+ //! Inserts the sequence <S> in <me> before
+ //! the position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B F), Index = 3, S = (C D E)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertBefore (const Standard_Integer Index, IntPatch_SequenceOfIWLineOfTheIWalking& S);
+ //! Inserts <T> in <me> after the position <Index>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, T = D
+ //! after
+ //! me = (A B C D)
Standard_EXPORT void InsertAfter (const Standard_Integer Index, const Handle(IntPatch_TheIWLineOfTheIWalking)& T);
+ //! Inserts the sequence <S> in <me> after the
+ //! position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bound.
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertAfter (const Standard_Integer Index, IntPatch_SequenceOfIWLineOfTheIWalking& S);
+ //! Returns the first element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns A
Standard_EXPORT const Handle(IntPatch_TheIWLineOfTheIWalking)& First() const;
+ //! Returns the last element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns C
Standard_EXPORT const Handle(IntPatch_TheIWLineOfTheIWalking)& Last() const;
+ //! Keeps in <me> the items 1 to <Index>-1 and
+ //! puts in <Sub> the items <Index> to the end.
+ //! Example:
+ //! before
+ //! me = (A B C D) ,Index = 3
+ //! after
+ //! me = (A B)
+ //! Sub = (C D)
void Split (const Standard_Integer Index, IntPatch_SequenceOfIWLineOfTheIWalking& Sub);
+ //! Returns the Item at position <Index> in <me>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT const Handle(IntPatch_TheIWLineOfTheIWalking)& Value (const Standard_Integer Index) const;
const Handle(IntPatch_TheIWLineOfTheIWalking)& operator() (const Standard_Integer Index) const
{
return Value(Index);
}
+ //! Changes the item at position <Index>
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1, Item = D
+ //! after
+ //! me = (D B C)
Standard_EXPORT void SetValue (const Standard_Integer Index, const Handle(IntPatch_TheIWLineOfTheIWalking)& I);
+ //! Returns the Item at position <Index> in
+ //! <me>. This method may be used to modify
+ //! <me> : S.Value(Index) = Item.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT Handle(IntPatch_TheIWLineOfTheIWalking)& ChangeValue (const Standard_Integer Index);
Handle(IntPatch_TheIWLineOfTheIWalking)& operator() (const Standard_Integer Index)
{
return ChangeValue(Index);
}
+ //! Removes from <me> the item at position <Index>.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3
+ //! after
+ //! me = (A B)
Standard_EXPORT void Remove (const Standard_Integer Index);
+ //! Removes from <me> all the items of
+ //! positions between <FromIndex> and <ToIndex>.
+ //! Raises an exception if the indices are out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B C D E F), FromIndex = 1 ToIndex = 3
+ //! after
+ //! me = (D E F)
Standard_EXPORT void Remove (const Standard_Integer FromIndex, const Standard_Integer ToIndex);
DEFINE_STANDARD_ALLOC
+ //! Constructs an empty sequence.
+ //! Use:
+ //! - the function Append or Prepend to add an item or
+ //! a collection of items at the end, or at the beginning of the sequence,
+ //! - the function InsertAfter or InsertBefore to add an
+ //! item or a collection of items at any position in the sequence,
+ //! - operator() or the function SetValue to assign a
+ //! new value to an item of the sequence,
+ //! - operator() to read an item of the sequence,
+ //! - the function Remove to remove an item at any
+ //! position in the sequence.
+ //! Warning
+ //! To copy a sequence, you must explicitly call the
+ //! assignment operator (operator=).
IntPatch_SequenceOfPathPointOfTheSOnBounds();
+ //! Creation by copy of existing Sequence.
Standard_EXPORT IntPatch_SequenceOfPathPointOfTheSOnBounds(const IntPatch_SequenceOfPathPointOfTheSOnBounds& Other);
+ //! Removes all element(s) of the sequence <me>
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = ()
Standard_EXPORT void Clear();
~IntPatch_SequenceOfPathPointOfTheSOnBounds()
{
Clear();
}
+ //! Copies the contents of the sequence Other into this sequence.
+ //! If this sequence is not empty, it is automatically cleared before the copy.
Standard_EXPORT const IntPatch_SequenceOfPathPointOfTheSOnBounds& Assign (const IntPatch_SequenceOfPathPointOfTheSOnBounds& Other);
const IntPatch_SequenceOfPathPointOfTheSOnBounds& operator = (const IntPatch_SequenceOfPathPointOfTheSOnBounds& Other)
{
return Assign(Other);
}
+ //! Appends <T> at the end of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C T)
Standard_EXPORT void Append (const IntPatch_ThePathPointOfTheSOnBounds& T);
+ //! Concatenates <S> at the end of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void Append (IntPatch_SequenceOfPathPointOfTheSOnBounds& S);
+ //! Add <T> at the beginning of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (T A B C )
Standard_EXPORT void Prepend (const IntPatch_ThePathPointOfTheSOnBounds& T);
+ //! Concatenates <S> at the beginning of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C) S = (D E F)
+ //! after me = (D E F A B C)
+ //! S = ()
void Prepend (IntPatch_SequenceOfPathPointOfTheSOnBounds& S);
+ //! Inserts <T> in <me> before the position <Index>.
+ //! Raises an exception if the index is out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B D), Index = 3, T = C
+ //! after
+ //! me = (A B C D )
void InsertBefore (const Standard_Integer Index, const IntPatch_ThePathPointOfTheSOnBounds& T);
+ //! Inserts the sequence <S> in <me> before
+ //! the position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B F), Index = 3, S = (C D E)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertBefore (const Standard_Integer Index, IntPatch_SequenceOfPathPointOfTheSOnBounds& S);
+ //! Inserts <T> in <me> after the position <Index>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, T = D
+ //! after
+ //! me = (A B C D)
Standard_EXPORT void InsertAfter (const Standard_Integer Index, const IntPatch_ThePathPointOfTheSOnBounds& T);
+ //! Inserts the sequence <S> in <me> after the
+ //! position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bound.
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertAfter (const Standard_Integer Index, IntPatch_SequenceOfPathPointOfTheSOnBounds& S);
+ //! Returns the first element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns A
Standard_EXPORT const IntPatch_ThePathPointOfTheSOnBounds& First() const;
+ //! Returns the last element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns C
Standard_EXPORT const IntPatch_ThePathPointOfTheSOnBounds& Last() const;
+ //! Keeps in <me> the items 1 to <Index>-1 and
+ //! puts in <Sub> the items <Index> to the end.
+ //! Example:
+ //! before
+ //! me = (A B C D) ,Index = 3
+ //! after
+ //! me = (A B)
+ //! Sub = (C D)
void Split (const Standard_Integer Index, IntPatch_SequenceOfPathPointOfTheSOnBounds& Sub);
+ //! Returns the Item at position <Index> in <me>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT const IntPatch_ThePathPointOfTheSOnBounds& Value (const Standard_Integer Index) const;
const IntPatch_ThePathPointOfTheSOnBounds& operator() (const Standard_Integer Index) const
{
return Value(Index);
}
+ //! Changes the item at position <Index>
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1, Item = D
+ //! after
+ //! me = (D B C)
Standard_EXPORT void SetValue (const Standard_Integer Index, const IntPatch_ThePathPointOfTheSOnBounds& I);
+ //! Returns the Item at position <Index> in
+ //! <me>. This method may be used to modify
+ //! <me> : S.Value(Index) = Item.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT IntPatch_ThePathPointOfTheSOnBounds& ChangeValue (const Standard_Integer Index);
IntPatch_ThePathPointOfTheSOnBounds& operator() (const Standard_Integer Index)
{
return ChangeValue(Index);
}
+ //! Removes from <me> the item at position <Index>.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3
+ //! after
+ //! me = (A B)
Standard_EXPORT void Remove (const Standard_Integer Index);
+ //! Removes from <me> all the items of
+ //! positions between <FromIndex> and <ToIndex>.
+ //! Raises an exception if the indices are out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B C D E F), FromIndex = 1 ToIndex = 3
+ //! after
+ //! me = (D E F)
Standard_EXPORT void Remove (const Standard_Integer FromIndex, const Standard_Integer ToIndex);
DEFINE_STANDARD_ALLOC
+ //! Constructs an empty sequence.
+ //! Use:
+ //! - the function Append or Prepend to add an item or
+ //! a collection of items at the end, or at the beginning of the sequence,
+ //! - the function InsertAfter or InsertBefore to add an
+ //! item or a collection of items at any position in the sequence,
+ //! - operator() or the function SetValue to assign a
+ //! new value to an item of the sequence,
+ //! - operator() to read an item of the sequence,
+ //! - the function Remove to remove an item at any
+ //! position in the sequence.
+ //! Warning
+ //! To copy a sequence, you must explicitly call the
+ //! assignment operator (operator=).
IntPatch_SequenceOfSegmentOfTheSOnBounds();
+ //! Creation by copy of existing Sequence.
Standard_EXPORT IntPatch_SequenceOfSegmentOfTheSOnBounds(const IntPatch_SequenceOfSegmentOfTheSOnBounds& Other);
+ //! Removes all element(s) of the sequence <me>
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = ()
Standard_EXPORT void Clear();
~IntPatch_SequenceOfSegmentOfTheSOnBounds()
{
Clear();
}
+ //! Copies the contents of the sequence Other into this sequence.
+ //! If this sequence is not empty, it is automatically cleared before the copy.
Standard_EXPORT const IntPatch_SequenceOfSegmentOfTheSOnBounds& Assign (const IntPatch_SequenceOfSegmentOfTheSOnBounds& Other);
const IntPatch_SequenceOfSegmentOfTheSOnBounds& operator = (const IntPatch_SequenceOfSegmentOfTheSOnBounds& Other)
{
return Assign(Other);
}
+ //! Appends <T> at the end of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C T)
Standard_EXPORT void Append (const IntPatch_TheSegmentOfTheSOnBounds& T);
+ //! Concatenates <S> at the end of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void Append (IntPatch_SequenceOfSegmentOfTheSOnBounds& S);
+ //! Add <T> at the beginning of <me>.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (T A B C )
Standard_EXPORT void Prepend (const IntPatch_TheSegmentOfTheSOnBounds& T);
+ //! Concatenates <S> at the beginning of <me>.
+ //! <S> is cleared.
+ //! Example:
+ //! before
+ //! me = (A B C) S = (D E F)
+ //! after me = (D E F A B C)
+ //! S = ()
void Prepend (IntPatch_SequenceOfSegmentOfTheSOnBounds& S);
+ //! Inserts <T> in <me> before the position <Index>.
+ //! Raises an exception if the index is out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B D), Index = 3, T = C
+ //! after
+ //! me = (A B C D )
void InsertBefore (const Standard_Integer Index, const IntPatch_TheSegmentOfTheSOnBounds& T);
+ //! Inserts the sequence <S> in <me> before
+ //! the position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B F), Index = 3, S = (C D E)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertBefore (const Standard_Integer Index, IntPatch_SequenceOfSegmentOfTheSOnBounds& S);
+ //! Inserts <T> in <me> after the position <Index>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, T = D
+ //! after
+ //! me = (A B C D)
Standard_EXPORT void InsertAfter (const Standard_Integer Index, const IntPatch_TheSegmentOfTheSOnBounds& T);
+ //! Inserts the sequence <S> in <me> after the
+ //! position <Index>. <S> is cleared.
+ //! Raises an exception if the index is out of bound.
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3, S = (D E F)
+ //! after
+ //! me = (A B C D E F)
+ //! S = ()
void InsertAfter (const Standard_Integer Index, IntPatch_SequenceOfSegmentOfTheSOnBounds& S);
+ //! Returns the first element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns A
Standard_EXPORT const IntPatch_TheSegmentOfTheSOnBounds& First() const;
+ //! Returns the last element of the sequence <me>
+ //! Raises an exception if the sequence is empty.
+ //! Example:
+ //! before
+ //! me = (A B C)
+ //! after
+ //! me = (A B C)
+ //! returns C
Standard_EXPORT const IntPatch_TheSegmentOfTheSOnBounds& Last() const;
+ //! Keeps in <me> the items 1 to <Index>-1 and
+ //! puts in <Sub> the items <Index> to the end.
+ //! Example:
+ //! before
+ //! me = (A B C D) ,Index = 3
+ //! after
+ //! me = (A B)
+ //! Sub = (C D)
void Split (const Standard_Integer Index, IntPatch_SequenceOfSegmentOfTheSOnBounds& Sub);
+ //! Returns the Item at position <Index> in <me>.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT const IntPatch_TheSegmentOfTheSOnBounds& Value (const Standard_Integer Index) const;
const IntPatch_TheSegmentOfTheSOnBounds& operator() (const Standard_Integer Index) const
{
return Value(Index);
}
+ //! Changes the item at position <Index>
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1, Item = D
+ //! after
+ //! me = (D B C)
Standard_EXPORT void SetValue (const Standard_Integer Index, const IntPatch_TheSegmentOfTheSOnBounds& I);
+ //! Returns the Item at position <Index> in
+ //! <me>. This method may be used to modify
+ //! <me> : S.Value(Index) = Item.
+ //! Raises an exception if the index is out of bound
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 1
+ //! after
+ //! me = (A B C)
+ //! returns
+ //! A
Standard_EXPORT IntPatch_TheSegmentOfTheSOnBounds& ChangeValue (const Standard_Integer Index);
IntPatch_TheSegmentOfTheSOnBounds& operator() (const Standard_Integer Index)
{
return ChangeValue(Index);
}
+ //! Removes from <me> the item at position <Index>.
+ //! Raises an exception if the index is out of bounds
+ //! Example:
+ //! before
+ //! me = (A B C), Index = 3
+ //! after
+ //! me = (A B)
Standard_EXPORT void Remove (const Standard_Integer Index);
+ //! Removes from <me> all the items of
+ //! positions between <FromIndex> and <ToIndex>.
+ //! Raises an exception if the indices are out of bounds.
+ //! Example:
+ //! before
+ //! me = (A B C D E F), FromIndex = 1 ToIndex = 3
+ //! after
+ //! me = (D E F)
Standard_EXPORT void Remove (const Standard_Integer FromIndex, const Standard_Integer ToIndex);
Standard_EXPORT IntPatch_TheIWLineOfTheIWalking(const IntSurf_Allocator& theAllocator = 0);
+ //! reverse the points in the line. Hasfirst, HasLast are kept.
Standard_EXPORT void Reverse();
+ //! Cut the line at the point of rank Index.
void Cut (const Standard_Integer Index);
+ //! Add a point in the line.
void AddPoint (const IntSurf_PntOn2S& P);
void AddStatusFirst (const Standard_Boolean Closed, const Standard_Boolean HasFirst);
void AddStatusLast (const Standard_Boolean HasLast, const Standard_Integer Index, const IntSurf_PathPoint& P);
+ //! associer a l 'indice du point sur la ligne l'indice du point
+ //! passant dans l'iterateur de depart
void AddIndexPassing (const Standard_Integer Index);
void SetTangentVector (const gp_Vec& V, const Standard_Integer Index);
void SetTangencyAtEnd (const Standard_Boolean IsTangent);
+ //! Returns the number of points of the line (including first
+ //! point and end point : see HasLastPoint and HasFirstPoint).
Standard_Integer NbPoints() const;
+ //! Returns the point of range Index.
+ //! If index <= 0 or Index > NbPoints, an exception is raised.
const IntSurf_PntOn2S& Value (const Standard_Integer Index) const;
+ //! Returns the LineOn2S contained in the walking line.
const Handle(IntSurf_LineOn2S)& Line() const;
+ //! Returns True if the line is closed.
Standard_Boolean IsClosed() const;
+ //! Returns True if the first point of the line is a
+ //! marching point . when is HasFirstPoint==False ,the line
+ //! begins on the natural bound of the surface.the line can be
+ //! too long
Standard_Boolean HasFirstPoint() const;
+ //! Returns True if the end point of the line is a
+ //! marching point (Point from IntWS).
+ //! when is HasFirstPoint==False ,the line ends
+ //! on the natural bound of the surface.the line can be
+ //! too long.
Standard_Boolean HasLastPoint() const;
+ //! Returns the first point of the line when it is a
+ //! marching point.
+ //! An exception is raised if HasFirstPoint returns False.
const IntSurf_PathPoint& FirstPoint() const;
+ //! Returns the Index of first point of the line when it is a
+ //! marching point.This index is the index in the
+ //! PointStartIterator.
+ //! An exception is raised if HasFirstPoint returns False.
Standard_Integer FirstPointIndex() const;
+ //! Returns the last point of the line when it is a
+ //! marching point.
+ //! An exception is raised if HasLastPoint returns False.
const IntSurf_PathPoint& LastPoint() const;
+ //! Returns the index of last point of the line when it is a
+ //! marching point.This index is the index in the
+ //! PointStartIterator.
+ //! An exception is raised if HasLastPoint returns False.
Standard_Integer LastPointIndex() const;
+ //! returns the number of points belonging to Pnts1 which are
+ //! passing point.
Standard_Integer NbPassingPoint() const;
+ //! returns the index of the point belonging to the line which
+ //! is associated to the passing point belonging to Pnts1
+ //! an exception is raised if Index > NbPassingPoint()
void PassingPoint (const Standard_Integer Index, Standard_Integer& IndexLine, Standard_Integer& IndexPnts) const;
const gp_Vec& TangentVector (Standard_Integer& Index) const;
DEFINE_STANDARD_ALLOC
+ //! Deflection is the maximum deflection admitted between two
+ //! consecutive points on a resulting polyline.
+ //! Step is the maximum increment admitted between two
+ //! consecutive points (in 2d space).
+ //! Epsilon is the tolerance beyond which 2 points
+ //! are confused.
Standard_EXPORT IntPatch_TheIWalking(const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Step);
+ //! Deflection is the maximum deflection admitted between two
+ //! consecutive points on a resulting polyline.
+ //! Step is the maximum increment admitted between two
+ //! consecutive points (in 2d space).
+ //! Epsilon is the tolerance beyond which 2 points
+ //! are confused
void SetTolerance (const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Step);
+ //! Searches a set of polylines starting on a point of Pnts1
+ //! or Pnts2.
+ //! Each point on a resulting polyline verifies F(u,v)=0
Standard_EXPORT void Perform (const IntSurf_SequenceOfPathPoint& Pnts1, const IntSurf_SequenceOfInteriorPoint& Pnts2, IntPatch_TheSurfFunction& Func, const Handle(Adaptor3d_HSurface)& S, const Standard_Boolean Reversed = Standard_False);
+ //! Searches a set of polylines starting on a point of Pnts1.
+ //! Each point on a resulting polyline verifies F(u,v)=0
Standard_EXPORT void Perform (const IntSurf_SequenceOfPathPoint& Pnts1, IntPatch_TheSurfFunction& Func, const Handle(Adaptor3d_HSurface)& S, const Standard_Boolean Reversed = Standard_False);
+ //! Returns true if the calculus was successful.
Standard_Boolean IsDone() const;
+ //! Returns the number of resulting polylines.
+ //! An exception is raised if IsDone returns False.
Standard_Integer NbLines() const;
+ //! Returns the polyline of range Index.
+ //! An exception is raised if IsDone is False.
+ //! An exception is raised if Index<=0 or Index>NbLines.
const Handle(IntPatch_TheIWLineOfTheIWalking)& Value (const Standard_Integer Index) const;
+ //! Returns the number of points belonging to Pnts on which no
+ //! line starts or ends.
+ //! An exception is raised if IsDone returns False.
Standard_Integer NbSinglePnts() const;
+ //! Returns the point of range Index .
+ //! An exception is raised if IsDone returns False.
+ //! An exception is raised if Index<=0 or
+ //! Index > NbSinglePnts.
const IntSurf_PathPoint& SinglePnt (const Standard_Integer Index) const;
Standard_EXPORT void MakeWalkingPoint (const Standard_Integer Case, const Standard_Real U, const Standard_Real V, IntPatch_TheSurfFunction& Section, IntSurf_PntOn2S& Psol);
+ //! Clears up internal containers
Standard_EXPORT void Clear();
DEFINE_STANDARD_ALLOC
+ //! Empty constructor.
Standard_EXPORT IntPatch_TheSOnBounds();
+ //! Algorithm to find the points and parts of curves of Domain
+ //! (domain of of restriction of a surface) which verify
+ //! F = 0.
+ //! TolBoundary defines if a curve is on Q.
+ //! TolTangency defines if a point is on Q.
Standard_EXPORT void Perform (IntPatch_ArcFunction& F, const Handle(Adaptor3d_TopolTool)& Domain, const Standard_Real TolBoundary, const Standard_Real TolTangency, const Standard_Boolean RecheckOnRegularity = Standard_False);
+ //! Returns True if the calculus was successful.
Standard_Boolean IsDone() const;
+ //! Returns true if all arc of the Arcs are solution (inside
+ //! the surface).
+ //! An exception is raised if IsDone returns False.
Standard_Boolean AllArcSolution() const;
+ //! Returns the number of resulting points.
+ //! An exception is raised if IsDone returns False (NotDone).
Standard_Integer NbPoints() const;
+ //! Returns the resulting point of range Index.
+ //! The exception NotDone is raised if IsDone() returns
+ //! False.
+ //! The exception OutOfRange is raised if
+ //! Index <= 0 or Index > NbPoints.
const IntPatch_ThePathPointOfTheSOnBounds& Point (const Standard_Integer Index) const;
+ //! Returns the number of the resulting segments.
+ //! An exception is raised if IsDone returns False (NotDone).
Standard_Integer NbSegments() const;
+ //! Returns the resulting segment of range Index.
+ //! The exception NotDone is raised if IsDone() returns
+ //! False.
+ //! The exception OutOfRange is raised if
+ //! Index <= 0 or Index > NbPoints.
const IntPatch_TheSegmentOfTheSOnBounds& Segment (const Standard_Integer Index) const;
Standard_Boolean IsDone() const;
+ //! Returns the number of points.
+ //! The exception NotDone if raised if IsDone
+ //! returns False.
Standard_Integer NbPoints() const;
+ //! Returns the point of range Index.
+ //! The exception NotDone if raised if IsDone
+ //! returns False.
+ //! The exception OutOfRange if raised if
+ //! Index <= 0 or Index > NbPoints.
const IntSurf_InteriorPoint& Value (const Standard_Integer Index) const;
DEFINE_STANDARD_ALLOC
+ //! Empty constructor.
Standard_EXPORT IntPatch_TheSegmentOfTheSOnBounds();
+ //! Defines the concerned arc.
void SetValue (const Handle(Adaptor2d_HCurve2d)& A);
+ //! Defines the first point or the last point,
+ //! depending on the value of the boolean First.
Standard_EXPORT void SetLimitPoint (const IntPatch_ThePathPointOfTheSOnBounds& V, const Standard_Boolean First);
+ //! Returns the geometric curve on the surface 's domain
+ //! which is solution.
const Handle(Adaptor2d_HCurve2d)& Curve() const;
+ //! Returns True if there is a vertex (ThePathPoint) defining
+ //! the lowest valid parameter on the arc.
Standard_Boolean HasFirstPoint() const;
+ //! Returns the first point.
const IntPatch_ThePathPointOfTheSOnBounds& FirstPoint() const;
+ //! Returns True if there is a vertex (ThePathPoint) defining
+ //! the greatest valid parameter on the arc.
Standard_Boolean HasLastPoint() const;
+ //! Returns the last point.
const IntPatch_ThePathPointOfTheSOnBounds& LastPoint() const;
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;
DEFINE_STANDARD_ALLOC
+
+ //! Creates an array of given Length.
Standard_EXPORT IntTools_CArray1OfInteger(const Standard_Integer Length = 0);
+
+ //! Creates an array sharing datas with an other.
+ //! Example:
+ //! Item tab[100];
+ //! CArray1OfItem thetab (tab[0],100);
+ //!
+ //! CArray1OfItem aArray1(100);
+ //! CArray1OfItem anSharedArray1(aArray1.ChangeValue(0),aArray1.Length());
+ //!
+ //! Warning:
+ //! The validity of length are under the responsability
+ //! of the user.
+ //! The sahred array must have a valid address during the life of
+ //! the Array1.
Standard_EXPORT IntTools_CArray1OfInteger(const Standard_Integer& Item, const Standard_Integer Length);
+
+ //! Initializes the array with a given value.
Standard_EXPORT void Init (const Standard_Integer& V);
+
+ //! destroy current content and realloc the new size
+ //! does nothing if Length() == theLength
Standard_EXPORT void Resize (const Standard_Integer theNewLength);
+
+ //! Frees the allocated area corresponding to the
+ //! array.
Standard_EXPORT void Destroy();
~IntTools_CArray1OfInteger()
{
Destroy();
}
+
+ //! Returns the number of elements of <me>.
Standard_Integer Length() const;
Standard_EXPORT void Append (const Standard_Integer& Value);
+
+ //! Sets the <Index>th element of the array to
+ //! <Value>.
Standard_EXPORT void SetValue (const Standard_Integer Index, const Standard_Integer& Value);
+
+ //! Returns the value of the <Index>th element of the
+ //! array.
Standard_EXPORT const Standard_Integer& Value (const Standard_Integer Index) const;
const Standard_Integer& operator () (const Standard_Integer Index) const
{
return Value(Index);
}
+
+ //! Returns the value of the <Index>th element of the
+ //! array.
Standard_EXPORT Standard_Integer& ChangeValue (const Standard_Integer Index);
Standard_Integer& operator () (const Standard_Integer Index)
{
return ChangeValue(Index);
}
+
+ //! Applys the == operator on each array item
Standard_EXPORT Standard_Boolean IsEqual (const IntTools_CArray1OfInteger& Other) const;
Standard_Boolean operator == (const IntTools_CArray1OfInteger& Other) const
{
private:
+
+ //! Prohibits the creator by copy
Standard_EXPORT IntTools_CArray1OfInteger(const IntTools_CArray1OfInteger& AnArray);
DEFINE_STANDARD_ALLOC
+
+ //! Creates an array of given Length.
Standard_EXPORT IntTools_CArray1OfReal(const Standard_Integer Length = 0);
+
+ //! Creates an array sharing datas with an other.
+ //! Example:
+ //! Item tab[100];
+ //! CArray1OfItem thetab (tab[0],100);
+ //!
+ //! CArray1OfItem aArray1(100);
+ //! CArray1OfItem anSharedArray1(aArray1.ChangeValue(0),aArray1.Length());
+ //!
+ //! Warning:
+ //! The validity of length are under the responsability
+ //! of the user.
+ //! The sahred array must have a valid address during the life of
+ //! the Array1.
Standard_EXPORT IntTools_CArray1OfReal(const Standard_Real& Item, const Standard_Integer Length);
+
+ //! Initializes the array with a given value.
Standard_EXPORT void Init (const Standard_Real& V);
+
+ //! destroy current content and realloc the new size
+ //! does nothing if Length() == theLength
Standard_EXPORT void Resize (const Standard_Integer theNewLength);
+
+ //! Frees the allocated area corresponding to the
+ //! array.
Standard_EXPORT void Destroy();
~IntTools_CArray1OfReal()
{
Destroy();
}
+
+ //! Returns the number of elements of <me>.
Standard_Integer Length() const;
Standard_EXPORT void Append (const Standard_Real& Value);
+
+ //! Sets the <Index>th element of the array to
+ //! <Value>.
Standard_EXPORT void SetValue (const Standard_Integer Index, const Standard_Real& Value);
+
+ //! Returns the value of the <Index>th element of the
+ //! array.
Standard_EXPORT const Standard_Real& Value (const Standard_Integer Index) const;
const Standard_Real& operator () (const Standard_Integer Index) const
{
return Value(Index);
}
+
+ //! Returns the value of the <Index>th element of the
+ //! array.
Standard_EXPORT Standard_Real& ChangeValue (const Standard_Integer Index);
Standard_Real& operator () (const Standard_Integer Index)
{
return ChangeValue(Index);
}
+
+ //! Applys the == operator on each array item
Standard_EXPORT Standard_Boolean IsEqual (const IntTools_CArray1OfReal& Other) const;
Standard_Boolean operator == (const IntTools_CArray1OfReal& Other) const
{
private:
+
+ //! Prohibits the creator by copy
Standard_EXPORT IntTools_CArray1OfReal(const IntTools_CArray1OfReal& AnArray);
DEFINE_STANDARD_ALLOC
+ //! Raises Construction Error
Standard_EXPORT IntWalk_TheFunctionOfTheInt2S();
Standard_EXPORT IntWalk_TheFunctionOfTheInt2S(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2);
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;
DEFINE_STANDARD_ALLOC
+ //! Raises Construction Error
Standard_EXPORT IntWalk_TheInt2S();
+ //! compute the solution point with the close point
Standard_EXPORT IntWalk_TheInt2S(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 IntWalk_TheInt2S(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
IntWalk_TheFunctionOfTheInt2S& Function();
+ //! return the intersection point which is
+ //! enable for changing.
IntSurf_PntOn2S& ChangePoint();
DEFINE_STANDARD_ALLOC
+ //! Adds a couple (Module-Protocol) into the global definition set
+ //! for this class of Library.
Standard_EXPORT static void SetGlobal (const Handle(Interface_GeneralModule)& amodule, const Handle(Interface_Protocol)& aprotocol);
+ //! Creates a Library which complies with a Protocol, that is :
+ //! Same class (criterium IsInstance)
+ //! This creation gets the Modules from the global set, those
+ //! which are bound to the given Protocol and its Resources
Standard_EXPORT Interface_GeneralLib(const Handle(Interface_Protocol)& aprotocol);
+ //! Creates an empty Library : it will later by filled by method
+ //! AddProtocol
Standard_EXPORT Interface_GeneralLib();
+ //! Adds a couple (Module-Protocol) to the Library, given the
+ //! class of a Protocol. Takes Resources into account.
+ //! (if <aprotocol> is not of type TheProtocol, it is not added)
Standard_EXPORT void AddProtocol (const Handle(Standard_Transient)& aprotocol);
+ //! Clears the list of Modules of a library (can be used to
+ //! redefine the order of Modules before action : Clear then
+ //! refill the Library by calls to AddProtocol)
Standard_EXPORT void Clear();
+ //! Sets a library to be defined with the complete Global list
+ //! (all the couples Protocol/Modules recorded in it)
Standard_EXPORT void SetComplete();
+ //! Selects a Module from the Library, given an Object.
+ //! Returns True if Select has succeeded, False else.
+ //! Also Returns (as arguments) the selected Module and the Case
+ //! Number determined by the associated Protocol.
+ //! If Select has failed, <module> is Null Handle and CN is zero.
+ //! (Select can work on any criterium, such as Object DynamicType)
Standard_EXPORT Standard_Boolean Select (const Handle(Standard_Transient)& obj, Handle(Interface_GeneralModule)& module, Standard_Integer& CN) const;
+ //! Starts Iteration on the Modules (sets it on the first one)
Standard_EXPORT void Start();
+ //! Returns True if there are more Modules to iterate on
Standard_EXPORT Standard_Boolean More() const;
+ //! Iterates by getting the next Module in the list
+ //! If there is none, the exception will be raised by Value
Standard_EXPORT void Next();
+ //! Returns the current Module in the Iteration
Standard_EXPORT const Handle(Interface_GeneralModule)& Module() const;
+ //! Returns the current Protocol in the Iteration
Standard_EXPORT const Handle(Interface_Protocol)& Protocol() const;
public:
+ //! Creates an empty GlobalNode, with no Next
Standard_EXPORT Interface_GlobalNodeOfGeneralLib();
+ //! Adds a Module bound with a Protocol to the list : does
+ //! nothing if already in the list, THAT IS, Same Type (exact
+ //! match) and Same State (that is, IsEqual is not required)
+ //! Once added, stores its attached Protocol in correspondance
Standard_EXPORT void Add (const Handle(Interface_GeneralModule)& amodule, const Handle(Interface_Protocol)& aprotocol);
+ //! Returns the Module stored in a given GlobalNode
Standard_EXPORT const Handle(Interface_GeneralModule)& Module() const;
+ //! Returns the attached Protocol stored in a given GlobalNode
Standard_EXPORT const Handle(Interface_Protocol)& Protocol() const;
+ //! Returns the Next GlobalNode. If none is defined, returned
+ //! value is a Null Handle
Standard_EXPORT const Handle(Interface_GlobalNodeOfGeneralLib)& Next() const;
public:
+ //! Creates an empty GlobalNode, with no Next
Standard_EXPORT Interface_GlobalNodeOfReaderLib();
+ //! Adds a Module bound with a Protocol to the list : does
+ //! nothing if already in the list, THAT IS, Same Type (exact
+ //! match) and Same State (that is, IsEqual is not required)
+ //! Once added, stores its attached Protocol in correspondance
Standard_EXPORT void Add (const Handle(Interface_ReaderModule)& amodule, const Handle(Interface_Protocol)& aprotocol);
+ //! Returns the Module stored in a given GlobalNode
Standard_EXPORT const Handle(Interface_ReaderModule)& Module() const;
+ //! Returns the attached Protocol stored in a given GlobalNode
Standard_EXPORT const Handle(Interface_Protocol)& Protocol() const;
+ //! Returns the Next GlobalNode. If none is defined, returned
+ //! value is a Null Handle
Standard_EXPORT const Handle(Interface_GlobalNodeOfReaderLib)& Next() const;
public:
+ //! Creates an empty Node, with no Next
Standard_EXPORT Interface_NodeOfGeneralLib();
+ //! Adds a couple (Module,Protocol), that is, stores it into
+ //! itself if not yet done, else creates a Next Node to do it
Standard_EXPORT void AddNode (const Handle(Interface_GlobalNodeOfGeneralLib)& anode);
+ //! Returns the Module designated by a precise Node
Standard_EXPORT const Handle(Interface_GeneralModule)& Module() const;
+ //! Returns the Protocol designated by a precise Node
Standard_EXPORT const Handle(Interface_Protocol)& Protocol() const;
+ //! Returns the Next Node. If none was defined, returned value
+ //! is a Null Handle
Standard_EXPORT const Handle(Interface_NodeOfGeneralLib)& Next() const;
public:
+ //! Creates an empty Node, with no Next
Standard_EXPORT Interface_NodeOfReaderLib();
+ //! Adds a couple (Module,Protocol), that is, stores it into
+ //! itself if not yet done, else creates a Next Node to do it
Standard_EXPORT void AddNode (const Handle(Interface_GlobalNodeOfReaderLib)& anode);
+ //! Returns the Module designated by a precise Node
Standard_EXPORT const Handle(Interface_ReaderModule)& Module() const;
+ //! Returns the Protocol designated by a precise Node
Standard_EXPORT const Handle(Interface_Protocol)& Protocol() const;
+ //! Returns the Next Node. If none was defined, returned value
+ //! is a Null Handle
Standard_EXPORT const Handle(Interface_NodeOfReaderLib)& Next() const;
DEFINE_STANDARD_ALLOC
+ //! Adds a couple (Module-Protocol) into the global definition set
+ //! for this class of Library.
Standard_EXPORT static void SetGlobal (const Handle(Interface_ReaderModule)& amodule, const Handle(Interface_Protocol)& aprotocol);
+ //! Creates a Library which complies with a Protocol, that is :
+ //! Same class (criterium IsInstance)
+ //! This creation gets the Modules from the global set, those
+ //! which are bound to the given Protocol and its Resources
Standard_EXPORT Interface_ReaderLib(const Handle(Interface_Protocol)& aprotocol);
+ //! Creates an empty Library : it will later by filled by method
+ //! AddProtocol
Standard_EXPORT Interface_ReaderLib();
+ //! Adds a couple (Module-Protocol) to the Library, given the
+ //! class of a Protocol. Takes Resources into account.
+ //! (if <aprotocol> is not of type TheProtocol, it is not added)
Standard_EXPORT void AddProtocol (const Handle(Standard_Transient)& aprotocol);
+ //! Clears the list of Modules of a library (can be used to
+ //! redefine the order of Modules before action : Clear then
+ //! refill the Library by calls to AddProtocol)
Standard_EXPORT void Clear();
+ //! Sets a library to be defined with the complete Global list
+ //! (all the couples Protocol/Modules recorded in it)
Standard_EXPORT void SetComplete();
+ //! Selects a Module from the Library, given an Object.
+ //! Returns True if Select has succeeded, False else.
+ //! Also Returns (as arguments) the selected Module and the Case
+ //! Number determined by the associated Protocol.
+ //! If Select has failed, <module> is Null Handle and CN is zero.
+ //! (Select can work on any criterium, such as Object DynamicType)
Standard_EXPORT Standard_Boolean Select (const Handle(Standard_Transient)& obj, Handle(Interface_ReaderModule)& module, Standard_Integer& CN) const;
+ //! Starts Iteration on the Modules (sets it on the first one)
Standard_EXPORT void Start();
+ //! Returns True if there are more Modules to iterate on
Standard_EXPORT Standard_Boolean More() const;
+ //! Iterates by getting the next Module in the list
+ //! If there is none, the exception will be raised by Value
Standard_EXPORT void Next();
+ //! Returns the current Module in the Iteration
Standard_EXPORT const Handle(Interface_ReaderModule)& Module() const;
+ //! Returns the current Protocol in the Iteration
Standard_EXPORT const Handle(Interface_Protocol)& Protocol() const;
DEFINE_STANDARD_ALLOC
+ //! Initializes the local properties of the curve <C>
+ //! The current point and the derivatives are
+ //! computed at the same time, which allows an
+ //! optimization of the computation time.
+ //! <N> indicates the maximum number of derivations to
+ //! be done (0, 1, 2 or 3). For example, to compute
+ //! only the tangent, N should be equal to 1.
+ //! <Resolution> is the linear tolerance (it is used to test
+ //! if a vector is null).
Standard_EXPORT LProp3d_CLProps(const Handle(Adaptor3d_HCurve)& C, const Standard_Integer N, const Standard_Real Resolution);
+ //! Same as previous constructor but here the parameter is
+ //! set to the value <U>.
+ //! All the computations done will be related to <C> and <U>.
Standard_EXPORT LProp3d_CLProps(const Handle(Adaptor3d_HCurve)& C, const Standard_Real U, const Standard_Integer N, const Standard_Real Resolution);
+ //! Same as previous constructor but here the parameter is
+ //! set to the value <U> and the curve is set
+ //! with SetCurve.
+ //! the curve can have a empty constructor
+ //! All the computations done will be related to <C> and <U>
+ //! when the functions "set" will be done.
Standard_EXPORT LProp3d_CLProps(const Standard_Integer N, const Standard_Real Resolution);
+ //! Initializes the local properties of the curve
+ //! for the parameter value <U>.
Standard_EXPORT void SetParameter (const Standard_Real U);
+ //! Initializes the local properties of the curve
+ //! for the new curve.
Standard_EXPORT void SetCurve (const Handle(Adaptor3d_HCurve)& C);
+ //! Returns the Point.
Standard_EXPORT const gp_Pnt& Value() const;
+ //! Returns the first derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& D1();
+ //! Returns the second derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& D2();
+ //! Returns the third derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& D3();
+ //! Returns True if the tangent is defined.
+ //! For example, the tangent is not defined if the
+ //! three first derivatives are all null.
Standard_EXPORT Standard_Boolean IsTangentDefined();
+ //! output the tangent direction <D>
Standard_EXPORT void Tangent (gp_Dir& D);
+ //! Returns the curvature.
Standard_EXPORT Standard_Real Curvature();
+ //! Returns the normal direction <N>.
Standard_EXPORT void Normal (gp_Dir& N);
+ //! Returns the centre of curvature <P>.
Standard_EXPORT void CentreOfCurvature (gp_Pnt& P);
DEFINE_STANDARD_ALLOC
+ //! Initializes the local properties of the surface <S>
+ //! for the parameter values (<U>, <V>).
+ //! The current point and the derivatives are
+ //! computed at the same time, which allows an
+ //! optimization of the computation time.
+ //! <N> indicates the maximum number of derivations to
+ //! be done (0, 1, or 2). For example, to compute
+ //! only the tangent, N should be equal to 1.
+ //! <Resolution> is the linear tolerance (it is used to test
+ //! if a vector is null).
Standard_EXPORT LProp3d_SLProps(const Handle(Adaptor3d_HSurface)& S, const Standard_Real U, const Standard_Real V, const Standard_Integer N, const Standard_Real Resolution);
+ //! idem as previous constructor but without setting the value
+ //! of parameters <U> and <V>.
Standard_EXPORT LProp3d_SLProps(const Handle(Adaptor3d_HSurface)& S, const Standard_Integer N, const Standard_Real Resolution);
+ //! idem as previous constructor but without setting the value
+ //! of parameters <U> and <V> and the surface.
+ //! the surface can have an empty constructor.
Standard_EXPORT LProp3d_SLProps(const Standard_Integer N, const Standard_Real Resolution);
+ //! Initializes the local properties of the surface S
+ //! for the new surface.
Standard_EXPORT void SetSurface (const Handle(Adaptor3d_HSurface)& S);
+ //! Initializes the local properties of the surface S
+ //! for the new parameter values (<U>, <V>).
Standard_EXPORT void SetParameters (const Standard_Real U, const Standard_Real V);
+ //! Returns the point.
Standard_EXPORT const gp_Pnt& Value() const;
+ //! Returns the first U derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& D1U();
+ //! Returns the first V derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& D1V();
+ //! Returns the second U derivatives
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& D2U();
+ //! Returns the second V derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& D2V();
+ //! Returns the second UV cross-derivative.
+ //! The derivative is computed if it has not been yet.
Standard_EXPORT const gp_Vec& DUV();
+ //! returns True if the U tangent is defined.
+ //! For example, the tangent is not defined if the
+ //! two first U derivatives are null.
Standard_EXPORT Standard_Boolean IsTangentUDefined();
+ //! Returns the tangent direction <D> on the iso-V.
Standard_EXPORT void TangentU (gp_Dir& D);
+ //! returns if the V tangent is defined.
+ //! For example, the tangent is not defined if the
+ //! two first V derivatives are null.
Standard_EXPORT Standard_Boolean IsTangentVDefined();
+ //! Returns the tangent direction <D> on the iso-V.
Standard_EXPORT void TangentV (gp_Dir& D);
+ //! Tells if the normal is defined.
Standard_EXPORT Standard_Boolean IsNormalDefined();
+ //! Returns the normal direction.
Standard_EXPORT const gp_Dir& Normal();
+ //! returns True if the curvature is defined.
Standard_EXPORT Standard_Boolean IsCurvatureDefined();
+ //! returns True if the point is umbilic (i.e. if the
+ //! curvature is constant).
Standard_EXPORT Standard_Boolean IsUmbilic();
+ //! Returns the maximum curvature
Standard_EXPORT Standard_Real MaxCurvature();
+ //! Returns the minimum curvature
Standard_EXPORT Standard_Real MinCurvature();
+ //! Returns the direction of the maximum and minimum curvature
+ //! <MaxD> and <MinD>
Standard_EXPORT void CurvatureDirections (gp_Dir& MaxD, gp_Dir& MinD);
+ //! Returns the mean curvature.
Standard_EXPORT Standard_Real MeanCurvature();
+ //! Returns the Gaussian curvature
Standard_EXPORT Standard_Real GaussianCurvature();
public:
+ //! Creates an empty GenHCurve2d.
Standard_EXPORT ProjLib_HCompProjectedCurve();
+ //! Creates a GenHCurve2d from a Curve
Standard_EXPORT ProjLib_HCompProjectedCurve(const ProjLib_CompProjectedCurve& C);
+ //! Sets the field of the GenHCurve2d.
Standard_EXPORT void Set (const ProjLib_CompProjectedCurve& C);
+ //! Returns the curve used to create the GenHCurve2d.
+ //! This is redefined from HCurve2d, cannot be inline.
Standard_EXPORT const Adaptor2d_Curve2d& Curve2d() const;
+ //! Returns the curve used to create the GenHCurve.
ProjLib_CompProjectedCurve& ChangeCurve2d();
public:
+ //! Creates an empty GenHCurve2d.
Standard_EXPORT ProjLib_HProjectedCurve();
+ //! Creates a GenHCurve2d from a Curve
Standard_EXPORT ProjLib_HProjectedCurve(const ProjLib_ProjectedCurve& C);
+ //! Sets the field of the GenHCurve2d.
Standard_EXPORT void Set (const ProjLib_ProjectedCurve& C);
+ //! Returns the curve used to create the GenHCurve2d.
+ //! This is redefined from HCurve2d, cannot be inline.
Standard_EXPORT const Adaptor2d_Curve2d& Curve2d() const;
+ //! Returns the curve used to create the GenHCurve.
ProjLib_ProjectedCurve& ChangeCurve2d();
public:
+ //! Creates a Dictionary cell.
+ //! A Dictionary is always created then handled by its first cell
+ //! After creating a Dictionary, user can call methods HasItem,
+ //! Item, SetItem ... (internal cells and entries are also
+ //! defined as objects from the same class)
+ //! Also iteration can be made, by an Iterator on this Dictionary
Standard_EXPORT STEPCAFControl_DictionaryOfExternFile();
+ //! Returns True if an Item is bound to a Name in the Dictionnary
+ //! <exact> : if True, commands exact matching
+ //! if False, accept completion, only if ONE AND ONLY ONE
+ //! Dictionnary Entry has <name> as beginning of its name
Standard_EXPORT Standard_Boolean HasItem (const Standard_CString name, const Standard_Boolean exact = Standard_False) const;
+ //! Works as above method but accepts a String from TCollection
Standard_EXPORT Standard_Boolean HasItem (const TCollection_AsciiString& name, const Standard_Boolean exact = Standard_True) const;
+ //! Returns item bound to a name in the Dictionnary
+ //! <exact> : same as for HasItem
Standard_EXPORT const Handle(STEPCAFControl_ExternFile)& Item (const Standard_CString name, const Standard_Boolean exact = Standard_True) const;
+ //! Works as above method but accepts a String from TCollection
Standard_EXPORT const Handle(STEPCAFControl_ExternFile)& Item (const TCollection_AsciiString& name, const Standard_Boolean exact = Standard_True) const;
+ //! Gathers HasItem and Item, in a less regular but faster way
+ //! If return is True, <anitem> is returned too, else it is not
+ //! <exact> : same as for HasItem
Standard_EXPORT Standard_Boolean GetItem (const Standard_CString name, Handle(STEPCAFControl_ExternFile)& anitem, const Standard_Boolean exact = Standard_True) const;
+ //! Works as above method but accepts a String from TCollection
Standard_EXPORT Standard_Boolean GetItem (const TCollection_AsciiString& name, Handle(STEPCAFControl_ExternFile)& anitem, const Standard_Boolean exact = Standard_True) const;
+ //! Binds an item to a dictionnary entry
+ //! If <name> is already known in the dictionary, its value
+ //! is changed. Else, the dictionary entry is created.
+ //! If <exact> is given False, completion is tried, it is accepted
+ //! If it gives a UNIQUE entry : hence this one will be modified
+ //! Else, new entry is created with the exact name given
Standard_EXPORT void SetItem (const Standard_CString name, const Handle(STEPCAFControl_ExternFile)& anitem, const Standard_Boolean exact = Standard_True);
+ //! Works as above method but accepts a String from TCollection
Standard_EXPORT void SetItem (const TCollection_AsciiString& name, const Handle(STEPCAFControl_ExternFile)& anitem, const Standard_Boolean exact = Standard_True);
+ //! Returns the Item AS AN ADDRESS which corresponds to a Name,
+ //! in order to be changed or set.
+ //! If this name is not yet recorded, the Dictionary creates it.
+ //! <isvalued> is returned True if the Item is recorded in the
+ //! Dictionary, False else, in that case the Item is reserved and
+ //! the name is noted as beeing valued now.
Standard_EXPORT Handle(STEPCAFControl_ExternFile)& NewItem (const Standard_CString name, Standard_Boolean& isvalued, const Standard_Boolean exact = Standard_True);
+ //! Works as above method but accepts a String from TCollection
Standard_EXPORT Handle(STEPCAFControl_ExternFile)& NewItem (const TCollection_AsciiString& name, Standard_Boolean& isvalued, const Standard_Boolean exact = Standard_True);
+ //! Removes a dictionary entry given by its name then Returns True
+ //! If the entry does not exists, Does nothing then Returns False
+ //! <exact> : as for HasItem, if completion works, the found entry
+ //! is removed (else returned value is False)
+ //! <cln> commands cleaning dictionary (to recover memory space)
+ //! For an isolated call, it is recommanded to give it at True
+ //! For a sequence of calls, rather give False, then call Clean
Standard_EXPORT Standard_Boolean RemoveItem (const Standard_CString name, const Standard_Boolean cln = Standard_True, const Standard_Boolean exact = Standard_True);
+ //! Works as above method but accepts a String from TCollection
Standard_EXPORT Standard_Boolean RemoveItem (const TCollection_AsciiString& name, const Standard_Boolean cln = Standard_True, const Standard_Boolean exact = Standard_True);
+ //! Deletes physically in one step the entries which were removed
+ //! (can be used for a more efficient Memory Management : first
+ //! Remove several Items (<cln> = False), then Clean the Memory)
Standard_EXPORT void Clean();
+ //! Returns True if no Item is recorded
Standard_EXPORT Standard_Boolean IsEmpty() const;
+ //! Clears all the Dictionary : all recorded Items are removed
Standard_EXPORT void Clear();
+ //! Copies the Dictionary as a Tree, without Copying the Items
Standard_EXPORT Handle(STEPCAFControl_DictionaryOfExternFile) Copy() const;
+ //! Internal routine used for completion (returns True if success)
Standard_EXPORT Standard_Boolean Complete (Handle(STEPCAFControl_DictionaryOfExternFile)& acell) const;
private:
+ //! Defines cell's character (internal use, to build dict. tree)
Standard_EXPORT void SetChar (const Standard_Character car);
+ //! Returns True if this cell has a subcell
Standard_EXPORT Standard_Boolean HasSub() const;
+ //! Returns subcell
Standard_EXPORT Handle(STEPCAFControl_DictionaryOfExternFile) Sub() const;
+ //! Returns True if this cell has a next cell
Standard_EXPORT Standard_Boolean HasNext() const;
+ //! Returns next cell
Standard_EXPORT Handle(STEPCAFControl_DictionaryOfExternFile) Next() const;
+ //! Defines subcell
Standard_EXPORT void SetSub (const Handle(STEPCAFControl_DictionaryOfExternFile)& acell);
+ //! Defines next cell
Standard_EXPORT void SetNext (const Handle(STEPCAFControl_DictionaryOfExternFile)& acell);
+ //! Internal method used to get an entry from a given name
Standard_EXPORT void SearchCell (const Standard_CString name, const Standard_Size lmax, const Standard_Character car, const Standard_Size level, Handle(STEPCAFControl_DictionaryOfExternFile)& acell, Standard_Size& reslev, Standard_Integer& stat) const;
+ //! Internal method used to create a new entry for a name
Standard_EXPORT void NewCell (const Standard_CString name, const Standard_Size namlen, Handle(STEPCAFControl_DictionaryOfExternFile)& acell, const Standard_Size reslev, const Standard_Integer stat);
+ //! Returns True if a cell has an associated item value
Standard_EXPORT Standard_Boolean HasIt() const;
+ //! Returns item value associated to a cell
Standard_EXPORT const Handle(STEPCAFControl_ExternFile)& It() const;
+ //! Returns item address associated to a cell
Standard_EXPORT Handle(STEPCAFControl_ExternFile)& ItAdr();
+ //! Binds an item value to a cell
Standard_EXPORT void SetIt (const Handle(STEPCAFControl_ExternFile)& anitem);
+ //! Declares a cell as Valued : used by NewItem (when an Item
+ //! is created if it did not exist and is returned)
Standard_EXPORT void DeclIt();
+ //! Removes item bound to a cell (cancels effect of DeclIt)
Standard_EXPORT void RemoveIt();
+ //! Returns cell's character as a node feature
Standard_EXPORT Standard_Character CellChar() const;
+ //! Performs Copy from an original <fromcell> to <me>
+ //! Called by Copy
Standard_EXPORT void GetCopied (const Handle(STEPCAFControl_DictionaryOfExternFile)& fromcell);
Standard_Character thecars[4];
DEFINE_STANDARD_ALLOC
+ //! Creates an iterator which will work on all the dictionary
Standard_EXPORT STEPCAFControl_IteratorOfDictionaryOfExternFile(const Handle(STEPCAFControl_DictionaryOfExternFile)& acell);
+ //! Creates an iterator which will consider only entries
+ //! which name begin by the string given as basename (subpart)
Standard_EXPORT STEPCAFControl_IteratorOfDictionaryOfExternFile(const Handle(STEPCAFControl_DictionaryOfExternFile)& acell, const Standard_CString basename);
+ //! Creates an iterator which will consider only entries
+ //! which name begin by the string given as basename (subpart)
+ //! Same as above, but basename is String instead of CString
Standard_EXPORT STEPCAFControl_IteratorOfDictionaryOfExternFile(const Handle(STEPCAFControl_DictionaryOfExternFile)& acell, const TCollection_AsciiString& basename);
+ //! Allows to Start a new Iteration from beginning
Standard_EXPORT void Start();
+ //! Returns True if there are more entries to return
Standard_EXPORT Standard_Boolean More();
+ //! Go to the next entry
+ //! (if there is not, Value will raise an exception)
Standard_EXPORT void Next();
+ //! Returns item value of current entry
Standard_EXPORT const Handle(STEPCAFControl_ExternFile)& Value() const;
+ //! Returns name of current entry
Standard_EXPORT TCollection_AsciiString Name() const;
private:
+ //! Appends a new value to the Iteration Stack
Standard_EXPORT void AppendStack (const Handle(STEPCAFControl_DictionaryOfExternFile)& val);
public:
+ //! Creates a StackItem with no Previous one
Standard_EXPORT STEPCAFControl_StackItemOfDictionaryOfExternFile();
+ //! Creates a StackItem with a Previous one
Standard_EXPORT STEPCAFControl_StackItemOfDictionaryOfExternFile(const Handle(STEPCAFControl_StackItemOfDictionaryOfExternFile)& previous);
+ //! Returns the Previous Item (is Null if no Previous defined)
Standard_EXPORT Handle(STEPCAFControl_StackItemOfDictionaryOfExternFile) Previous() const;
+ //! Returns the Dictionary Cell corresponding to an Item
Standard_EXPORT Handle(STEPCAFControl_DictionaryOfExternFile) Value() const;
+ //! Sets a new Dictionary Cell as Value of an Item
Standard_EXPORT void SetValue (const Handle(STEPCAFControl_DictionaryOfExternFile)& cval);
public:
+ //! Creates a Dictionary cell.
+ //! A Dictionary is always created then handled by its first cell
+ //! After creating a Dictionary, user can call methods HasItem,
+ //! Item, SetItem ... (internal cells and entries are also
+ //! defined as objects from the same class)
+ //! Also iteration can be made, by an Iterator on this Dictionary
Standard_EXPORT ShapeProcess_DictionaryOfOperator();
+ //! Returns True if an Item is bound to a Name in the Dictionnary
+ //! <exact> : if True, commands exact matching
+ //! if False, accept completion, only if ONE AND ONLY ONE
+ //! Dictionnary Entry has <name> as beginning of its name
Standard_EXPORT Standard_Boolean HasItem (const Standard_CString name, const Standard_Boolean exact = Standard_False) const;
+ //! Works as above method but accepts a String from TCollection
Standard_EXPORT Standard_Boolean HasItem (const TCollection_AsciiString& name, const Standard_Boolean exact = Standard_True) const;
+ //! Returns item bound to a name in the Dictionnary
+ //! <exact> : same as for HasItem
Standard_EXPORT const Handle(ShapeProcess_Operator)& Item (const Standard_CString name, const Standard_Boolean exact = Standard_True) const;
+ //! Works as above method but accepts a String from TCollection
Standard_EXPORT const Handle(ShapeProcess_Operator)& Item (const TCollection_AsciiString& name, const Standard_Boolean exact = Standard_True) const;
+ //! Gathers HasItem and Item, in a less regular but faster way
+ //! If return is True, <anitem> is returned too, else it is not
+ //! <exact> : same as for HasItem
Standard_EXPORT Standard_Boolean GetItem (const Standard_CString name, Handle(ShapeProcess_Operator)& anitem, const Standard_Boolean exact = Standard_True) const;
+ //! Works as above method but accepts a String from TCollection
Standard_EXPORT Standard_Boolean GetItem (const TCollection_AsciiString& name, Handle(ShapeProcess_Operator)& anitem, const Standard_Boolean exact = Standard_True) const;
+ //! Binds an item to a dictionnary entry
+ //! If <name> is already known in the dictionary, its value
+ //! is changed. Else, the dictionary entry is created.
+ //! If <exact> is given False, completion is tried, it is accepted
+ //! If it gives a UNIQUE entry : hence this one will be modified
+ //! Else, new entry is created with the exact name given
Standard_EXPORT void SetItem (const Standard_CString name, const Handle(ShapeProcess_Operator)& anitem, const Standard_Boolean exact = Standard_True);
+ //! Works as above method but accepts a String from TCollection
Standard_EXPORT void SetItem (const TCollection_AsciiString& name, const Handle(ShapeProcess_Operator)& anitem, const Standard_Boolean exact = Standard_True);
+ //! Returns the Item AS AN ADDRESS which corresponds to a Name,
+ //! in order to be changed or set.
+ //! If this name is not yet recorded, the Dictionary creates it.
+ //! <isvalued> is returned True if the Item is recorded in the
+ //! Dictionary, False else, in that case the Item is reserved and
+ //! the name is noted as beeing valued now.
Standard_EXPORT Handle(ShapeProcess_Operator)& NewItem (const Standard_CString name, Standard_Boolean& isvalued, const Standard_Boolean exact = Standard_True);
+ //! Works as above method but accepts a String from TCollection
Standard_EXPORT Handle(ShapeProcess_Operator)& NewItem (const TCollection_AsciiString& name, Standard_Boolean& isvalued, const Standard_Boolean exact = Standard_True);
+ //! Removes a dictionary entry given by its name then Returns True
+ //! If the entry does not exists, Does nothing then Returns False
+ //! <exact> : as for HasItem, if completion works, the found entry
+ //! is removed (else returned value is False)
+ //! <cln> commands cleaning dictionary (to recover memory space)
+ //! For an isolated call, it is recommanded to give it at True
+ //! For a sequence of calls, rather give False, then call Clean
Standard_EXPORT Standard_Boolean RemoveItem (const Standard_CString name, const Standard_Boolean cln = Standard_True, const Standard_Boolean exact = Standard_True);
+ //! Works as above method but accepts a String from TCollection
Standard_EXPORT Standard_Boolean RemoveItem (const TCollection_AsciiString& name, const Standard_Boolean cln = Standard_True, const Standard_Boolean exact = Standard_True);
+ //! Deletes physically in one step the entries which were removed
+ //! (can be used for a more efficient Memory Management : first
+ //! Remove several Items (<cln> = False), then Clean the Memory)
Standard_EXPORT void Clean();
+ //! Returns True if no Item is recorded
Standard_EXPORT Standard_Boolean IsEmpty() const;
+ //! Clears all the Dictionary : all recorded Items are removed
Standard_EXPORT void Clear();
+ //! Copies the Dictionary as a Tree, without Copying the Items
Standard_EXPORT Handle(ShapeProcess_DictionaryOfOperator) Copy() const;
+ //! Internal routine used for completion (returns True if success)
Standard_EXPORT Standard_Boolean Complete (Handle(ShapeProcess_DictionaryOfOperator)& acell) const;
private:
+ //! Defines cell's character (internal use, to build dict. tree)
Standard_EXPORT void SetChar (const Standard_Character car);
+ //! Returns True if this cell has a subcell
Standard_EXPORT Standard_Boolean HasSub() const;
+ //! Returns subcell
Standard_EXPORT Handle(ShapeProcess_DictionaryOfOperator) Sub() const;
+ //! Returns True if this cell has a next cell
Standard_EXPORT Standard_Boolean HasNext() const;
+ //! Returns next cell
Standard_EXPORT Handle(ShapeProcess_DictionaryOfOperator) Next() const;
+ //! Defines subcell
Standard_EXPORT void SetSub (const Handle(ShapeProcess_DictionaryOfOperator)& acell);
+ //! Defines next cell
Standard_EXPORT void SetNext (const Handle(ShapeProcess_DictionaryOfOperator)& acell);
+ //! Internal method used to get an entry from a given name
Standard_EXPORT void SearchCell (const Standard_CString name, const Standard_Size lmax, const Standard_Character car, const Standard_Size level, Handle(ShapeProcess_DictionaryOfOperator)& acell, Standard_Size& reslev, Standard_Integer& stat) const;
+ //! Internal method used to create a new entry for a name
Standard_EXPORT void NewCell (const Standard_CString name, const Standard_Size namlen, Handle(ShapeProcess_DictionaryOfOperator)& acell, const Standard_Size reslev, const Standard_Integer stat);
+ //! Returns True if a cell has an associated item value
Standard_EXPORT Standard_Boolean HasIt() const;
+ //! Returns item value associated to a cell
Standard_EXPORT const Handle(ShapeProcess_Operator)& It() const;
+ //! Returns item address associated to a cell
Standard_EXPORT Handle(ShapeProcess_Operator)& ItAdr();
+ //! Binds an item value to a cell
Standard_EXPORT void SetIt (const Handle(ShapeProcess_Operator)& anitem);
+ //! Declares a cell as Valued : used by NewItem (when an Item
+ //! is created if it did not exist and is returned)
Standard_EXPORT void DeclIt();
+ //! Removes item bound to a cell (cancels effect of DeclIt)
Standard_EXPORT void RemoveIt();
+ //! Returns cell's character as a node feature
Standard_EXPORT Standard_Character CellChar() const;
+ //! Performs Copy from an original <fromcell> to <me>
+ //! Called by Copy
Standard_EXPORT void GetCopied (const Handle(ShapeProcess_DictionaryOfOperator)& fromcell);
Standard_Character thecars[4];
DEFINE_STANDARD_ALLOC
+ //! Creates an iterator which will work on all the dictionary
Standard_EXPORT ShapeProcess_IteratorOfDictionaryOfOperator(const Handle(ShapeProcess_DictionaryOfOperator)& acell);
+ //! Creates an iterator which will consider only entries
+ //! which name begin by the string given as basename (subpart)
Standard_EXPORT ShapeProcess_IteratorOfDictionaryOfOperator(const Handle(ShapeProcess_DictionaryOfOperator)& acell, const Standard_CString basename);
+ //! Creates an iterator which will consider only entries
+ //! which name begin by the string given as basename (subpart)
+ //! Same as above, but basename is String instead of CString
Standard_EXPORT ShapeProcess_IteratorOfDictionaryOfOperator(const Handle(ShapeProcess_DictionaryOfOperator)& acell, const TCollection_AsciiString& basename);
+ //! Allows to Start a new Iteration from beginning
Standard_EXPORT void Start();
+ //! Returns True if there are more entries to return
Standard_EXPORT Standard_Boolean More();
+ //! Go to the next entry
+ //! (if there is not, Value will raise an exception)
Standard_EXPORT void Next();
+ //! Returns item value of current entry
Standard_EXPORT const Handle(ShapeProcess_Operator)& Value() const;
+ //! Returns name of current entry
Standard_EXPORT TCollection_AsciiString Name() const;
private:
+ //! Appends a new value to the Iteration Stack
Standard_EXPORT void AppendStack (const Handle(ShapeProcess_DictionaryOfOperator)& val);
public:
+ //! Creates a StackItem with no Previous one
Standard_EXPORT ShapeProcess_StackItemOfDictionaryOfOperator();
+ //! Creates a StackItem with a Previous one
Standard_EXPORT ShapeProcess_StackItemOfDictionaryOfOperator(const Handle(ShapeProcess_StackItemOfDictionaryOfOperator)& previous);
+ //! Returns the Previous Item (is Null if no Previous defined)
Standard_EXPORT Handle(ShapeProcess_StackItemOfDictionaryOfOperator) Previous() const;
+ //! Returns the Dictionary Cell corresponding to an Item
Standard_EXPORT Handle(ShapeProcess_DictionaryOfOperator) Value() const;
+ //! Sets a new Dictionary Cell as Value of an Item
Standard_EXPORT void SetValue (const Handle(ShapeProcess_DictionaryOfOperator)& cval);
public:
+ //! Evaluates if recognition has a result, returns it if yes
+ //! In case of success, Returns True and puts result in "res"
+ //! In case of Failure, simply Returns False
+ //! Works by calling deferred method Eval, and in case of failure,
+ //! looks for Added Recognizers to work
Standard_EXPORT Standard_Boolean Evaluate (const TCollection_AsciiString& akey, Handle(Standard_Transient)& res);
+ //! Returns result of last recognition (call of Evaluate)
Standard_EXPORT Handle(Standard_Transient) Result() const;
+ //! Adds a new Recognizer to the Compound, at the end
+ //! Several calls to Add work by adding in the order of calls :
+ //! Hence, when Eval has failed to recognize, Evaluate will call
+ //! Evaluate from the first added Recognizer if there is one,
+ //! and to the second if there is still no result, and so on
Standard_EXPORT void Add (const Handle(StepData_FileRecognizer)& reco);
protected:
+ //! Assumes that no result has yet been recognized
Standard_EXPORT StepData_FileRecognizer();
+ //! Records the result of the recognition. Called by specific
+ //! method Eval to record a result : after calling it, Eval has
+ //! finished and can return
Standard_EXPORT void SetOK (const Handle(Standard_Transient)& aresult);
+ //! Records that recognition gives no result
Standard_EXPORT void SetKO();
+ //! THIS METHOD DEFINES THE RECOGNITION PROTOCOL, it is proper to
+ //! each precise type of Recognizer
+ //! For a suitable type of akey, it calls SetOK(result) where
+ //! result is an empty result of appropriate type, then returns
Standard_EXPORT virtual void Eval (const TCollection_AsciiString& akey) = 0;
public:
+ //! Creates an empty GlobalNode, with no Next
Standard_EXPORT StepData_GlobalNodeOfWriterLib();
+ //! Adds a Module bound with a Protocol to the list : does
+ //! nothing if already in the list, THAT IS, Same Type (exact
+ //! match) and Same State (that is, IsEqual is not required)
+ //! Once added, stores its attached Protocol in correspondance
Standard_EXPORT void Add (const Handle(StepData_ReadWriteModule)& amodule, const Handle(StepData_Protocol)& aprotocol);
+ //! Returns the Module stored in a given GlobalNode
Standard_EXPORT const Handle(StepData_ReadWriteModule)& Module() const;
+ //! Returns the attached Protocol stored in a given GlobalNode
Standard_EXPORT const Handle(StepData_Protocol)& Protocol() const;
+ //! Returns the Next GlobalNode. If none is defined, returned
+ //! value is a Null Handle
Standard_EXPORT const Handle(StepData_GlobalNodeOfWriterLib)& Next() const;
public:
+ //! Creates an empty Node, with no Next
Standard_EXPORT StepData_NodeOfWriterLib();
+ //! Adds a couple (Module,Protocol), that is, stores it into
+ //! itself if not yet done, else creates a Next Node to do it
Standard_EXPORT void AddNode (const Handle(StepData_GlobalNodeOfWriterLib)& anode);
+ //! Returns the Module designated by a precise Node
Standard_EXPORT const Handle(StepData_ReadWriteModule)& Module() const;
+ //! Returns the Protocol designated by a precise Node
Standard_EXPORT const Handle(StepData_Protocol)& Protocol() const;
+ //! Returns the Next Node. If none was defined, returned value
+ //! is a Null Handle
Standard_EXPORT const Handle(StepData_NodeOfWriterLib)& Next() const;
DEFINE_STANDARD_ALLOC
+ //! Adds a couple (Module-Protocol) into the global definition set
+ //! for this class of Library.
Standard_EXPORT static void SetGlobal (const Handle(StepData_ReadWriteModule)& amodule, const Handle(StepData_Protocol)& aprotocol);
+ //! Creates a Library which complies with a Protocol, that is :
+ //! Same class (criterium IsInstance)
+ //! This creation gets the Modules from the global set, those
+ //! which are bound to the given Protocol and its Resources
Standard_EXPORT StepData_WriterLib(const Handle(StepData_Protocol)& aprotocol);
+ //! Creates an empty Library : it will later by filled by method
+ //! AddProtocol
Standard_EXPORT StepData_WriterLib();
+ //! Adds a couple (Module-Protocol) to the Library, given the
+ //! class of a Protocol. Takes Resources into account.
+ //! (if <aprotocol> is not of type TheProtocol, it is not added)
Standard_EXPORT void AddProtocol (const Handle(Standard_Transient)& aprotocol);
+ //! Clears the list of Modules of a library (can be used to
+ //! redefine the order of Modules before action : Clear then
+ //! refill the Library by calls to AddProtocol)
Standard_EXPORT void Clear();
+ //! Sets a library to be defined with the complete Global list
+ //! (all the couples Protocol/Modules recorded in it)
Standard_EXPORT void SetComplete();
+ //! Selects a Module from the Library, given an Object.
+ //! Returns True if Select has succeeded, False else.
+ //! Also Returns (as arguments) the selected Module and the Case
+ //! Number determined by the associated Protocol.
+ //! If Select has failed, <module> is Null Handle and CN is zero.
+ //! (Select can work on any criterium, such as Object DynamicType)
Standard_EXPORT Standard_Boolean Select (const Handle(Standard_Transient)& obj, Handle(StepData_ReadWriteModule)& module, Standard_Integer& CN) const;
+ //! Starts Iteration on the Modules (sets it on the first one)
Standard_EXPORT void Start();
+ //! Returns True if there are more Modules to iterate on
Standard_EXPORT Standard_Boolean More() const;
+ //! Iterates by getting the next Module in the list
+ //! If there is none, the exception will be raised by Value
Standard_EXPORT void Next();
+ //! Returns the current Module in the Iteration
Standard_EXPORT const Handle(StepData_ReadWriteModule)& Module() const;
+ //! Returns the current Protocol in the Iteration
Standard_EXPORT const Handle(StepData_Protocol)& Protocol() const;
public:
+ //! Perform the action specific to each class of File Modifier
+ //! <ctx> is the ContextWrite, which brings : the model, the
+ //! protocol, the file name, plus the object AppliedModifiers
+ //! (not used here) and the CheckList
+ //! Remark that the model has to be casted for specific access
+ //!
+ //! <writer> is the Writer and is specific to each norm, on which
+ //! to act
Standard_EXPORT virtual void Perform (IFSelect_ContextWrite& ctx, StepData_StepWriter& writer) const = 0;
protected:
+ //! Sets a File Modifier to keep the graph of dependences
+ //! unchanges (because it works on the model already produced)
Standard_EXPORT StepSelect_FileModifier();
public:
+ //! The inherited Perform does the required cast (and refuses to
+ //! go further if cast has failed) then calls the instantiated
+ //! Performing
Standard_EXPORT void Perform (IFSelect_ContextModif& ctx, const Handle(Interface_InterfaceModel)& target, const Handle(Interface_Protocol)& protocol, Interface_CopyTool& TC) const;
+ //! Specific Perform with Protocol. It is defined to let the
+ //! Protocol unused and to call Performing without Protocol
+ //! (most current case). It can be redefined if specific action
+ //! requires Protocol.
Standard_EXPORT virtual void PerformProtocol (IFSelect_ContextModif& ctx, const Handle(StepData_StepModel)& target, const Handle(StepData_Protocol)& proto, Interface_CopyTool& TC) const;
+ //! Specific Perform, without Protocol. If Performing with
+ //! Protocol is redefined, Performing without Protocol must
+ //! though be defined to do nothing (not called, but demanded
+ //! by the linker)
Standard_EXPORT virtual void Performing (IFSelect_ContextModif& ctx, const Handle(StepData_StepModel)& target, Interface_CopyTool& TC) const = 0;
protected:
+ //! Calls inherited Initialize, transmits to it the information
+ //! <maychangegraph>
Standard_EXPORT StepSelect_ModelModifier(const Standard_Boolean maychangegraph);
Standard_EXPORT Transfer_ActorOfProcessForFinder();
+ //! Prerequesite for Transfer : the method Transfer is
+ //! called on a starting object only if Recognize has
+ //! returned True on it
+ //! This allows to define a list of Actors, each one
+ //! processing a definite kind of data
+ //! TransferProcess calls Recognize on each one before
+ //! calling Transfer. But even if Recognize has returned
+ //! True, Transfer can reject by returning a Null Binder
+ //! (afterwards rejection), the next actor is then invoked
+ //!
+ //! The provided default returns True, can be redefined
Standard_EXPORT virtual Standard_Boolean Recognize (const Handle(Transfer_Finder)& start);
+ //! Specific action of Transfer. The Result is stored in
+ //! the returned Binder, or a Null Handle for "No result"
+ //! (Default defined as doing nothing; should be deffered)
+ //! "mutable" allows the Actor to record intermediate
+ //! information, in addition to those of TransferProcess
Standard_EXPORT virtual Handle(Transfer_Binder) Transferring (const Handle(Transfer_Finder)& start, const Handle(Transfer_ProcessForFinder)& TP);
+ //! Prepares and Returns a Binder for a Transient Result
+ //! Returns a Null Handle if <res> is itself Null
Standard_EXPORT Handle(Transfer_SimpleBinderOfTransient) TransientResult (const Handle(Standard_Transient)& res) const;
+ //! Returns a Binder for No Result, i.e. a Null Handle
Standard_EXPORT Handle(Transfer_Binder) NullResult() const;
+ //! If <mode> is True, commands an Actor to be set at the
+ //! end of the list of Actors (see SetNext)
+ //! If it is False (creation default), each add Actor is
+ //! set at the beginning of the list
+ //! This allows to define default Actors (which are Last)
Standard_EXPORT void SetLast (const Standard_Boolean mode = Standard_True);
+ //! Returns the Last status (see SetLast).
Standard_EXPORT Standard_Boolean IsLast() const;
+ //! Defines a Next Actor : it can then be asked to work if
+ //! <me> produces no result for a given type of Object.
+ //! If Next is already set and is not "Last", calls
+ //! SetNext on it. If Next defined and "Last", the new
+ //! actor is added before it in the list
Standard_EXPORT void SetNext (const Handle(Transfer_ActorOfProcessForFinder)& next);
+ //! Returns the Actor defined as Next, or a Null Handle
Standard_EXPORT Handle(Transfer_ActorOfProcessForFinder) Next() const;
Standard_EXPORT Transfer_ActorOfProcessForTransient();
+ //! Prerequesite for Transfer : the method Transfer is
+ //! called on a starting object only if Recognize has
+ //! returned True on it
+ //! This allows to define a list of Actors, each one
+ //! processing a definite kind of data
+ //! TransferProcess calls Recognize on each one before
+ //! calling Transfer. But even if Recognize has returned
+ //! True, Transfer can reject by returning a Null Binder
+ //! (afterwards rejection), the next actor is then invoked
+ //!
+ //! The provided default returns True, can be redefined
Standard_EXPORT virtual Standard_Boolean Recognize (const Handle(Standard_Transient)& start);
+ //! Specific action of Transfer. The Result is stored in
+ //! the returned Binder, or a Null Handle for "No result"
+ //! (Default defined as doing nothing; should be deffered)
+ //! "mutable" allows the Actor to record intermediate
+ //! information, in addition to those of TransferProcess
Standard_EXPORT virtual Handle(Transfer_Binder) Transferring (const Handle(Standard_Transient)& start, const Handle(Transfer_ProcessForTransient)& TP);
+ //! Prepares and Returns a Binder for a Transient Result
+ //! Returns a Null Handle if <res> is itself Null
Standard_EXPORT Handle(Transfer_SimpleBinderOfTransient) TransientResult (const Handle(Standard_Transient)& res) const;
+ //! Returns a Binder for No Result, i.e. a Null Handle
Standard_EXPORT Handle(Transfer_Binder) NullResult() const;
+ //! If <mode> is True, commands an Actor to be set at the
+ //! end of the list of Actors (see SetNext)
+ //! If it is False (creation default), each add Actor is
+ //! set at the beginning of the list
+ //! This allows to define default Actors (which are Last)
Standard_EXPORT void SetLast (const Standard_Boolean mode = Standard_True);
+ //! Returns the Last status (see SetLast).
Standard_EXPORT Standard_Boolean IsLast() const;
+ //! Defines a Next Actor : it can then be asked to work if
+ //! <me> produces no result for a given type of Object.
+ //! If Next is already set and is not "Last", calls
+ //! SetNext on it. If Next defined and "Last", the new
+ //! actor is added before it in the list
Standard_EXPORT void SetNext (const Handle(Transfer_ActorOfProcessForTransient)& next);
+ //! Returns the Actor defined as Next, or a Null Handle
Standard_EXPORT Handle(Transfer_ActorOfProcessForTransient) Next() const;
DEFINE_STANDARD_ALLOC
+ //! Creates an empty Iterator
+ //! if withstarts is True, each Binder to be iterated will
+ //! be associated to its corresponding Starting Object
Standard_EXPORT Transfer_IteratorOfProcessForFinder(const Standard_Boolean withstarts);
+ //! Adds a Binder to the iteration list (construction)
+ //! with no corresponding Starting Object
+ //! (note that Result is brought by Binder)
Standard_EXPORT void Add (const Handle(Transfer_Binder)& binder);
+ //! Adds a Binder to the iteration list, associated with
+ //! its corresponding Starting Object "start"
+ //! Starting Object is ignored if not required at
+ //! Creation time
Standard_EXPORT void Add (const Handle(Transfer_Binder)& binder, const Handle(Transfer_Finder)& start);
+ //! After having added all items, keeps or rejects items
+ //! which are attached to starting data given by <only>
+ //! <keep> = True (D) : keeps. <keep> = False : rejects
+ //! Does nothing if <withstarts> was False
Standard_EXPORT void Filter (const Handle(Transfer_HSequenceOfFinder)& list, const Standard_Boolean keep = Standard_True);
+ //! Returns True if Starting Object is available
+ //! (defined at Creation Time)
Standard_EXPORT Standard_Boolean HasStarting() const;
+ //! Returns corresponding Starting Object
Standard_EXPORT const Handle(Transfer_Finder)& Starting() const;
DEFINE_STANDARD_ALLOC
+ //! Creates an empty Iterator
+ //! if withstarts is True, each Binder to be iterated will
+ //! be associated to its corresponding Starting Object
Standard_EXPORT Transfer_IteratorOfProcessForTransient(const Standard_Boolean withstarts);
+ //! Adds a Binder to the iteration list (construction)
+ //! with no corresponding Starting Object
+ //! (note that Result is brought by Binder)
Standard_EXPORT void Add (const Handle(Transfer_Binder)& binder);
+ //! Adds a Binder to the iteration list, associated with
+ //! its corresponding Starting Object "start"
+ //! Starting Object is ignored if not required at
+ //! Creation time
Standard_EXPORT void Add (const Handle(Transfer_Binder)& binder, const Handle(Standard_Transient)& start);
+ //! After having added all items, keeps or rejects items
+ //! which are attached to starting data given by <only>
+ //! <keep> = True (D) : keeps. <keep> = False : rejects
+ //! Does nothing if <withstarts> was False
Standard_EXPORT void Filter (const Handle(TColStd_HSequenceOfTransient)& list, const Standard_Boolean keep = Standard_True);
+ //! Returns True if Starting Object is available
+ //! (defined at Creation Time)
Standard_EXPORT Standard_Boolean HasStarting() const;
+ //! Returns corresponding Starting Object
Standard_EXPORT const Handle(Standard_Transient)& Starting() const;
public:
+ //! Sets TransferProcess at initial state. Gives an Initial size
+ //! (indicative) for the Map when known (default is 10000).
+ //! Sets default trace file as a printer and default trace level
+ //! (see Message_TraceFile).
Standard_EXPORT Transfer_ProcessForFinder(const Standard_Integer nb = 10000);
+ //! Sets TransferProcess at initial state. Gives an Initial size
+ //! (indicative) for the Map when known (default is 10000).
+ //! Sets a specified printer.
Standard_EXPORT Transfer_ProcessForFinder(const Handle(Message_Messenger)& printer, const Standard_Integer nb = 10000);
+ //! Resets a TransferProcess as ready for a completely new work.
+ //! Clears general data (roots) and the Map
Standard_EXPORT void Clear();
+ //! Rebuilds the Map and the roots to really remove Unbound items
+ //! Because Unbind keeps the entity in place, even if not bound
+ //! Hence, working by checking new items is meaningless if a
+ //! formerly unbound item is rebound
Standard_EXPORT void Clean();
+ //! Resizes the Map as required (if a new reliable value has been
+ //! determined). Acts only if <nb> is greater than actual NbMapped
Standard_EXPORT void Resize (const Standard_Integer nb);
+ //! Defines an Actor, which is used for automatic Transfer
+ //! If already defined, the new Actor is cumulated
+ //! (see SetNext from Actor)
Standard_EXPORT void SetActor (const Handle(Transfer_ActorOfProcessForFinder)& actor);
+ //! Returns the defined Actor. Returns a Null Handle if
+ //! not set.
Standard_EXPORT Handle(Transfer_ActorOfProcessForFinder) Actor() const;
+ //! Returns the Binder which is linked with a starting Object
+ //! It can either bring a Result (Transfer done) or none (for a
+ //! pre-binding).
+ //! If no Binder is linked with <start>, returns a Null Handle
+ //! Considers a category number, by default 0
Standard_EXPORT Handle(Transfer_Binder) Find (const Handle(Transfer_Finder)& start) const;
+ //! Returns True if a Result (whatever its form) is Bound with
+ //! a starting Object. I.e., if a Binder with a Result set,
+ //! is linked with it
+ //! Considers a category number, by default 0
Standard_EXPORT Standard_Boolean IsBound (const Handle(Transfer_Finder)& start) const;
+ //! Returns True if the result of the transfer of an object is
+ //! already used in other ones. If it is, Rebind cannot change it.
+ //! Considers a category number, by default 0
Standard_EXPORT Standard_Boolean IsAlreadyUsed (const Handle(Transfer_Finder)& start) const;
+ //! Creates a Link a starting Object with a Binder. This Binder
+ //! can either bring a Result (effective Binding) or none (it can
+ //! be set later : pre-binding).
+ //! Considers a category number, by default 0
Standard_EXPORT void Bind (const Handle(Transfer_Finder)& start, const Handle(Transfer_Binder)& binder);
+ //! Changes the Binder linked with a starting Object for its
+ //! unitary transfer. This it can be useful when the exact form
+ //! of the result is known once the transfer is widely engaged.
+ //! This can be done only on first transfer.
+ //! Considers a category number, by default 0
Standard_EXPORT void Rebind (const Handle(Transfer_Finder)& start, const Handle(Transfer_Binder)& binder);
+ //! Removes the Binder linked with a starting object
+ //! If this Binder brings a non-empty Check, it is replaced by
+ //! a VoidBinder. Also removes from the list of Roots as required.
+ //! Returns True if done, False if <start> was not bound
+ //! Considers a category number, by default 0
Standard_EXPORT Standard_Boolean Unbind (const Handle(Transfer_Finder)& start);
+ //! Returns a Binder for a starting entity, as follows :
+ //! Tries to Find the already bound one
+ //! If none found, creates a VoidBinder and Binds it
Standard_EXPORT Handle(Transfer_Binder) FindElseBind (const Handle(Transfer_Finder)& start);
+ //! Sets Messenger used for outputting messages.
Standard_EXPORT void SetMessenger (const Handle(Message_Messenger)& messenger);
+ //! Returns Messenger used for outputting messages.
+ //! The returned object is guaranteed to be non-null;
+ //! default is Message::Messenger().
Standard_EXPORT Handle(Message_Messenger) Messenger() const;
+ //! Sets trace level used for outputting messages:
+ //! <trace> = 0 : no trace at all
+ //! <trace> = 1 : handled exceptions and calls to AddError
+ //! <trace> = 2 : also calls to AddWarning
+ //! <trace> = 3 : also traces new Roots
+ //! (uses method ErrorTrace).
+ //! Default is 1 : Errors traced
Standard_EXPORT void SetTraceLevel (const Standard_Integer tracelev);
+ //! Returns trace level used for outputting messages.
Standard_EXPORT Standard_Integer TraceLevel() const;
+ //! New name for AddFail (Msg)
Standard_EXPORT void SendFail (const Handle(Transfer_Finder)& start, const Message_Msg& amsg);
+ //! New name for AddWarning (Msg)
Standard_EXPORT void SendWarning (const Handle(Transfer_Finder)& start, const Message_Msg& amsg);
+ //! Adds an information message
+ //! Trace is filled if trace level is at least 3
Standard_EXPORT void SendMsg (const Handle(Transfer_Finder)& start, const Message_Msg& amsg);
+ //! Adds an Error message to a starting entity (to the check of
+ //! its Binder of category 0, as a Fail)
Standard_EXPORT void AddFail (const Handle(Transfer_Finder)& start, const Standard_CString mess, const Standard_CString orig = "");
+ //! (other name of AddFail, maintained for compatibility)
Standard_EXPORT void AddError (const Handle(Transfer_Finder)& start, const Standard_CString mess, const Standard_CString orig = "");
+ //! Adds an Error Message to a starting entity from the definition
+ //! of a Msg (Original+Value)
Standard_EXPORT void AddFail (const Handle(Transfer_Finder)& start, const Message_Msg& amsg);
+ //! Adds a Warning message to a starting entity (to the check of
+ //! its Binder of category 0)
Standard_EXPORT void AddWarning (const Handle(Transfer_Finder)& start, const Standard_CString mess, const Standard_CString orig = "");
+ //! Adds a Warning Message to a starting entity from the definition
+ //! of a Msg (Original+Value)
Standard_EXPORT void AddWarning (const Handle(Transfer_Finder)& start, const Message_Msg& amsg);
Standard_EXPORT void Mend (const Handle(Transfer_Finder)& start, const Standard_CString pref = "");
+ //! Returns the Check attached to a starting entity. If <start>
+ //! is unknown, returns an empty Check
+ //! Adds a case name to a starting entity
+ //! Adds a case value to a starting entity
+ //! Returns the complete case list for an entity. Null Handle if empty
+ //! In the list of mapped items (between 1 and NbMapped),
+ //! searches for the first item which follows <num0>(not included)
+ //! and which has an attribute named <name>
+ //! Attributes are brought by Binders
+ //! Hence, allows such an iteration
+ //!
+ //! for (num = TP->NextItemWithAttribute(name,0);
+ //! num > 0;
+ //! num = TP->NextItemWithAttribute(name,num) {
+ //! .. process mapped item <num>
+ //! }
+ //! Returns the type of an Attribute attached to binders
+ //! If this name gives no Attribute, returns ParamVoid
+ //! If this name gives several different types, returns ParamMisc
+ //! Else, returns the effective type (ParamInteger, ParamReal,
+ //! ParamIdent, or ParamText)
+ //! Returns the list of recorded Attribute Names, as a Dictionary
+ //! of Integer : each value gives the count of items which bring
+ //! this attribute name
+ //! By default, considers all the attribute names
+ //! If <rootname> is given, considers only the attribute names
+ //! which begin by <rootname>
Standard_EXPORT Handle(Interface_Check) Check (const Handle(Transfer_Finder)& start) const;
+ //! Binds a starting object with a Transient Result.
+ //! Uses a SimpleBinderOfTransient to work. If there is already
+ //! one but with no Result set, sets its Result.
+ //! Considers a category number, by default 0
Standard_EXPORT void BindTransient (const Handle(Transfer_Finder)& start, const Handle(Standard_Transient)& res);
+ //! Returns the Result of the Transfer of an object <start> as a
+ //! Transient Result.
+ //! Returns a Null Handle if there is no Transient Result
+ //! Considers a category number, by default 0
+ //! Warning : Supposes that Binding is done with a SimpleBinderOfTransient
Standard_EXPORT const Handle(Standard_Transient)& FindTransient (const Handle(Transfer_Finder)& start) const;
+ //! Prepares an object <start> to be bound with several results.
+ //! If no Binder is yet attached to <obj>, a MultipleBinder
+ //! is created, empty. If a Binder is already set, it must
+ //! accept Multiple Binding.
+ //! Considers a category number, by default 0
Standard_EXPORT void BindMultiple (const Handle(Transfer_Finder)& start);
+ //! Adds an item to a list of results bound to a starting object.
+ //! Considers a category number, by default 0, for all results
Standard_EXPORT void AddMultiple (const Handle(Transfer_Finder)& start, const Handle(Standard_Transient)& res);
+ //! Searches for a transient result attached to a starting object,
+ //! according to its type, by criterium IsKind(atype)
+ //!
+ //! In case of multiple result, explores the list and gives in
+ //! <val> the first transient result IsKind(atype)
+ //! Returns True and fills <val> if found
+ //! Else, returns False (<val> is not touched, not even nullified)
+ //!
+ //! This syntactic form avoids to do DownCast : if a result is
+ //! found with the good type, it is loaded in <val> and can be
+ //! immediately used, well initialised
Standard_EXPORT Standard_Boolean FindTypedTransient (const Handle(Transfer_Finder)& start, const Handle(Standard_Type)& atype, Handle(Standard_Transient)& val) const;
+ //! Searches for a transient result recorded in a Binder, whatever
+ //! this Binder is recorded or not in <me>
+ //!
+ //! This is strictly equivalent to the class method GetTypedResult
+ //! from class SimpleBinderOfTransient, but is just lighter to call
+ //!
+ //! Apart from this, works as FindTypedTransient
Standard_EXPORT Standard_Boolean GetTypedTransient (const Handle(Transfer_Binder)& binder, const Handle(Standard_Type)& atype, Handle(Standard_Transient)& val) const;
+ //! Returns the maximum possible value for Map Index
+ //! (no result can be bound with a value greater than it)
Standard_EXPORT Standard_Integer NbMapped() const;
+ //! Returns the Starting Object bound to an Index,
Standard_EXPORT const Handle(Transfer_Finder)& Mapped (const Standard_Integer num) const;
+ //! Returns the Index value bound to a Starting Object, 0 if none
Standard_EXPORT Standard_Integer MapIndex (const Handle(Transfer_Finder)& start) const;
+ //! Returns the Binder bound to an Index
+ //! Considers a category number, by default 0
Standard_EXPORT Handle(Transfer_Binder) MapItem (const Standard_Integer num) const;
+ //! Declares <obj> (and its Result) as Root. This status will be
+ //! later exploited by RootResult, see below (Result can be
+ //! produced at any time)
Standard_EXPORT void SetRoot (const Handle(Transfer_Finder)& start);
+ //! Enable (if <stat> True) or Disables (if <stat> False) Root
+ //! Management. If it is set, Transfers are considered as stacked
+ //! (a first Transfer commands other Transfers, and so on) and
+ //! the Transfers commanded by an external caller are "Root".
+ //! Remark : SetRoot can be called whatever this status, on every
+ //! object.
+ //! Default is set to True.
Standard_EXPORT void SetRootManagement (const Standard_Boolean stat);
+ //! Returns the count of recorded Roots
Standard_EXPORT Standard_Integer NbRoots() const;
+ //! Returns a Root Entity given its number in the list (1-NbRoots)
Standard_EXPORT const Handle(Transfer_Finder)& Root (const Standard_Integer num) const;
+ //! Returns the Binder bound with a Root Entity given its number
+ //! Considers a category number, by default 0
Standard_EXPORT Handle(Transfer_Binder) RootItem (const Standard_Integer num) const;
+ //! Returns the index in the list of roots for a starting item,
+ //! or 0 if it is not recorded as a root
Standard_EXPORT Standard_Integer RootIndex (const Handle(Transfer_Finder)& start) const;
+ //! Returns Nesting Level of Transfers (managed by methods
+ //! TranscriptWith & Co). Starts to zero. If no automatic Transfer
+ //! is used, it remains to zero. Zero means Root Level.
Standard_EXPORT Standard_Integer NestingLevel() const;
+ //! Resets Nesting Level of Transfers to Zero (Root Level),
+ //! whatever its current value.
Standard_EXPORT void ResetNestingLevel();
+ //! Tells if <start> has been recognized as good candidate for
+ //! Transfer. i.e. queries the Actor and its Nexts
Standard_EXPORT Standard_Boolean Recognize (const Handle(Transfer_Finder)& start) const;
+ //! Performs the Transfer of a Starting Object, by calling
+ //! the method TransferProduct (see below).
+ //! Mapping and Roots are managed : nothing is done if a Result is
+ //! already Bound, an exception is raised in case of error.
Standard_EXPORT Handle(Transfer_Binder) Transferring (const Handle(Transfer_Finder)& start);
+ //! Same as Transferring but does not return the Binder.
+ //! Simply returns True in case of success (for user call)
Standard_EXPORT Standard_Boolean Transfer (const Handle(Transfer_Finder)& start);
+ //! Allows controls if exceptions will be handled
+ //! Transfer Operations
+ //! <err> False : they are not handled with try {} catch {}
+ //! <err> True : they are
+ //! Default is False: no handling performed
Standard_EXPORT void SetErrorHandle (const Standard_Boolean err);
+ //! Returns error handling flag
Standard_EXPORT Standard_Boolean ErrorHandle() const;
+ //! Method called when trace is asked
+ //! Calls PrintTrace to display information relevant for starting
+ //! objects (which can be redefined)
+ //! <level> is Nesting Level of Transfer (0 = root)
+ //! <mode> controls the way the trace is done :
+ //! 0 neutral, 1 for Error, 2 for Warning message, 3 for new Root
Standard_EXPORT void StartTrace (const Handle(Transfer_Binder)& binder, const Handle(Transfer_Finder)& start, const Standard_Integer level, const Standard_Integer mode) const;
+ //! Prints a short information on a starting object. By default
+ //! prints its Dynamic Type. Can be redefined
Standard_EXPORT virtual void PrintTrace (const Handle(Transfer_Finder)& start, const Handle(Message_Messenger)& S) const;
+ //! Returns True if we are surely in a DeadLoop. Evaluation is not
+ //! exact, it is a "majorant" which must be computed fast.
+ //! This "majorant" is : <alevel> greater than NbMapped.
Standard_EXPORT Standard_Boolean IsLooping (const Standard_Integer alevel) const;
+ //! Returns, as an iterator, the log of root transfer, i.e. the
+ //! created objects and Binders bound to starting roots
+ //! If withstart is given True, Starting Objets are also returned
Standard_EXPORT Transfer_IteratorOfProcessForFinder RootResult (const Standard_Boolean withstart = Standard_False) const;
+ //! Returns, as an Iterator, the entire log of transfer (list of
+ //! created objects and Binders which can bring errors)
+ //! If withstart is given True, Starting Objets are also returned
Standard_EXPORT Transfer_IteratorOfProcessForFinder CompleteResult (const Standard_Boolean withstart = Standard_False) const;
+ //! Returns Binders which are neither "Done" nor "Initial",
+ //! that is Error,Loop or Run (abnormal states at end of Transfer)
+ //! Starting Objects are given in correspondance in the iterator
Standard_EXPORT Transfer_IteratorOfProcessForFinder AbnormalResult() const;
+ //! Returns a CheckList as a list of Check : each one is for a
+ //! starting entity which have either check (warning or fail)
+ //! messages are attached, or are in abnormal state : that case
+ //! gives a specific message
+ //! If <erronly> is True, checks with Warnings only are ignored
Standard_EXPORT Interface_CheckIterator CheckList (const Standard_Boolean erronly) const;
+ //! Returns, as an Iterator, the log of transfer for one object
+ //! <level> = 0 : this object only
+ //! and if <start> is a scope owner (else, <level> is ignored) :
+ //! <level> = 1 : object plus its immediate scoped ones
+ //! <level> = 2 : object plus all its scoped ones
Standard_EXPORT Transfer_IteratorOfProcessForFinder ResultOne (const Handle(Transfer_Finder)& start, const Standard_Integer level, const Standard_Boolean withstart = Standard_False) const;
+ //! Returns a CheckList for one starting object
+ //! <level> interpreted as by ResultOne
+ //! If <erronly> is True, checks with Warnings only are ignored
Standard_EXPORT Interface_CheckIterator CheckListOne (const Handle(Transfer_Finder)& start, const Standard_Integer level, const Standard_Boolean erronly) const;
+ //! Returns True if no check message is attached to a starting
+ //! object. <level> interpreted as by ResultOne
+ //! If <erronly> is True, checks with Warnings only are ignored
Standard_EXPORT Standard_Boolean IsCheckListEmpty (const Handle(Transfer_Finder)& start, const Standard_Integer level, const Standard_Boolean erronly) const;
+ //! Removes Results attached to (== Unbinds) a given object and,
+ //! according <level> :
+ //! <level> = 0 : only it
+ //! <level> = 1 : it plus its immediately owned sub-results(scope)
+ //! <level> = 2 : it plus all its owned sub-results(scope)
Standard_EXPORT void RemoveResult (const Handle(Transfer_Finder)& start, const Standard_Integer level, const Standard_Boolean compute = Standard_True);
+ //! Computes a number to be associated to a starting object in
+ //! a check or a check-list
+ //! By default, returns 0; can be redefined
Standard_EXPORT virtual Standard_Integer CheckNum (const Handle(Transfer_Finder)& start) const;
+ //! Sets Progress indicator
Standard_EXPORT void SetProgress (const Handle(Message_ProgressIndicator)& theProgress);
+ //! Gets Progress indicator
Standard_EXPORT Handle(Message_ProgressIndicator) GetProgress() const;
private:
+ //! Same as Find but stores the last access to the map, for a
+ //! faster access on next calls (as Bind does too)
+ //! Considers a category number, by default 0
+ //! C++ : return const &
Standard_EXPORT Handle(Transfer_Binder) FindAndMask (const Handle(Transfer_Finder)& start);
+ //! Internal action of Transfer, called by Transferring, with or
+ //! without ErrorHandle. It invokes the Actor to work (set by
+ //! SetActor), and tries its Nexts if no result is produced,
+ //! until a Non Null Binder is produced.
+ //! But keep in mind that a Null Binder can allways be returned
+ //! if a Starting Entity has not been recognized at all.
Standard_EXPORT Handle(Transfer_Binder) TransferProduct (const Handle(Transfer_Finder)& start);
Standard_Boolean theerrh;
public:
+ //! Sets TransferProcess at initial state. Gives an Initial size
+ //! (indicative) for the Map when known (default is 10000).
+ //! Sets default trace file as a printer and default trace level
+ //! (see Message_TraceFile).
Standard_EXPORT Transfer_ProcessForTransient(const Standard_Integer nb = 10000);
+ //! Sets TransferProcess at initial state. Gives an Initial size
+ //! (indicative) for the Map when known (default is 10000).
+ //! Sets a specified printer.
Standard_EXPORT Transfer_ProcessForTransient(const Handle(Message_Messenger)& printer, const Standard_Integer nb = 10000);
+ //! Resets a TransferProcess as ready for a completely new work.
+ //! Clears general data (roots) and the Map
Standard_EXPORT void Clear();
+ //! Rebuilds the Map and the roots to really remove Unbound items
+ //! Because Unbind keeps the entity in place, even if not bound
+ //! Hence, working by checking new items is meaningless if a
+ //! formerly unbound item is rebound
Standard_EXPORT void Clean();
+ //! Resizes the Map as required (if a new reliable value has been
+ //! determined). Acts only if <nb> is greater than actual NbMapped
Standard_EXPORT void Resize (const Standard_Integer nb);
+ //! Defines an Actor, which is used for automatic Transfer
+ //! If already defined, the new Actor is cumulated
+ //! (see SetNext from Actor)
Standard_EXPORT void SetActor (const Handle(Transfer_ActorOfProcessForTransient)& actor);
+ //! Returns the defined Actor. Returns a Null Handle if
+ //! not set.
Standard_EXPORT Handle(Transfer_ActorOfProcessForTransient) Actor() const;
+ //! Returns the Binder which is linked with a starting Object
+ //! It can either bring a Result (Transfer done) or none (for a
+ //! pre-binding).
+ //! If no Binder is linked with <start>, returns a Null Handle
+ //! Considers a category number, by default 0
Standard_EXPORT Handle(Transfer_Binder) Find (const Handle(Standard_Transient)& start) const;
+ //! Returns True if a Result (whatever its form) is Bound with
+ //! a starting Object. I.e., if a Binder with a Result set,
+ //! is linked with it
+ //! Considers a category number, by default 0
Standard_EXPORT Standard_Boolean IsBound (const Handle(Standard_Transient)& start) const;
+ //! Returns True if the result of the transfer of an object is
+ //! already used in other ones. If it is, Rebind cannot change it.
+ //! Considers a category number, by default 0
Standard_EXPORT Standard_Boolean IsAlreadyUsed (const Handle(Standard_Transient)& start) const;
+ //! Creates a Link a starting Object with a Binder. This Binder
+ //! can either bring a Result (effective Binding) or none (it can
+ //! be set later : pre-binding).
+ //! Considers a category number, by default 0
Standard_EXPORT void Bind (const Handle(Standard_Transient)& start, const Handle(Transfer_Binder)& binder);
+ //! Changes the Binder linked with a starting Object for its
+ //! unitary transfer. This it can be useful when the exact form
+ //! of the result is known once the transfer is widely engaged.
+ //! This can be done only on first transfer.
+ //! Considers a category number, by default 0
Standard_EXPORT void Rebind (const Handle(Standard_Transient)& start, const Handle(Transfer_Binder)& binder);
+ //! Removes the Binder linked with a starting object
+ //! If this Binder brings a non-empty Check, it is replaced by
+ //! a VoidBinder. Also removes from the list of Roots as required.
+ //! Returns True if done, False if <start> was not bound
+ //! Considers a category number, by default 0
Standard_EXPORT Standard_Boolean Unbind (const Handle(Standard_Transient)& start);
+ //! Returns a Binder for a starting entity, as follows :
+ //! Tries to Find the already bound one
+ //! If none found, creates a VoidBinder and Binds it
Standard_EXPORT Handle(Transfer_Binder) FindElseBind (const Handle(Standard_Transient)& start);
+ //! Sets Messenger used for outputting messages.
Standard_EXPORT void SetMessenger (const Handle(Message_Messenger)& messenger);
+ //! Returns Messenger used for outputting messages.
+ //! The returned object is guaranteed to be non-null;
+ //! default is Message::Messenger().
Standard_EXPORT Handle(Message_Messenger) Messenger() const;
+ //! Sets trace level used for outputting messages:
+ //! <trace> = 0 : no trace at all
+ //! <trace> = 1 : handled exceptions and calls to AddError
+ //! <trace> = 2 : also calls to AddWarning
+ //! <trace> = 3 : also traces new Roots
+ //! (uses method ErrorTrace).
+ //! Default is 1 : Errors traced
Standard_EXPORT void SetTraceLevel (const Standard_Integer tracelev);
+ //! Returns trace level used for outputting messages.
Standard_EXPORT Standard_Integer TraceLevel() const;
+ //! New name for AddFail (Msg)
Standard_EXPORT void SendFail (const Handle(Standard_Transient)& start, const Message_Msg& amsg);
+ //! New name for AddWarning (Msg)
Standard_EXPORT void SendWarning (const Handle(Standard_Transient)& start, const Message_Msg& amsg);
+ //! Adds an information message
+ //! Trace is filled if trace level is at least 3
Standard_EXPORT void SendMsg (const Handle(Standard_Transient)& start, const Message_Msg& amsg);
+ //! Adds an Error message to a starting entity (to the check of
+ //! its Binder of category 0, as a Fail)
Standard_EXPORT void AddFail (const Handle(Standard_Transient)& start, const Standard_CString mess, const Standard_CString orig = "");
+ //! (other name of AddFail, maintained for compatibility)
Standard_EXPORT void AddError (const Handle(Standard_Transient)& start, const Standard_CString mess, const Standard_CString orig = "");
+ //! Adds an Error Message to a starting entity from the definition
+ //! of a Msg (Original+Value)
Standard_EXPORT void AddFail (const Handle(Standard_Transient)& start, const Message_Msg& amsg);
+ //! Adds a Warning message to a starting entity (to the check of
+ //! its Binder of category 0)
Standard_EXPORT void AddWarning (const Handle(Standard_Transient)& start, const Standard_CString mess, const Standard_CString orig = "");
+ //! Adds a Warning Message to a starting entity from the definition
+ //! of a Msg (Original+Value)
Standard_EXPORT void AddWarning (const Handle(Standard_Transient)& start, const Message_Msg& amsg);
Standard_EXPORT void Mend (const Handle(Standard_Transient)& start, const Standard_CString pref = "");
+ //! Returns the Check attached to a starting entity. If <start>
+ //! is unknown, returns an empty Check
+ //! Adds a case name to a starting entity
+ //! Adds a case value to a starting entity
+ //! Returns the complete case list for an entity. Null Handle if empty
+ //! In the list of mapped items (between 1 and NbMapped),
+ //! searches for the first item which follows <num0>(not included)
+ //! and which has an attribute named <name>
+ //! Attributes are brought by Binders
+ //! Hence, allows such an iteration
+ //!
+ //! for (num = TP->NextItemWithAttribute(name,0);
+ //! num > 0;
+ //! num = TP->NextItemWithAttribute(name,num) {
+ //! .. process mapped item <num>
+ //! }
+ //! Returns the type of an Attribute attached to binders
+ //! If this name gives no Attribute, returns ParamVoid
+ //! If this name gives several different types, returns ParamMisc
+ //! Else, returns the effective type (ParamInteger, ParamReal,
+ //! ParamIdent, or ParamText)
+ //! Returns the list of recorded Attribute Names, as a Dictionary
+ //! of Integer : each value gives the count of items which bring
+ //! this attribute name
+ //! By default, considers all the attribute names
+ //! If <rootname> is given, considers only the attribute names
+ //! which begin by <rootname>
Standard_EXPORT Handle(Interface_Check) Check (const Handle(Standard_Transient)& start) const;
+ //! Binds a starting object with a Transient Result.
+ //! Uses a SimpleBinderOfTransient to work. If there is already
+ //! one but with no Result set, sets its Result.
+ //! Considers a category number, by default 0
Standard_EXPORT void BindTransient (const Handle(Standard_Transient)& start, const Handle(Standard_Transient)& res);
+ //! Returns the Result of the Transfer of an object <start> as a
+ //! Transient Result.
+ //! Returns a Null Handle if there is no Transient Result
+ //! Considers a category number, by default 0
+ //! Warning : Supposes that Binding is done with a SimpleBinderOfTransient
Standard_EXPORT const Handle(Standard_Transient)& FindTransient (const Handle(Standard_Transient)& start) const;
+ //! Prepares an object <start> to be bound with several results.
+ //! If no Binder is yet attached to <obj>, a MultipleBinder
+ //! is created, empty. If a Binder is already set, it must
+ //! accept Multiple Binding.
+ //! Considers a category number, by default 0
Standard_EXPORT void BindMultiple (const Handle(Standard_Transient)& start);
+ //! Adds an item to a list of results bound to a starting object.
+ //! Considers a category number, by default 0, for all results
Standard_EXPORT void AddMultiple (const Handle(Standard_Transient)& start, const Handle(Standard_Transient)& res);
+ //! Searches for a transient result attached to a starting object,
+ //! according to its type, by criterium IsKind(atype)
+ //!
+ //! In case of multiple result, explores the list and gives in
+ //! <val> the first transient result IsKind(atype)
+ //! Returns True and fills <val> if found
+ //! Else, returns False (<val> is not touched, not even nullified)
+ //!
+ //! This syntactic form avoids to do DownCast : if a result is
+ //! found with the good type, it is loaded in <val> and can be
+ //! immediately used, well initialised
Standard_EXPORT Standard_Boolean FindTypedTransient (const Handle(Standard_Transient)& start, const Handle(Standard_Type)& atype, Handle(Standard_Transient)& val) const;
+ //! Searches for a transient result recorded in a Binder, whatever
+ //! this Binder is recorded or not in <me>
+ //!
+ //! This is strictly equivalent to the class method GetTypedResult
+ //! from class SimpleBinderOfTransient, but is just lighter to call
+ //!
+ //! Apart from this, works as FindTypedTransient
Standard_EXPORT Standard_Boolean GetTypedTransient (const Handle(Transfer_Binder)& binder, const Handle(Standard_Type)& atype, Handle(Standard_Transient)& val) const;
+ //! Returns the maximum possible value for Map Index
+ //! (no result can be bound with a value greater than it)
Standard_EXPORT Standard_Integer NbMapped() const;
+ //! Returns the Starting Object bound to an Index,
Standard_EXPORT const Handle(Standard_Transient)& Mapped (const Standard_Integer num) const;
+ //! Returns the Index value bound to a Starting Object, 0 if none
Standard_EXPORT Standard_Integer MapIndex (const Handle(Standard_Transient)& start) const;
+ //! Returns the Binder bound to an Index
+ //! Considers a category number, by default 0
Standard_EXPORT Handle(Transfer_Binder) MapItem (const Standard_Integer num) const;
+ //! Declares <obj> (and its Result) as Root. This status will be
+ //! later exploited by RootResult, see below (Result can be
+ //! produced at any time)
Standard_EXPORT void SetRoot (const Handle(Standard_Transient)& start);
+ //! Enable (if <stat> True) or Disables (if <stat> False) Root
+ //! Management. If it is set, Transfers are considered as stacked
+ //! (a first Transfer commands other Transfers, and so on) and
+ //! the Transfers commanded by an external caller are "Root".
+ //! Remark : SetRoot can be called whatever this status, on every
+ //! object.
+ //! Default is set to True.
Standard_EXPORT void SetRootManagement (const Standard_Boolean stat);
+ //! Returns the count of recorded Roots
Standard_EXPORT Standard_Integer NbRoots() const;
+ //! Returns a Root Entity given its number in the list (1-NbRoots)
Standard_EXPORT const Handle(Standard_Transient)& Root (const Standard_Integer num) const;
+ //! Returns the Binder bound with a Root Entity given its number
+ //! Considers a category number, by default 0
Standard_EXPORT Handle(Transfer_Binder) RootItem (const Standard_Integer num) const;
+ //! Returns the index in the list of roots for a starting item,
+ //! or 0 if it is not recorded as a root
Standard_EXPORT Standard_Integer RootIndex (const Handle(Standard_Transient)& start) const;
+ //! Returns Nesting Level of Transfers (managed by methods
+ //! TranscriptWith & Co). Starts to zero. If no automatic Transfer
+ //! is used, it remains to zero. Zero means Root Level.
Standard_EXPORT Standard_Integer NestingLevel() const;
+ //! Resets Nesting Level of Transfers to Zero (Root Level),
+ //! whatever its current value.
Standard_EXPORT void ResetNestingLevel();
+ //! Tells if <start> has been recognized as good candidate for
+ //! Transfer. i.e. queries the Actor and its Nexts
Standard_EXPORT Standard_Boolean Recognize (const Handle(Standard_Transient)& start) const;
+ //! Performs the Transfer of a Starting Object, by calling
+ //! the method TransferProduct (see below).
+ //! Mapping and Roots are managed : nothing is done if a Result is
+ //! already Bound, an exception is raised in case of error.
Standard_EXPORT Handle(Transfer_Binder) Transferring (const Handle(Standard_Transient)& start);
+ //! Same as Transferring but does not return the Binder.
+ //! Simply returns True in case of success (for user call)
Standard_EXPORT Standard_Boolean Transfer (const Handle(Standard_Transient)& start);
+ //! Allows controls if exceptions will be handled
+ //! Transfer Operations
+ //! <err> False : they are not handled with try {} catch {}
+ //! <err> True : they are
+ //! Default is False: no handling performed
Standard_EXPORT void SetErrorHandle (const Standard_Boolean err);
+ //! Returns error handling flag
Standard_EXPORT Standard_Boolean ErrorHandle() const;
+ //! Method called when trace is asked
+ //! Calls PrintTrace to display information relevant for starting
+ //! objects (which can be redefined)
+ //! <level> is Nesting Level of Transfer (0 = root)
+ //! <mode> controls the way the trace is done :
+ //! 0 neutral, 1 for Error, 2 for Warning message, 3 for new Root
Standard_EXPORT void StartTrace (const Handle(Transfer_Binder)& binder, const Handle(Standard_Transient)& start, const Standard_Integer level, const Standard_Integer mode) const;
+ //! Prints a short information on a starting object. By default
+ //! prints its Dynamic Type. Can be redefined
Standard_EXPORT virtual void PrintTrace (const Handle(Standard_Transient)& start, const Handle(Message_Messenger)& S) const;
+ //! Returns True if we are surely in a DeadLoop. Evaluation is not
+ //! exact, it is a "majorant" which must be computed fast.
+ //! This "majorant" is : <alevel> greater than NbMapped.
Standard_EXPORT Standard_Boolean IsLooping (const Standard_Integer alevel) const;
+ //! Returns, as an iterator, the log of root transfer, i.e. the
+ //! created objects and Binders bound to starting roots
+ //! If withstart is given True, Starting Objets are also returned
Standard_EXPORT Transfer_IteratorOfProcessForTransient RootResult (const Standard_Boolean withstart = Standard_False) const;
+ //! Returns, as an Iterator, the entire log of transfer (list of
+ //! created objects and Binders which can bring errors)
+ //! If withstart is given True, Starting Objets are also returned
Standard_EXPORT Transfer_IteratorOfProcessForTransient CompleteResult (const Standard_Boolean withstart = Standard_False) const;
+ //! Returns Binders which are neither "Done" nor "Initial",
+ //! that is Error,Loop or Run (abnormal states at end of Transfer)
+ //! Starting Objects are given in correspondance in the iterator
Standard_EXPORT Transfer_IteratorOfProcessForTransient AbnormalResult() const;
+ //! Returns a CheckList as a list of Check : each one is for a
+ //! starting entity which have either check (warning or fail)
+ //! messages are attached, or are in abnormal state : that case
+ //! gives a specific message
+ //! If <erronly> is True, checks with Warnings only are ignored
Standard_EXPORT Interface_CheckIterator CheckList (const Standard_Boolean erronly) const;
+ //! Returns, as an Iterator, the log of transfer for one object
+ //! <level> = 0 : this object only
+ //! and if <start> is a scope owner (else, <level> is ignored) :
+ //! <level> = 1 : object plus its immediate scoped ones
+ //! <level> = 2 : object plus all its scoped ones
Standard_EXPORT Transfer_IteratorOfProcessForTransient ResultOne (const Handle(Standard_Transient)& start, const Standard_Integer level, const Standard_Boolean withstart = Standard_False) const;
+ //! Returns a CheckList for one starting object
+ //! <level> interpreted as by ResultOne
+ //! If <erronly> is True, checks with Warnings only are ignored
Standard_EXPORT Interface_CheckIterator CheckListOne (const Handle(Standard_Transient)& start, const Standard_Integer level, const Standard_Boolean erronly) const;
+ //! Returns True if no check message is attached to a starting
+ //! object. <level> interpreted as by ResultOne
+ //! If <erronly> is True, checks with Warnings only are ignored
Standard_EXPORT Standard_Boolean IsCheckListEmpty (const Handle(Standard_Transient)& start, const Standard_Integer level, const Standard_Boolean erronly) const;
+ //! Removes Results attached to (== Unbinds) a given object and,
+ //! according <level> :
+ //! <level> = 0 : only it
+ //! <level> = 1 : it plus its immediately owned sub-results(scope)
+ //! <level> = 2 : it plus all its owned sub-results(scope)
Standard_EXPORT void RemoveResult (const Handle(Standard_Transient)& start, const Standard_Integer level, const Standard_Boolean compute = Standard_True);
+ //! Computes a number to be associated to a starting object in
+ //! a check or a check-list
+ //! By default, returns 0; can be redefined
Standard_EXPORT virtual Standard_Integer CheckNum (const Handle(Standard_Transient)& start) const;
+ //! Sets Progress indicator
Standard_EXPORT void SetProgress (const Handle(Message_ProgressIndicator)& theProgress);
+ //! Gets Progress indicator
Standard_EXPORT Handle(Message_ProgressIndicator) GetProgress() const;
private:
+ //! Same as Find but stores the last access to the map, for a
+ //! faster access on next calls (as Bind does too)
+ //! Considers a category number, by default 0
+ //! C++ : return const &
Standard_EXPORT Handle(Transfer_Binder) FindAndMask (const Handle(Standard_Transient)& start);
+ //! Internal action of Transfer, called by Transferring, with or
+ //! without ErrorHandle. It invokes the Actor to work (set by
+ //! SetActor), and tries its Nexts if no result is produced,
+ //! until a Non Null Binder is produced.
+ //! But keep in mind that a Null Binder can allways be returned
+ //! if a Starting Entity has not been recognized at all.
Standard_EXPORT Handle(Transfer_Binder) TransferProduct (const Handle(Standard_Transient)& start);
Standard_Boolean theerrh;
DEFINE_STANDARD_ALLOC
+ //! Constructs an IndexedDataMap with NbBuckets
+ //! (defaulted to 1) buckets.
+ //! Note that the map will be automatically redimensioned
+ //! during its use if the number of entries becomes too large.
+ //! Use:
+ //! - the function Add to add an entry (key, item, index) in the map,
+ //! - operator() to read an item from an index, or to
+ //! assign a new value to this item,
+ //! - the function FindFromKey or ChangeFromKey to
+ //! read an item from a key, or to assign a new value to this item,
+ //! - the function RemoveLast to remove the last entry from the map,
+ //! - and other available edition and querying functions.
Standard_EXPORT Transfer_TransferMapOfProcessForFinder(const Standard_Integer NbBuckets = 1);
+ //! Replace the content of this map by the content of
+ //! the map <Other>.
Standard_EXPORT Transfer_TransferMapOfProcessForFinder& Assign (const Transfer_TransferMapOfProcessForFinder& Other);
Transfer_TransferMapOfProcessForFinder& operator = (const Transfer_TransferMapOfProcessForFinder& Other)
{
return Assign(Other);
}
+ //! Changes the number of buckets of <me> to be
+ //! <NbBuckets>. The entries (key + item + index) already
+ //! stored in this map are maintained.
Standard_EXPORT void ReSize (const Standard_Integer NbBuckets);
+ //! Removes all keys in the map.
Standard_EXPORT void Clear();
~Transfer_TransferMapOfProcessForFinder()
{
Clear();
}
+ //! Adds the Key <K> to the Map <me>. Returns the
+ //! index of the Key. The key is new in the map if
+ //! Extent has been incremented. The Item <I> is
+ //! stored with the key. If the key was already in the
+ //! map the previous item is not replaced by <I>.
Standard_EXPORT Standard_Integer Add (const Handle(Transfer_Finder)& K, const Handle(Transfer_Binder)& I);
+ //! Substitutes the Key at index <I> with <K>. <I>
+ //! must be a valid index, <K> must be a new key. <T>
+ //! becomes the Item stored with <K>.
+ //! Trigger: Raises OutOfRange if I < 1 or I > Extent.
+ //! Raises DomainError if Contains(K).
Standard_EXPORT void Substitute (const Standard_Integer I, const Handle(Transfer_Finder)& K, const Handle(Transfer_Binder)& T);
+ //! Removes the last key entered in the map, i.e the
+ //! key of index Extent().
+ //! I must be a valid index and K must be a new key.
+ //! Exceptions
+ //! - Standard_OutOfRange if the index I is less than 1 or
+ //! greater than the number of entries in this map.
+ //! - Standard_DomainError if the key K is already in this map.
Standard_EXPORT void RemoveLast();
+ //! Returns True if the key <K> is stored in the map <me>.
Standard_EXPORT Standard_Boolean Contains (const Handle(Transfer_Finder)& K) const;
+ //! Returns the Key of index <I>.
+ //! Exceptions
+ //! Standard_OutOfRange if I is less than 1 or greater than
+ //! the number of entries in this map.
Standard_EXPORT const Handle(Transfer_Finder)& FindKey (const Standard_Integer I) const;
+ //! Returns the Item of index <I>.
Standard_EXPORT const Handle(Transfer_Binder)& FindFromIndex (const Standard_Integer I) const;
const Handle(Transfer_Binder)& operator () (const Standard_Integer I) const
{
return FindFromIndex(I);
}
+ //! Returns the Item of index <I>. The Item can be
+ //! modified with the syntax aMap(Index) = newItem.
Standard_EXPORT Handle(Transfer_Binder)& ChangeFromIndex (const Standard_Integer I);
Handle(Transfer_Binder)& operator () (const Standard_Integer I)
{
return ChangeFromIndex(I);
}
+ //! Returns the index of the key <K>.
+ //! Returns 0 if K is not in the map.
Standard_EXPORT Standard_Integer FindIndex (const Handle(Transfer_Finder)& K) const;
+ //! Returns the Item of the key <K>
+ //! Trigger: Raises NoSuchObject if K is not in the map.
Standard_EXPORT const Handle(Transfer_Binder)& FindFromKey (const Handle(Transfer_Finder)& K) const;
+ //! Returns the Item of the key <K>
+ //! Trigger: Raises NoSuchObject if K is not in the map.
Standard_EXPORT Handle(Transfer_Binder)& ChangeFromKey (const Handle(Transfer_Finder)& K);
+ //! Returns the address of Item of the key <K>
+ //! or NULL if K is not in the map.
Standard_EXPORT Standard_Address FindFromKey1 (const Handle(Transfer_Finder)& K) const;
+ //! Returns the address of Item of the key <K>
+ //! or NULL if K is not in the map.
Standard_EXPORT Standard_Address ChangeFromKey1 (const Handle(Transfer_Finder)& K);
private:
+ //! As copying Map is an expensive operation it is
+ //! incorrect to do it implicitly. This constructor
+ //! will raise an error if the Map is not empty. To copy the
+ //! content of a Map use the Assign method (operator =).
Standard_EXPORT Transfer_TransferMapOfProcessForFinder(const Transfer_TransferMapOfProcessForFinder& Other);
DEFINE_STANDARD_ALLOC
+ //! Constructs an IndexedDataMap with NbBuckets
+ //! (defaulted to 1) buckets.
+ //! Note that the map will be automatically redimensioned
+ //! during its use if the number of entries becomes too large.
+ //! Use:
+ //! - the function Add to add an entry (key, item, index) in the map,
+ //! - operator() to read an item from an index, or to
+ //! assign a new value to this item,
+ //! - the function FindFromKey or ChangeFromKey to
+ //! read an item from a key, or to assign a new value to this item,
+ //! - the function RemoveLast to remove the last entry from the map,
+ //! - and other available edition and querying functions.
Standard_EXPORT Transfer_TransferMapOfProcessForTransient(const Standard_Integer NbBuckets = 1);
+ //! Replace the content of this map by the content of
+ //! the map <Other>.
Standard_EXPORT Transfer_TransferMapOfProcessForTransient& Assign (const Transfer_TransferMapOfProcessForTransient& Other);
Transfer_TransferMapOfProcessForTransient& operator = (const Transfer_TransferMapOfProcessForTransient& Other)
{
return Assign(Other);
}
+ //! Changes the number of buckets of <me> to be
+ //! <NbBuckets>. The entries (key + item + index) already
+ //! stored in this map are maintained.
Standard_EXPORT void ReSize (const Standard_Integer NbBuckets);
+ //! Removes all keys in the map.
Standard_EXPORT void Clear();
~Transfer_TransferMapOfProcessForTransient()
{
Clear();
}
+ //! Adds the Key <K> to the Map <me>. Returns the
+ //! index of the Key. The key is new in the map if
+ //! Extent has been incremented. The Item <I> is
+ //! stored with the key. If the key was already in the
+ //! map the previous item is not replaced by <I>.
Standard_EXPORT Standard_Integer Add (const Handle(Standard_Transient)& K, const Handle(Transfer_Binder)& I);
+ //! Substitutes the Key at index <I> with <K>. <I>
+ //! must be a valid index, <K> must be a new key. <T>
+ //! becomes the Item stored with <K>.
+ //! Trigger: Raises OutOfRange if I < 1 or I > Extent.
+ //! Raises DomainError if Contains(K).
Standard_EXPORT void Substitute (const Standard_Integer I, const Handle(Standard_Transient)& K, const Handle(Transfer_Binder)& T);
+ //! Removes the last key entered in the map, i.e the
+ //! key of index Extent().
+ //! I must be a valid index and K must be a new key.
+ //! Exceptions
+ //! - Standard_OutOfRange if the index I is less than 1 or
+ //! greater than the number of entries in this map.
+ //! - Standard_DomainError if the key K is already in this map.
Standard_EXPORT void RemoveLast();
+ //! Returns True if the key <K> is stored in the map <me>.
Standard_EXPORT Standard_Boolean Contains (const Handle(Standard_Transient)& K) const;
+ //! Returns the Key of index <I>.
+ //! Exceptions
+ //! Standard_OutOfRange if I is less than 1 or greater than
+ //! the number of entries in this map.
Standard_EXPORT const Handle(Standard_Transient)& FindKey (const Standard_Integer I) const;
+ //! Returns the Item of index <I>.
Standard_EXPORT const Handle(Transfer_Binder)& FindFromIndex (const Standard_Integer I) const;
const Handle(Transfer_Binder)& operator () (const Standard_Integer I) const
{
return FindFromIndex(I);
}
+ //! Returns the Item of index <I>. The Item can be
+ //! modified with the syntax aMap(Index) = newItem.
Standard_EXPORT Handle(Transfer_Binder)& ChangeFromIndex (const Standard_Integer I);
Handle(Transfer_Binder)& operator () (const Standard_Integer I)
{
return ChangeFromIndex(I);
}
+ //! Returns the index of the key <K>.
+ //! Returns 0 if K is not in the map.
Standard_EXPORT Standard_Integer FindIndex (const Handle(Standard_Transient)& K) const;
+ //! Returns the Item of the key <K>
+ //! Trigger: Raises NoSuchObject if K is not in the map.
Standard_EXPORT const Handle(Transfer_Binder)& FindFromKey (const Handle(Standard_Transient)& K) const;
+ //! Returns the Item of the key <K>
+ //! Trigger: Raises NoSuchObject if K is not in the map.
Standard_EXPORT Handle(Transfer_Binder)& ChangeFromKey (const Handle(Standard_Transient)& K);
+ //! Returns the address of Item of the key <K>
+ //! or NULL if K is not in the map.
Standard_EXPORT Standard_Address FindFromKey1 (const Handle(Standard_Transient)& K) const;
+ //! Returns the address of Item of the key <K>
+ //! or NULL if K is not in the map.
Standard_EXPORT Standard_Address ChangeFromKey1 (const Handle(Standard_Transient)& K);
private:
+ //! As copying Map is an expensive operation it is
+ //! incorrect to do it implicitly. This constructor
+ //! will raise an error if the Map is not empty. To copy the
+ //! content of a Map use the Assign method (operator =).
Standard_EXPORT Transfer_TransferMapOfProcessForTransient(const Transfer_TransferMapOfProcessForTransient& Other);
public:
+ //! Creates a Mapper with a Value. This Value can then not be
+ //! changed. It is used by the Hasher to compute the HashCode,
+ //! which will then be stored for an immediate reading.
Standard_EXPORT Transfer_TransientMapper(const Handle(Standard_Transient)& akey);
+ //! Returns the contained value
Standard_EXPORT const Handle(Standard_Transient)& Value() const;
+ //! Specific testof equallity : defined as False if <other> has
+ //! not the same true Type, else contents are compared (by
+ //! C++ operator ==)
Standard_EXPORT Standard_Boolean Equates (const Handle(Transfer_Finder)& other) const;
+ //! Returns the Type of the Value. By default, returns the
+ //! DynamicType of <me>, but can be redefined
Standard_EXPORT virtual Handle(Standard_Type) ValueType() const Standard_OVERRIDE;
+ //! Returns the name of the Type of the Value. Default is name
+ //! of ValueType, unless it is for a non-handled object
Standard_EXPORT virtual Standard_CString ValueTypeName() const Standard_OVERRIDE;
public:
+ //! Creates a Mapper with a Value. This Value can then not be
+ //! changed. It is used by the Hasher to compute the HashCode,
+ //! which will then be stored for an immediate reading.
Standard_EXPORT TransferBRep_OrientedShapeMapper(const TopoDS_Shape& akey);
+ //! Returns the contained value
Standard_EXPORT const TopoDS_Shape& Value() const;
+ //! Specific testof equallity : defined as False if <other> has
+ //! not the same true Type, else contents are compared (by
+ //! C++ operator ==)
Standard_EXPORT Standard_Boolean Equates (const Handle(Transfer_Finder)& other) const;
+ //! Returns the Type of the Value. By default, returns the
+ //! DynamicType of <me>, but can be redefined
Standard_EXPORT virtual Handle(Standard_Type) ValueType() const Standard_OVERRIDE;
+ //! Returns the name of the Type of the Value. Default is name
+ //! of ValueType, unless it is for a non-handled object
Standard_EXPORT virtual Standard_CString ValueTypeName() const Standard_OVERRIDE;
public:
+ //! Creates a Mapper with a Value. This Value can then not be
+ //! changed. It is used by the Hasher to compute the HashCode,
+ //! which will then be stored for an immediate reading.
Standard_EXPORT TransferBRep_ShapeMapper(const TopoDS_Shape& akey);
+ //! Returns the contained value
Standard_EXPORT const TopoDS_Shape& Value() const;
+ //! Specific testof equallity : defined as False if <other> has
+ //! not the same true Type, else contents are compared (by
+ //! C++ operator ==)
Standard_EXPORT Standard_Boolean Equates (const Handle(Transfer_Finder)& other) const;
+ //! Returns the Type of the Value. By default, returns the
+ //! DynamicType of <me>, but can be redefined
Standard_EXPORT virtual Handle(Standard_Type) ValueType() const Standard_OVERRIDE;
+ //! Returns the name of the Type of the Value. Default is name
+ //! of ValueType, unless it is for a non-handled object
Standard_EXPORT virtual Standard_CString ValueTypeName() const Standard_OVERRIDE;