From 37782ec21f4767bceb0af7d17227b6a1b4bcc663 Mon Sep 17 00:00:00 2001 From: Benjamin Bihler Date: Thu, 17 Mar 2016 14:19:37 +0100 Subject: [PATCH] 0027281: Some classes in GCPnts are not const-correct const keyword has been added to the method parameters --- src/GCPnts/GCPnts_AbscissaPoint.gxx | 22 +++++++------- src/GCPnts/GCPnts_AbscissaPoint.hxx | 32 ++++++++++---------- src/GCPnts/GCPnts_QuasiUniformAbscissa.gxx | 8 ++--- src/GCPnts/GCPnts_QuasiUniformAbscissa.hxx | 16 +++++----- src/GCPnts/GCPnts_QuasiUniformDeflection.gxx | 12 ++++---- src/GCPnts/GCPnts_QuasiUniformDeflection.hxx | 16 +++++----- src/GCPnts/GCPnts_UniformAbscissa.gxx | 24 +++++++-------- src/GCPnts/GCPnts_UniformAbscissa.hxx | 32 ++++++++++---------- src/GCPnts/GCPnts_UniformDeflection.gxx | 12 ++++---- src/GCPnts/GCPnts_UniformDeflection.hxx | 16 +++++----- 10 files changed, 95 insertions(+), 95 deletions(-) diff --git a/src/GCPnts/GCPnts_AbscissaPoint.gxx b/src/GCPnts/GCPnts_AbscissaPoint.gxx index f9d2989594..5cba7bb154 100644 --- a/src/GCPnts/GCPnts_AbscissaPoint.gxx +++ b/src/GCPnts/GCPnts_AbscissaPoint.gxx @@ -27,7 +27,7 @@ #include #include -static GCPnts_AbscissaType computeType( TheCurve& C, +static GCPnts_AbscissaType computeType( const TheCurve& C, Standard_Real& Ratio) { GCPnts_AbscissaType LocalType ; @@ -77,7 +77,7 @@ static GCPnts_AbscissaType computeType( TheCurve& C, // using Ui as initial guess static void Compute(CPnts_AbscissaPoint& theComputer, - TheCurve& C, + const TheCurve& C, Standard_Real& Abscis, Standard_Real& U0, Standard_Real& Ui, @@ -161,7 +161,7 @@ static void Compute(CPnts_AbscissaPoint& theComputer, // performs more apropriate tolerance managment static void AdvCompute(CPnts_AbscissaPoint& theComputer, - TheCurve& C, + const TheCurve& C, Standard_Real& Abscis, Standard_Real& U0, Standard_Real& Ui, @@ -284,7 +284,7 @@ static void AdvCompute(CPnts_AbscissaPoint& theComputer, //purpose : //======================================================================= -Standard_Real GCPnts_AbscissaPoint::Length(TheCurve& C) +Standard_Real GCPnts_AbscissaPoint::Length(const TheCurve& C) { return GCPnts_AbscissaPoint::Length(C,C.FirstParameter(), C.LastParameter()); @@ -295,7 +295,7 @@ Standard_Real GCPnts_AbscissaPoint::Length(TheCurve& C) //purpose : //======================================================================= -Standard_Real GCPnts_AbscissaPoint::Length(TheCurve& C, +Standard_Real GCPnts_AbscissaPoint::Length(const TheCurve& C, const Standard_Real Tol) { return GCPnts_AbscissaPoint::Length(C,C.FirstParameter(), @@ -308,7 +308,7 @@ Standard_Real GCPnts_AbscissaPoint::Length(TheCurve& C, //purpose : //======================================================================= -Standard_Real GCPnts_AbscissaPoint::Length(TheCurve& C, +Standard_Real GCPnts_AbscissaPoint::Length(const TheCurve& C, const Standard_Real U1, const Standard_Real U2) { @@ -348,7 +348,7 @@ Standard_Real GCPnts_AbscissaPoint::Length(TheCurve& C, //purpose : //======================================================================= -Standard_Real GCPnts_AbscissaPoint::Length(TheCurve& C, +Standard_Real GCPnts_AbscissaPoint::Length(const TheCurve& C, const Standard_Real U1, const Standard_Real U2, const Standard_Real Tol) @@ -392,7 +392,7 @@ Standard_Real GCPnts_AbscissaPoint::Length(TheCurve& C, //======================================================================= GCPnts_AbscissaPoint::GCPnts_AbscissaPoint - (TheCurve& C, + (const TheCurve& C, const Standard_Real Abscissa, const Standard_Real U0) { @@ -415,7 +415,7 @@ GCPnts_AbscissaPoint::GCPnts_AbscissaPoint GCPnts_AbscissaPoint::GCPnts_AbscissaPoint (const Standard_Real Tol, - TheCurve& C, + const TheCurve& C, const Standard_Real Abscissa, const Standard_Real U0) { @@ -443,7 +443,7 @@ GCPnts_AbscissaPoint::GCPnts_AbscissaPoint //======================================================================= GCPnts_AbscissaPoint::GCPnts_AbscissaPoint - (TheCurve& C, + (const TheCurve& C, const Standard_Real Abscissa, const Standard_Real U0, const Standard_Real Ui) @@ -461,7 +461,7 @@ GCPnts_AbscissaPoint::GCPnts_AbscissaPoint //======================================================================= GCPnts_AbscissaPoint::GCPnts_AbscissaPoint - (TheCurve& C, + (const TheCurve& C, const Standard_Real Abscissa, const Standard_Real U0, const Standard_Real Ui, diff --git a/src/GCPnts/GCPnts_AbscissaPoint.hxx b/src/GCPnts/GCPnts_AbscissaPoint.hxx index 82c01c34e8..7a930ca7a8 100644 --- a/src/GCPnts/GCPnts_AbscissaPoint.hxx +++ b/src/GCPnts/GCPnts_AbscissaPoint.hxx @@ -47,25 +47,25 @@ public: //! Computes the length of the Curve . - Standard_EXPORT static Standard_Real Length (Adaptor3d_Curve& C); + Standard_EXPORT static Standard_Real Length (const Adaptor3d_Curve& C); //! Computes the length of the Curve . - Standard_EXPORT static Standard_Real Length (Adaptor2d_Curve2d& C); + Standard_EXPORT static Standard_Real Length (const Adaptor2d_Curve2d& C); //! Computes the length of the Curve with the given tolerance. - Standard_EXPORT static Standard_Real Length (Adaptor3d_Curve& C, const Standard_Real Tol); + Standard_EXPORT static Standard_Real Length (const Adaptor3d_Curve& C, const Standard_Real Tol); //! Computes the length of the Curve with the given tolerance. - Standard_EXPORT static Standard_Real Length (Adaptor2d_Curve2d& C, const Standard_Real Tol); + Standard_EXPORT static Standard_Real Length (const Adaptor2d_Curve2d& C, const Standard_Real Tol); //! Computes the length of the Curve . - Standard_EXPORT static Standard_Real Length (Adaptor3d_Curve& C, const Standard_Real U1, const Standard_Real U2); + Standard_EXPORT static Standard_Real Length (const Adaptor3d_Curve& C, const Standard_Real U1, const Standard_Real U2); //! Computes the length of the Curve . - Standard_EXPORT static Standard_Real Length (Adaptor2d_Curve2d& C, const Standard_Real U1, const Standard_Real U2); + Standard_EXPORT static Standard_Real Length (const Adaptor2d_Curve2d& C, const Standard_Real U1, const Standard_Real U2); //! Computes the length of the Curve with the given tolerance. - Standard_EXPORT static Standard_Real Length (Adaptor3d_Curve& C, const Standard_Real U1, const Standard_Real U2, const Standard_Real Tol); + Standard_EXPORT static Standard_Real Length (const Adaptor3d_Curve& C, const Standard_Real U1, const Standard_Real U2, const Standard_Real Tol); //! Computes the length of the Curve with the given tolerance. //! Constructs an empty algorithm. This function is used @@ -73,55 +73,55 @@ public: //! of a curve (or a series of curves). //! Warning //! The function IsDone will return the value false after the use of this function. - Standard_EXPORT static Standard_Real Length (Adaptor2d_Curve2d& C, const Standard_Real U1, const Standard_Real U2, const Standard_Real Tol); + Standard_EXPORT static Standard_Real Length (const Adaptor2d_Curve2d& C, const Standard_Real U1, const Standard_Real U2, const Standard_Real Tol); Standard_EXPORT GCPnts_AbscissaPoint(); //! the algorithm computes a point on a curve at the //! distance from the point of parameter . - Standard_EXPORT GCPnts_AbscissaPoint(Adaptor3d_Curve& C, const Standard_Real Abscissa, const Standard_Real U0); + Standard_EXPORT GCPnts_AbscissaPoint(const Adaptor3d_Curve& C, const Standard_Real Abscissa, const Standard_Real U0); //! the algorithm computes a point on a curve at //! the distance from the point of parameter //! with the given tolerance. - Standard_EXPORT GCPnts_AbscissaPoint(const Standard_Real Tol, Adaptor3d_Curve& C, const Standard_Real Abscissa, const Standard_Real U0); + Standard_EXPORT GCPnts_AbscissaPoint(const Standard_Real Tol, const Adaptor3d_Curve& C, const Standard_Real Abscissa, const Standard_Real U0); //! the algorithm computes a point on a curve at //! the distance from the point of parameter //! with the given tolerance. - Standard_EXPORT GCPnts_AbscissaPoint(const Standard_Real Tol, Adaptor2d_Curve2d& C, const Standard_Real Abscissa, const Standard_Real U0); + Standard_EXPORT GCPnts_AbscissaPoint(const Standard_Real Tol, const Adaptor2d_Curve2d& C, const Standard_Real Abscissa, const Standard_Real U0); //! the algorithm computes a point on a curve at the //! distance from the point of parameter . - Standard_EXPORT GCPnts_AbscissaPoint(Adaptor2d_Curve2d& C, const Standard_Real Abscissa, const Standard_Real U0); + Standard_EXPORT GCPnts_AbscissaPoint(const Adaptor2d_Curve2d& C, const Standard_Real Abscissa, const Standard_Real U0); //! the algorithm computes a point on a curve at the //! distance from the point of parameter . //! is the starting value used in the iterative process //! which find the solution, it must be close to the final //! solution - Standard_EXPORT GCPnts_AbscissaPoint(Adaptor3d_Curve& C, const Standard_Real Abscissa, const Standard_Real U0, const Standard_Real Ui); + Standard_EXPORT GCPnts_AbscissaPoint(const Adaptor3d_Curve& C, const Standard_Real Abscissa, const Standard_Real U0, const Standard_Real Ui); //! the algorithm computes a point on a curve at the //! distance from the point of parameter . //! is the starting value used in the iterative process //! which find the solution, it must be closed to the final //! solution - Standard_EXPORT GCPnts_AbscissaPoint(Adaptor2d_Curve2d& C, const Standard_Real Abscissa, const Standard_Real U0, const Standard_Real Ui); + Standard_EXPORT GCPnts_AbscissaPoint(const Adaptor2d_Curve2d& C, const Standard_Real Abscissa, const Standard_Real U0, const Standard_Real Ui); //! the algorithm computes a point on a curve at the //! distance from the point of parameter . //! is the starting value used in the iterative process //! which find the solution, it must be close to the final //! solution - Standard_EXPORT GCPnts_AbscissaPoint(Adaptor3d_Curve& C, const Standard_Real Abscissa, const Standard_Real U0, const Standard_Real Ui, const Standard_Real Tol); + Standard_EXPORT GCPnts_AbscissaPoint(const Adaptor3d_Curve& C, const Standard_Real Abscissa, const Standard_Real U0, const Standard_Real Ui, const Standard_Real Tol); //! the algorithm computes a point on a curve at the //! distance from the point of parameter . //! is the starting value used in the iterative process //! which find the solution, it must be close to the final //! solution - Standard_EXPORT GCPnts_AbscissaPoint(Adaptor2d_Curve2d& C, const Standard_Real Abscissa, const Standard_Real U0, const Standard_Real Ui, const Standard_Real Tol); + Standard_EXPORT GCPnts_AbscissaPoint(const Adaptor2d_Curve2d& C, const Standard_Real Abscissa, const Standard_Real U0, const Standard_Real Ui, const Standard_Real Tol); //! True if the computation was successful, False otherwise. //! IsDone is a protection against: diff --git a/src/GCPnts/GCPnts_QuasiUniformAbscissa.gxx b/src/GCPnts/GCPnts_QuasiUniformAbscissa.gxx index c79914482a..9ee09125f8 100644 --- a/src/GCPnts/GCPnts_QuasiUniformAbscissa.gxx +++ b/src/GCPnts/GCPnts_QuasiUniformAbscissa.gxx @@ -19,7 +19,7 @@ //purpose : //======================================================================= -GCPnts_QuasiUniformAbscissa::GCPnts_QuasiUniformAbscissa(TheCurve& C, +GCPnts_QuasiUniformAbscissa::GCPnts_QuasiUniformAbscissa(const TheCurve& C, const Standard_Integer NbPoints) { Initialize(C, NbPoints); @@ -30,7 +30,7 @@ GCPnts_QuasiUniformAbscissa::GCPnts_QuasiUniformAbscissa(TheCurve& C, //purpose : //======================================================================= -GCPnts_QuasiUniformAbscissa::GCPnts_QuasiUniformAbscissa(TheCurve& C, +GCPnts_QuasiUniformAbscissa::GCPnts_QuasiUniformAbscissa(const TheCurve& C, const Standard_Integer NbPoints, const Standard_Real U1, const Standard_Real U2) @@ -43,7 +43,7 @@ GCPnts_QuasiUniformAbscissa::GCPnts_QuasiUniformAbscissa(TheCurve& C, //purpose : //======================================================================= -void GCPnts_QuasiUniformAbscissa::Initialize(TheCurve& C, +void GCPnts_QuasiUniformAbscissa::Initialize(const TheCurve& C, const Standard_Integer NbPoints) { Initialize(C, NbPoints, C.FirstParameter(), @@ -57,7 +57,7 @@ void GCPnts_QuasiUniformAbscissa::Initialize(TheCurve& C, // equal length. It returns array of parameters in the // control points. //======================================================================= -void GCPnts_QuasiUniformAbscissa::Initialize(TheCurve& C, +void GCPnts_QuasiUniformAbscissa::Initialize(const TheCurve& C, const Standard_Integer NbPoints, const Standard_Real U1, const Standard_Real U2) diff --git a/src/GCPnts/GCPnts_QuasiUniformAbscissa.hxx b/src/GCPnts/GCPnts_QuasiUniformAbscissa.hxx index ee205b603f..47258423f6 100644 --- a/src/GCPnts/GCPnts_QuasiUniformAbscissa.hxx +++ b/src/GCPnts/GCPnts_QuasiUniformAbscissa.hxx @@ -54,7 +54,7 @@ public: //! Computes a uniform abscissa distribution of points //! - on the curve C where Abscissa is the curvilinear distance between //! two consecutive points of the distribution. - Standard_EXPORT GCPnts_QuasiUniformAbscissa(Adaptor3d_Curve& C, const Standard_Integer NbPoints); + Standard_EXPORT GCPnts_QuasiUniformAbscissa(const Adaptor3d_Curve& C, const Standard_Integer NbPoints); //! Computes a uniform abscissa distribution of points //! on the part of curve C limited by the two parameter values U1 and U2, @@ -84,30 +84,30 @@ public: //! Adaptor2d_Curve2d curve) or a 3D curve from //! the package Geom (in the case of an Adaptor3d_Curve curve), //! - and those required on the curve by the computation algorithm. - Standard_EXPORT GCPnts_QuasiUniformAbscissa(Adaptor3d_Curve& C, const Standard_Integer NbPoints, const Standard_Real U1, const Standard_Real U2); + Standard_EXPORT GCPnts_QuasiUniformAbscissa(const Adaptor3d_Curve& C, const Standard_Integer NbPoints, const Standard_Real U1, const Standard_Real U2); //! Initialize the algoritms with , and - Standard_EXPORT void Initialize (Adaptor3d_Curve& C, const Standard_Integer NbPoints); + Standard_EXPORT void Initialize (const Adaptor3d_Curve& C, const Standard_Integer NbPoints); //! Initialize the algoritms with , , , //! . - Standard_EXPORT void Initialize (Adaptor3d_Curve& C, const Standard_Integer NbPoints, const Standard_Real U1, const Standard_Real U2); + Standard_EXPORT void Initialize (const Adaptor3d_Curve& C, const Standard_Integer NbPoints, const Standard_Real U1, const Standard_Real U2); //! Computes a uniform abscissa distribution of points on //! the Curve2d . //! defines the nomber of desired points. - Standard_EXPORT GCPnts_QuasiUniformAbscissa(Adaptor2d_Curve2d& C, const Standard_Integer NbPoints); + Standard_EXPORT GCPnts_QuasiUniformAbscissa(const Adaptor2d_Curve2d& C, const Standard_Integer NbPoints); //! Computes a Uniform abscissa distribution of points //! on a part of the Curve2d . - Standard_EXPORT GCPnts_QuasiUniformAbscissa(Adaptor2d_Curve2d& C, const Standard_Integer NbPoints, const Standard_Real U1, const Standard_Real U2); + Standard_EXPORT GCPnts_QuasiUniformAbscissa(const Adaptor2d_Curve2d& C, const Standard_Integer NbPoints, const Standard_Real U1, const Standard_Real U2); //! Initialize the algoritms with , and - Standard_EXPORT void Initialize (Adaptor2d_Curve2d& C, const Standard_Integer NbPoints); + Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& C, const Standard_Integer NbPoints); //! Initialize the algoritms with , , , //! . - Standard_EXPORT void Initialize (Adaptor2d_Curve2d& C, const Standard_Integer NbPoints, const Standard_Real U1, const Standard_Real U2); + Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& C, const Standard_Integer NbPoints, const Standard_Real U1, const Standard_Real U2); //! Returns true if the computation was successful. //! IsDone is a protection against: diff --git a/src/GCPnts/GCPnts_QuasiUniformDeflection.gxx b/src/GCPnts/GCPnts_QuasiUniformDeflection.gxx index 33ebf78d12..59ff8ddbda 100644 --- a/src/GCPnts/GCPnts_QuasiUniformDeflection.gxx +++ b/src/GCPnts/GCPnts_QuasiUniformDeflection.gxx @@ -105,7 +105,7 @@ static Standard_Boolean PerformCircular (const TheCurve& C, //function : GetDefType //purpose : //======================================================================= -static GCPnts_DeflectionType GetDefType (TheCurve& C) +static GCPnts_DeflectionType GetDefType (const TheCurve& C) { if (C.NbIntervals(GeomAbs_C1) > 1) return GCPnts_DefComposite; @@ -190,7 +190,7 @@ static Standard_Boolean PerformCurve (TColStd_SequenceOfReal& Parameters, //======================================================================= static Standard_Boolean PerformComposite (TColStd_SequenceOfReal& Parameters, TColgp_SequenceOfPnt& Points, - TheCurve& C, + const TheCurve& C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, @@ -233,7 +233,7 @@ static Standard_Boolean PerformComposite (TColStd_SequenceOfReal& Parameters, //purpose : //======================================================================= GCPnts_QuasiUniformDeflection::GCPnts_QuasiUniformDeflection - (TheCurve& C, + (const TheCurve& C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, @@ -248,7 +248,7 @@ GCPnts_QuasiUniformDeflection::GCPnts_QuasiUniformDeflection //purpose : //======================================================================= GCPnts_QuasiUniformDeflection::GCPnts_QuasiUniformDeflection - (TheCurve& C, + (const TheCurve& C, const Standard_Real Deflection, const GeomAbs_Shape Continuity) { @@ -260,7 +260,7 @@ GCPnts_QuasiUniformDeflection::GCPnts_QuasiUniformDeflection //function : Initialize //purpose : //======================================================================= -void GCPnts_QuasiUniformDeflection::Initialize (TheCurve& C, +void GCPnts_QuasiUniformDeflection::Initialize (const TheCurve& C, const Standard_Real Deflection, const GeomAbs_Shape Continuity) { @@ -275,7 +275,7 @@ void GCPnts_QuasiUniformDeflection::Initialize (TheCurve& C, //======================================================================= void GCPnts_QuasiUniformDeflection::Initialize - (TheCurve& C, + (const TheCurve& C, const Standard_Real Deflection, const Standard_Real theU1, const Standard_Real theU2, diff --git a/src/GCPnts/GCPnts_QuasiUniformDeflection.hxx b/src/GCPnts/GCPnts_QuasiUniformDeflection.hxx index 6e8e5c17eb..c4165e9784 100644 --- a/src/GCPnts/GCPnts_QuasiUniformDeflection.hxx +++ b/src/GCPnts/GCPnts_QuasiUniformDeflection.hxx @@ -62,15 +62,15 @@ public: //! Computes a QuasiUniform Deflection distribution //! of points on the Curve . - Standard_EXPORT GCPnts_QuasiUniformDeflection(Adaptor3d_Curve& C, const Standard_Real Deflection, const GeomAbs_Shape Continuity = GeomAbs_C1); + Standard_EXPORT GCPnts_QuasiUniformDeflection(const Adaptor3d_Curve& C, const Standard_Real Deflection, const GeomAbs_Shape Continuity = GeomAbs_C1); //! Computes a QuasiUniform Deflection distribution //! of points on the Curve . - Standard_EXPORT GCPnts_QuasiUniformDeflection(Adaptor2d_Curve2d& C, const Standard_Real Deflection, const GeomAbs_Shape Continuity = GeomAbs_C1); + Standard_EXPORT GCPnts_QuasiUniformDeflection(const Adaptor2d_Curve2d& C, const Standard_Real Deflection, const GeomAbs_Shape Continuity = GeomAbs_C1); //! Computes a QuasiUniform Deflection distribution //! of points on a part of the Curve . - Standard_EXPORT GCPnts_QuasiUniformDeflection(Adaptor3d_Curve& C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, const GeomAbs_Shape Continuity = GeomAbs_C1); + Standard_EXPORT GCPnts_QuasiUniformDeflection(const Adaptor3d_Curve& C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, const GeomAbs_Shape Continuity = GeomAbs_C1); //! Computes a QuasiUniform Deflection distribution //! of points on a part of the Curve . @@ -120,17 +120,17 @@ public: //! Adaptor3d_Curve curve), //! - and those required on the curve by the //! computation algorithm. - Standard_EXPORT GCPnts_QuasiUniformDeflection(Adaptor2d_Curve2d& C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, const GeomAbs_Shape Continuity = GeomAbs_C1); + Standard_EXPORT GCPnts_QuasiUniformDeflection(const Adaptor2d_Curve2d& C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, const GeomAbs_Shape Continuity = GeomAbs_C1); //! Initialize the algoritms with , - Standard_EXPORT void Initialize (Adaptor3d_Curve& C, const Standard_Real Deflection, const GeomAbs_Shape Continuity = GeomAbs_C1); + Standard_EXPORT void Initialize (const Adaptor3d_Curve& C, const Standard_Real Deflection, const GeomAbs_Shape Continuity = GeomAbs_C1); //! Initialize the algoritms with , - Standard_EXPORT void Initialize (Adaptor2d_Curve2d& C, const Standard_Real Deflection, const GeomAbs_Shape Continuity = GeomAbs_C1); + Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& C, const Standard_Real Deflection, const GeomAbs_Shape Continuity = GeomAbs_C1); //! Initialize the algoritms with , , //! , - Standard_EXPORT void Initialize (Adaptor3d_Curve& C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, const GeomAbs_Shape Continuity = GeomAbs_C1); + Standard_EXPORT void Initialize (const Adaptor3d_Curve& C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, const GeomAbs_Shape Continuity = GeomAbs_C1); //! Initialize the algoritms with , , //! -- , @@ -179,7 +179,7 @@ public: //! Adaptor2d_Curve2d curve) or a 3D curve from //! the package Geom (in the case of an Adaptor3d_Curve curve), //! and those required on the curve by the computation algorithm. - Standard_EXPORT void Initialize (Adaptor2d_Curve2d& C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, const GeomAbs_Shape Continuity = GeomAbs_C1); + Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, const GeomAbs_Shape Continuity = GeomAbs_C1); //! Returns true if the computation was successful. diff --git a/src/GCPnts/GCPnts_UniformAbscissa.gxx b/src/GCPnts/GCPnts_UniformAbscissa.gxx index ac0b590489..095739b919 100644 --- a/src/GCPnts/GCPnts_UniformAbscissa.gxx +++ b/src/GCPnts/GCPnts_UniformAbscissa.gxx @@ -29,7 +29,7 @@ #include -static Standard_Real GetParameterLengthRatio(TheCurve& C) +static Standard_Real GetParameterLengthRatio(const TheCurve& C) { switch (C.GetType()) { @@ -55,7 +55,7 @@ static Standard_Real GetParameterLengthRatio(TheCurve& C) } -static GCPnts_AbscissaType GetAbsType(TheCurve& C) +static GCPnts_AbscissaType GetAbsType(const TheCurve& C) { if (C.NbIntervals(GeomAbs_C1) > 1) return GCPnts_AbsComposite; @@ -87,7 +87,7 @@ static GCPnts_AbscissaType GetAbsType(TheCurve& C) } static Standard_Boolean Perform(Handle(TColStd_HArray1OfReal)& HParameters, - TheCurve& C, + const TheCurve& C, const Standard_Real Abscissa, const Standard_Real U1, const Standard_Real U2, @@ -160,7 +160,7 @@ static Standard_Boolean Perform(Handle(TColStd_HArray1OfReal)& HParameters, static Standard_Boolean PerformLengthParametrized( Handle(TColStd_HArray1OfReal)& HParameters, - TheCurve& C, + const TheCurve& C, const Standard_Real Abscissa, const Standard_Real U1, const Standard_Real U2, @@ -222,7 +222,7 @@ PerformLengthParametrized( Handle(TColStd_HArray1OfReal)& HParameters, //purpose : //======================================================================= -void GCPnts_UniformAbscissa::Initialize (TheCurve& C, +void GCPnts_UniformAbscissa::Initialize (const TheCurve& C, const Standard_Real Abscissa, const Standard_Real Tol) { @@ -235,7 +235,7 @@ void GCPnts_UniformAbscissa::Initialize (TheCurve& C, //purpose : //======================================================================= -GCPnts_UniformAbscissa::GCPnts_UniformAbscissa (TheCurve& C, +GCPnts_UniformAbscissa::GCPnts_UniformAbscissa (const TheCurve& C, const Standard_Real Abscissa, const Standard_Real Tol) { @@ -247,7 +247,7 @@ GCPnts_UniformAbscissa::GCPnts_UniformAbscissa (TheCurve& C, //purpose : //======================================================================= -GCPnts_UniformAbscissa::GCPnts_UniformAbscissa (TheCurve& C, +GCPnts_UniformAbscissa::GCPnts_UniformAbscissa (const TheCurve& C, const Standard_Real Abscissa, const Standard_Real U1, const Standard_Real U2, @@ -261,7 +261,7 @@ GCPnts_UniformAbscissa::GCPnts_UniformAbscissa (TheCurve& C, //purpose : //======================================================================= -GCPnts_UniformAbscissa::GCPnts_UniformAbscissa(TheCurve& C, +GCPnts_UniformAbscissa::GCPnts_UniformAbscissa(const TheCurve& C, const Standard_Integer NbPoints, const Standard_Real Tol) { @@ -273,7 +273,7 @@ GCPnts_UniformAbscissa::GCPnts_UniformAbscissa(TheCurve& C, //purpose : //======================================================================= -GCPnts_UniformAbscissa::GCPnts_UniformAbscissa(TheCurve& C, +GCPnts_UniformAbscissa::GCPnts_UniformAbscissa(const TheCurve& C, const Standard_Integer NbPoints, const Standard_Real U1, const Standard_Real U2, @@ -287,7 +287,7 @@ GCPnts_UniformAbscissa::GCPnts_UniformAbscissa(TheCurve& C, //purpose : //======================================================================= -void GCPnts_UniformAbscissa::Initialize(TheCurve& C, +void GCPnts_UniformAbscissa::Initialize(const TheCurve& C, const Standard_Real Abscissa, const Standard_Real U1, const Standard_Real U2, @@ -372,7 +372,7 @@ void GCPnts_UniformAbscissa::Initialize(TheCurve& C, //purpose : //======================================================================= -void GCPnts_UniformAbscissa::Initialize(TheCurve& C, +void GCPnts_UniformAbscissa::Initialize(const TheCurve& C, const Standard_Integer NbPoints, const Standard_Real Tol) { @@ -386,7 +386,7 @@ void GCPnts_UniformAbscissa::Initialize(TheCurve& C, //purpose : //======================================================================= -void GCPnts_UniformAbscissa::Initialize(TheCurve& C, +void GCPnts_UniformAbscissa::Initialize(const TheCurve& C, const Standard_Integer NbPoints, const Standard_Real U1, const Standard_Real U2, diff --git a/src/GCPnts/GCPnts_UniformAbscissa.hxx b/src/GCPnts/GCPnts_UniformAbscissa.hxx index 0d68911365..a95ed2cbfd 100644 --- a/src/GCPnts/GCPnts_UniformAbscissa.hxx +++ b/src/GCPnts/GCPnts_UniformAbscissa.hxx @@ -48,78 +48,78 @@ public: //! Computes a uniform abscissa distribution of points on //! the Curve . Parameter Toler is equal Precision::Confusion by default. //! It Is used for more precise calculation of curve length - Standard_EXPORT GCPnts_UniformAbscissa(Adaptor3d_Curve& C, const Standard_Real Abscissa, const Standard_Real Toler = -1); + Standard_EXPORT GCPnts_UniformAbscissa(const Adaptor3d_Curve& C, const Standard_Real Abscissa, const Standard_Real Toler = -1); //! Computes a Uniform abscissa distribution of points //! on a part of the Curve . Parameter Toler is equal Precision::Confusion by default. //! It Is used for more precise calculation of curve length - Standard_EXPORT GCPnts_UniformAbscissa(Adaptor3d_Curve& C, const Standard_Real Abscissa, const Standard_Real U1, const Standard_Real U2, const Standard_Real Toler = -1); + Standard_EXPORT GCPnts_UniformAbscissa(const Adaptor3d_Curve& C, const Standard_Real Abscissa, const Standard_Real U1, const Standard_Real U2, const Standard_Real Toler = -1); //! Computes a uniform abscissa distribution of points on //! the Curve . //! defines the nomber of desired points. //! Parameter Toler is equal Precision::Confusion by default. //! It Is used for more precise calculation of curve length - Standard_EXPORT GCPnts_UniformAbscissa(Adaptor3d_Curve& C, const Standard_Integer NbPoints, const Standard_Real Toler = -1); + Standard_EXPORT GCPnts_UniformAbscissa(const Adaptor3d_Curve& C, const Standard_Integer NbPoints, const Standard_Real Toler = -1); //! Computes a Uniform abscissa distribution of points //! on a part of the Curve . //! Parameter Toler is equal Precision::Confusion by default. //! It Is used for more precise calculation of curve length - Standard_EXPORT GCPnts_UniformAbscissa(Adaptor3d_Curve& C, const Standard_Integer NbPoints, const Standard_Real U1, const Standard_Real U2, const Standard_Real Toler = -1); + Standard_EXPORT GCPnts_UniformAbscissa(const Adaptor3d_Curve& C, const Standard_Integer NbPoints, const Standard_Real U1, const Standard_Real U2, const Standard_Real Toler = -1); //! Initialize the algoritms with , , - Standard_EXPORT void Initialize (Adaptor3d_Curve& C, const Standard_Real Abscissa, const Standard_Real Toler = -1); + Standard_EXPORT void Initialize (const Adaptor3d_Curve& C, const Standard_Real Abscissa, const Standard_Real Toler = -1); //! Initialize the algoritms with , , , //! , - Standard_EXPORT void Initialize (Adaptor3d_Curve& C, const Standard_Real Abscissa, const Standard_Real U1, const Standard_Real U2, const Standard_Real Toler = -1); + Standard_EXPORT void Initialize (const Adaptor3d_Curve& C, const Standard_Real Abscissa, const Standard_Real U1, const Standard_Real U2, const Standard_Real Toler = -1); //! Initialize the algoritms with , , and - Standard_EXPORT void Initialize (Adaptor3d_Curve& C, const Standard_Integer NbPoints, const Standard_Real Toler = -1); + Standard_EXPORT void Initialize (const Adaptor3d_Curve& C, const Standard_Integer NbPoints, const Standard_Real Toler = -1); //! Initialize the algoritms with , , , //! , . - Standard_EXPORT void Initialize (Adaptor3d_Curve& C, const Standard_Integer NbPoints, const Standard_Real U1, const Standard_Real U2, const Standard_Real Toler = -1); + Standard_EXPORT void Initialize (const Adaptor3d_Curve& C, const Standard_Integer NbPoints, const Standard_Real U1, const Standard_Real U2, const Standard_Real Toler = -1); //! Computes a uniform abscissa distribution of points on //! the Curve2d . //! Parameter Toler is equal Precision::Confusion by default. //! It Is used for more precise calculation of curve length - Standard_EXPORT GCPnts_UniformAbscissa(Adaptor2d_Curve2d& C, const Standard_Real Abscissa, const Standard_Real Toler = -1); + Standard_EXPORT GCPnts_UniformAbscissa(const Adaptor2d_Curve2d& C, const Standard_Real Abscissa, const Standard_Real Toler = -1); //! Computes a Uniform abscissa distribution of points //! on a part of the Curve2d . //! Parameter Toler is equal Precision::Confusion by default. //! It Is used for more precise calculation of curve length - Standard_EXPORT GCPnts_UniformAbscissa(Adaptor2d_Curve2d& C, const Standard_Real Abscissa, const Standard_Real U1, const Standard_Real U2, const Standard_Real Toler = -1); + Standard_EXPORT GCPnts_UniformAbscissa(const Adaptor2d_Curve2d& C, const Standard_Real Abscissa, const Standard_Real U1, const Standard_Real U2, const Standard_Real Toler = -1); //! Computes a uniform abscissa distribution of points on //! the Curve2d . //! defines the nomber of desired points. //! Parameter Toler is equal Precision::Confusion by default. //! It Is used for more precise calculation of curve length - Standard_EXPORT GCPnts_UniformAbscissa(Adaptor2d_Curve2d& C, const Standard_Integer NbPoints, const Standard_Real Toler = -1); + Standard_EXPORT GCPnts_UniformAbscissa(const Adaptor2d_Curve2d& C, const Standard_Integer NbPoints, const Standard_Real Toler = -1); //! Computes a Uniform abscissa distribution of points //! on a part of the Curve2d . //! Parameter Toler is equal Precision::Confusion by default. //! It Is used for more precise calculation of curve length - Standard_EXPORT GCPnts_UniformAbscissa(Adaptor2d_Curve2d& C, const Standard_Integer NbPoints, const Standard_Real U1, const Standard_Real U2, const Standard_Real Toler = -1); + Standard_EXPORT GCPnts_UniformAbscissa(const Adaptor2d_Curve2d& C, const Standard_Integer NbPoints, const Standard_Real U1, const Standard_Real U2, const Standard_Real Toler = -1); //! Initialize the algoritms with , , - Standard_EXPORT void Initialize (Adaptor2d_Curve2d& C, const Standard_Real Abscissa, const Standard_Real Toler = -1); + Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& C, const Standard_Real Abscissa, const Standard_Real Toler = -1); //! Initialize the algoritms with , , , //! , - Standard_EXPORT void Initialize (Adaptor2d_Curve2d& C, const Standard_Real Abscissa, const Standard_Real U1, const Standard_Real U2, const Standard_Real Toler = -1); + Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& C, const Standard_Real Abscissa, const Standard_Real U1, const Standard_Real U2, const Standard_Real Toler = -1); //! Initialize the algoritms with , , and - Standard_EXPORT void Initialize (Adaptor2d_Curve2d& C, const Standard_Integer NbPoints, const Standard_Real Toler = -1); + Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& C, const Standard_Integer NbPoints, const Standard_Real Toler = -1); //! Initialize the algoritms with , , , //! , . - Standard_EXPORT void Initialize (Adaptor2d_Curve2d& C, const Standard_Integer NbPoints, const Standard_Real U1, const Standard_Real U2, const Standard_Real Toler = -1); + Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& C, const Standard_Integer NbPoints, const Standard_Real U1, const Standard_Real U2, const Standard_Real Toler = -1); Standard_Boolean IsDone() const; diff --git a/src/GCPnts/GCPnts_UniformDeflection.gxx b/src/GCPnts/GCPnts_UniformDeflection.gxx index ba8a510770..602feba685 100644 --- a/src/GCPnts/GCPnts_UniformDeflection.gxx +++ b/src/GCPnts/GCPnts_UniformDeflection.gxx @@ -103,7 +103,7 @@ static Standard_Boolean PerformCircular (const TheCurve& C, } -static GCPnts_DeflectionType GetDefType (TheCurve& C) +static GCPnts_DeflectionType GetDefType (const TheCurve& C) { if (C.NbIntervals (GeomAbs_C2) > 1) return GCPnts_DefComposite; @@ -156,7 +156,7 @@ static Standard_Boolean PerformCurve (TColStd_SequenceOfReal& Parameters, //======================================================================= static Standard_Boolean PerformComposite (TColStd_SequenceOfReal& Parameters, TColgp_SequenceOfPnt& Points, - TheCurve& C, + const TheCurve& C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, @@ -197,7 +197,7 @@ static Standard_Boolean PerformComposite (TColStd_SequenceOfReal& Parameters, //function : GCPnts_UniformDeflection //purpose : //======================================================================= -GCPnts_UniformDeflection::GCPnts_UniformDeflection (TheCurve& C, +GCPnts_UniformDeflection::GCPnts_UniformDeflection (const TheCurve& C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, @@ -211,7 +211,7 @@ GCPnts_UniformDeflection::GCPnts_UniformDeflection (TheCurve& C, //function : GCPnts_UniformDeflection //purpose : //======================================================================= -GCPnts_UniformDeflection::GCPnts_UniformDeflection (TheCurve& C, +GCPnts_UniformDeflection::GCPnts_UniformDeflection (const TheCurve& C, const Standard_Real Deflection, const Standard_Boolean WithControl) { @@ -223,7 +223,7 @@ GCPnts_UniformDeflection::GCPnts_UniformDeflection (TheCurve& C, //function : Initialize //purpose : //======================================================================= -void GCPnts_UniformDeflection::Initialize (TheCurve& C, +void GCPnts_UniformDeflection::Initialize (const TheCurve& C, const Standard_Real Deflection, const Standard_Boolean WithControl) { @@ -235,7 +235,7 @@ void GCPnts_UniformDeflection::Initialize (TheCurve& C, //function : Initialize //purpose : //======================================================================= -void GCPnts_UniformDeflection::Initialize (TheCurve& C, +void GCPnts_UniformDeflection::Initialize (const TheCurve& C, const Standard_Real Deflection, const Standard_Real theU1, const Standard_Real theU2, diff --git a/src/GCPnts/GCPnts_UniformDeflection.hxx b/src/GCPnts/GCPnts_UniformDeflection.hxx index e6383d5cdd..7cb692dd91 100644 --- a/src/GCPnts/GCPnts_UniformDeflection.hxx +++ b/src/GCPnts/GCPnts_UniformDeflection.hxx @@ -58,35 +58,35 @@ public: //! the Curve . //! if is True,the algorithm controls the estimate //! deflection - Standard_EXPORT GCPnts_UniformDeflection(Adaptor3d_Curve& C, const Standard_Real Deflection, const Standard_Boolean WithControl = Standard_True); + Standard_EXPORT GCPnts_UniformDeflection(const Adaptor3d_Curve& C, const Standard_Real Deflection, const Standard_Boolean WithControl = Standard_True); //! Computes a uniform Deflection distribution of points on //! the Curve . //! if is True,the algorithm controls the estimate //! deflection - Standard_EXPORT GCPnts_UniformDeflection(Adaptor2d_Curve2d& C, const Standard_Real Deflection, const Standard_Boolean WithControl = Standard_True); + Standard_EXPORT GCPnts_UniformDeflection(const Adaptor2d_Curve2d& C, const Standard_Real Deflection, const Standard_Boolean WithControl = Standard_True); //! Computes a Uniform Deflection distribution of points //! on a part of the Curve . //! if is True,the algorithm controls the estimate //! deflection - Standard_EXPORT GCPnts_UniformDeflection(Adaptor3d_Curve& C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, const Standard_Boolean WithControl = Standard_True); + Standard_EXPORT GCPnts_UniformDeflection(const Adaptor3d_Curve& C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, const Standard_Boolean WithControl = Standard_True); //! Computes a Uniform Deflection distribution of points //! on a part of the Curve . //! if is True,the algorithm controls the estimate //! deflection - Standard_EXPORT GCPnts_UniformDeflection(Adaptor2d_Curve2d& C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, const Standard_Boolean WithControl = Standard_True); + Standard_EXPORT GCPnts_UniformDeflection(const Adaptor2d_Curve2d& C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, const Standard_Boolean WithControl = Standard_True); //! Initialize the algoritms with , - Standard_EXPORT void Initialize (Adaptor3d_Curve& C, const Standard_Real Deflection, const Standard_Boolean WithControl = Standard_True); + Standard_EXPORT void Initialize (const Adaptor3d_Curve& C, const Standard_Real Deflection, const Standard_Boolean WithControl = Standard_True); //! Initialize the algoritms with , - Standard_EXPORT void Initialize (Adaptor2d_Curve2d& C, const Standard_Real Deflection, const Standard_Boolean WithControl = Standard_True); + Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& C, const Standard_Real Deflection, const Standard_Boolean WithControl = Standard_True); //! Initialize the algoritms with , , //! , - Standard_EXPORT void Initialize (Adaptor3d_Curve& C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, const Standard_Boolean WithControl = Standard_True); + Standard_EXPORT void Initialize (const Adaptor3d_Curve& C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, const Standard_Boolean WithControl = Standard_True); //! Initialize the algoritms with , , //! , @@ -131,7 +131,7 @@ public: //! Adaptor2d_Curve2d curve) or a 3D curve from //! the package Geom (in the case of an Adaptor3d_Curve curve), //! - and those required on the curve by the computation algorithm. - Standard_EXPORT void Initialize (Adaptor2d_Curve2d& C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, const Standard_Boolean WithControl = Standard_True); + Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, const Standard_Boolean WithControl = Standard_True); //! Returns true if the computation was successful. //! IsDone is a protection against: