#include <TColStd_Array1OfReal.hxx>
#include <BSplCLib.hxx>
-static GCPnts_AbscissaType computeType( TheCurve& C,
+static GCPnts_AbscissaType computeType( const TheCurve& C,
Standard_Real& Ratio)
{
GCPnts_AbscissaType LocalType ;
// 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,
// 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,
//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());
//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(),
//purpose :
//=======================================================================
-Standard_Real GCPnts_AbscissaPoint::Length(TheCurve& C,
+Standard_Real GCPnts_AbscissaPoint::Length(const TheCurve& C,
const Standard_Real U1,
const Standard_Real U2)
{
//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)
//=======================================================================
GCPnts_AbscissaPoint::GCPnts_AbscissaPoint
- (TheCurve& C,
+ (const TheCurve& C,
const Standard_Real Abscissa,
const Standard_Real U0)
{
GCPnts_AbscissaPoint::GCPnts_AbscissaPoint
(const Standard_Real Tol,
- TheCurve& C,
+ const TheCurve& C,
const Standard_Real Abscissa,
const Standard_Real U0)
{
//=======================================================================
GCPnts_AbscissaPoint::GCPnts_AbscissaPoint
- (TheCurve& C,
+ (const TheCurve& C,
const Standard_Real Abscissa,
const Standard_Real U0,
const Standard_Real Ui)
//=======================================================================
GCPnts_AbscissaPoint::GCPnts_AbscissaPoint
- (TheCurve& C,
+ (const TheCurve& C,
const Standard_Real Abscissa,
const Standard_Real U0,
const Standard_Real Ui,
//! Computes the length of the Curve <C>.
- 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 <C>.
- 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 <C> 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 <C> 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 <C>.
- 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 <C>.
- 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 <C> 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 <C> with the given tolerance.
//! Constructs an empty algorithm. This function is used
//! 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 <Curve> at the
//! distance <Abscissa> from the point of parameter <U0>.
- 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 <Curve> at
//! the distance <Abscissa> from the point of parameter
//! <U0> 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 <Curve> at
//! the distance <Abscissa> from the point of parameter
//! <U0> 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 <Curve> at the
//! distance <Abscissa> from the point of parameter <U0>.
- 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 <Curve> at the
//! distance <Abscissa> from the point of parameter <U0>.
//! <Ui> 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 <Curve> at the
//! distance <Abscissa> from the point of parameter <U0>.
//! <Ui> 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 <Curve> at the
//! distance <Abscissa> from the point of parameter <U0>.
//! <Ui> 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 <Curve> at the
//! distance <Abscissa> from the point of parameter <U0>.
//! <Ui> 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:
//purpose :
//=======================================================================
-GCPnts_QuasiUniformAbscissa::GCPnts_QuasiUniformAbscissa(TheCurve& C,
+GCPnts_QuasiUniformAbscissa::GCPnts_QuasiUniformAbscissa(const TheCurve& C,
const Standard_Integer NbPoints)
{
Initialize(C, NbPoints);
//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)
//purpose :
//=======================================================================
-void GCPnts_QuasiUniformAbscissa::Initialize(TheCurve& C,
+void GCPnts_QuasiUniformAbscissa::Initialize(const TheCurve& C,
const Standard_Integer NbPoints)
{
Initialize(C, NbPoints, C.FirstParameter(),
// 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)
//! 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,
//! 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 <C>, <NbPoints> 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 <C>, <Abscissa>, <U1>,
//! <U2>.
- 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 <C>.
//! <NbPoints> 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 <C>.
- 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 <C>, <NbPoints> 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 <C>, <Abscissa>, <U1>,
//! <U2>.
- 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:
//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;
//=======================================================================
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,
//purpose :
//=======================================================================
GCPnts_QuasiUniformDeflection::GCPnts_QuasiUniformDeflection
- (TheCurve& C,
+ (const TheCurve& C,
const Standard_Real Deflection,
const Standard_Real U1,
const Standard_Real U2,
//purpose :
//=======================================================================
GCPnts_QuasiUniformDeflection::GCPnts_QuasiUniformDeflection
- (TheCurve& C,
+ (const TheCurve& C,
const Standard_Real Deflection,
const GeomAbs_Shape Continuity)
{
//function : Initialize
//purpose :
//=======================================================================
-void GCPnts_QuasiUniformDeflection::Initialize (TheCurve& C,
+void GCPnts_QuasiUniformDeflection::Initialize (const TheCurve& C,
const Standard_Real Deflection,
const GeomAbs_Shape Continuity)
{
//=======================================================================
void GCPnts_QuasiUniformDeflection::Initialize
- (TheCurve& C,
+ (const TheCurve& C,
const Standard_Real Deflection,
const Standard_Real theU1,
const Standard_Real theU2,
//! Computes a QuasiUniform Deflection distribution
//! of points on the Curve <C>.
- 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 <C>.
- 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 <C>.
- 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 <C>.
//! 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 <C>, <Deflection>
- 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 <C>, <Deflection>
- 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 <C>, <Deflection>,
//! <U1>,<U2>
- 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 <C>, <Deflection>,
//! -- <U1>,<U2>
//! 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.
#include <gp_Vec2d.hxx>
-static Standard_Real GetParameterLengthRatio(TheCurve& C)
+static Standard_Real GetParameterLengthRatio(const TheCurve& C)
{
switch (C.GetType()) {
}
-static GCPnts_AbscissaType GetAbsType(TheCurve& C)
+static GCPnts_AbscissaType GetAbsType(const TheCurve& C)
{
if (C.NbIntervals(GeomAbs_C1) > 1)
return GCPnts_AbsComposite;
}
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,
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,
//purpose :
//=======================================================================
-void GCPnts_UniformAbscissa::Initialize (TheCurve& C,
+void GCPnts_UniformAbscissa::Initialize (const TheCurve& C,
const Standard_Real Abscissa,
const Standard_Real Tol)
{
//purpose :
//=======================================================================
-GCPnts_UniformAbscissa::GCPnts_UniformAbscissa (TheCurve& C,
+GCPnts_UniformAbscissa::GCPnts_UniformAbscissa (const TheCurve& C,
const Standard_Real Abscissa,
const Standard_Real Tol)
{
//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,
//purpose :
//=======================================================================
-GCPnts_UniformAbscissa::GCPnts_UniformAbscissa(TheCurve& C,
+GCPnts_UniformAbscissa::GCPnts_UniformAbscissa(const TheCurve& C,
const Standard_Integer NbPoints,
const Standard_Real Tol)
{
//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,
//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,
//purpose :
//=======================================================================
-void GCPnts_UniformAbscissa::Initialize(TheCurve& C,
+void GCPnts_UniformAbscissa::Initialize(const TheCurve& C,
const Standard_Integer NbPoints,
const Standard_Real Tol)
{
//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,
//! Computes a uniform abscissa distribution of points on
//! the Curve <C>. 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 <C>. 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 <C>.
//! <NbPoints> 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 <C>.
//! 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 <C>, <Abscissa>, <Toler>
- 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 <C>, <Abscissa>, <U1>,
//! <U2>, <Toler>
- 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 <C>, <NbPoints>, <Toler> 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 <C>, <Abscissa>, <U1>,
//! <U2>, <Toler>.
- 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 <C>.
//! 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 <C>.
//! 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 <C>.
//! <NbPoints> 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 <C>.
//! 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 <C>, <Abscissa>, <Toler>
- 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 <C>, <Abscissa>, <U1>,
//! <U2>, <Toler>
- 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 <C>, <NbPoints>, <Toler> 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 <C>, <Abscissa>, <U1>,
//! <U2>, <Toler>.
- 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;
}
-static GCPnts_DeflectionType GetDefType (TheCurve& C)
+static GCPnts_DeflectionType GetDefType (const TheCurve& C)
{
if (C.NbIntervals (GeomAbs_C2) > 1)
return GCPnts_DefComposite;
//=======================================================================
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,
//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,
//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)
{
//function : Initialize
//purpose :
//=======================================================================
-void GCPnts_UniformDeflection::Initialize (TheCurve& C,
+void GCPnts_UniformDeflection::Initialize (const TheCurve& C,
const Standard_Real Deflection,
const Standard_Boolean WithControl)
{
//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,
//! the Curve <C>.
//! if <WithControl> 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 <C>.
//! if <WithControl> 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 <C>.
//! if <WithControl> 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 <C>.
//! if <WithControl> 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 <C>, <Deflection>
- 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 <C>, <Deflection>
- 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 <C>, <Deflection>,
//! <U1>,<U2>
- 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 <C>, <Deflection>,
//! <U1>,<U2>
//! 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: