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

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

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

View File

@@ -62,26 +62,40 @@ public:
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);

View File

@@ -62,26 +62,40 @@ public:
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);

View File

@@ -46,12 +46,23 @@ public:
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);
@@ -62,16 +73,23 @@ public:
//! 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;

View File

@@ -46,12 +46,23 @@ public:
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);
@@ -62,16 +73,23 @@ public:
//! 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;

View File

@@ -55,24 +55,55 @@ public:
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;

View File

@@ -55,24 +55,55 @@ public:
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;

View File

@@ -47,28 +47,62 @@ public:
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;

View File

@@ -47,28 +47,62 @@ public:
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;

View File

@@ -47,28 +47,62 @@ public:
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;

View File

@@ -47,28 +47,62 @@ public:
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;

View File

@@ -55,24 +55,55 @@ public:
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;

View File

@@ -55,24 +55,55 @@ public:
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;

View File

@@ -43,12 +43,22 @@ public:
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;

View File

@@ -43,12 +43,22 @@ public:
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;

View File

@@ -46,20 +46,47 @@ public:
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;

View File

@@ -46,20 +46,47 @@ public:
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;

View File

@@ -54,20 +54,44 @@ public:
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;

View File

@@ -54,20 +54,44 @@ public:
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;

View File

@@ -53,28 +53,41 @@ public:
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();

View File

@@ -53,28 +53,41 @@ public:
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();

View File

@@ -53,28 +53,41 @@ public:
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();

View File

@@ -53,28 +53,41 @@ public:
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();

View File

@@ -53,28 +53,41 @@ public:
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();

View File

@@ -53,28 +53,41 @@ public:
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();

View File

@@ -34,14 +34,20 @@ public:
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;

View File

@@ -34,14 +34,20 @@ public:
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;

View File

@@ -37,60 +37,209 @@ public:
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);

View File

@@ -37,60 +37,209 @@ public:
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);

View File

@@ -37,60 +37,209 @@ public:
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);

View File

@@ -37,60 +37,209 @@ public:
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);

View File

@@ -37,60 +37,209 @@ public:
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);

View File

@@ -37,60 +37,209 @@ public:
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);

View File

@@ -37,60 +37,209 @@ public:
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);

View File

@@ -37,60 +37,209 @@ public:
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);