diff --git a/src/ModelingData/TKG2d/Geom2d/Geom2d_BSplineCurve.hxx b/src/ModelingData/TKG2d/Geom2d/Geom2d_BSplineCurve.hxx index 996754fb63..3b20cdfb0b 100644 --- a/src/ModelingData/TKG2d/Geom2d/Geom2d_BSplineCurve.hxx +++ b/src/ModelingData/TKG2d/Geom2d/Geom2d_BSplineCurve.hxx @@ -340,14 +340,14 @@ public: //! point of the reversed curve; //! - the end point of the initial curve becomes the start //! point of the reversed curve. - Standard_EXPORT void Reverse() override; + Standard_EXPORT void Reverse() final; //! Computes the parameter on the reversed curve for //! the point of parameter U on this BSpline curve. //! The returned value is: UFirst + ULast - U, //! where UFirst and ULast are the values of the //! first and last parameters of this BSpline curve. - Standard_EXPORT double ReversedParameter(const double U) const override; + Standard_EXPORT double ReversedParameter(const double U) const final; //! Modifies this BSpline curve by segmenting it //! between U1 and U2. Either of these values can be @@ -532,7 +532,7 @@ public: //! Returns true if the degree of continuity of this //! BSpline curve is at least N. A BSpline curve is at least GeomAbs_C0. //! Exceptions Standard_RangeError if N is negative. - Standard_EXPORT bool IsCN(const int N) const override; + Standard_EXPORT bool IsCN(const int N) const final; //! Check if curve has at least G1 continuity in interval [theTf, theTl] //! Returns true if IsCN(1) @@ -548,10 +548,10 @@ public: //! Warnings : //! The first and the last point can be different from the first //! pole and the last pole of the curve. - Standard_EXPORT bool IsClosed() const override; + Standard_EXPORT bool IsClosed() const final; //! Returns True if the curve is periodic. - Standard_EXPORT bool IsPeriodic() const override; + Standard_EXPORT bool IsPeriodic() const final; //! Returns True if the weights are not identical. //! The tolerance criterion is Epsilon of the class Real. @@ -569,7 +569,7 @@ public: //! than Cd-p where p is the maximum multiplicity of the interior //! Knots. In the interior of a knot span the curve is infinitely //! continuously differentiable. - Standard_EXPORT GeomAbs_Shape Continuity() const override; + Standard_EXPORT GeomAbs_Shape Continuity() const final; //! Returns the degree of this BSpline curve. //! In this class the degree of the basis normalized B-spline @@ -577,13 +577,13 @@ public: //! Computation of value and derivatives Standard_EXPORT int Degree() const; - Standard_EXPORT void D0(const double U, gp_Pnt2d& P) const override; + Standard_EXPORT void D0(const double U, gp_Pnt2d& P) const final; //! Raised if the continuity of the curve is not C1. - Standard_EXPORT void D1(const double U, gp_Pnt2d& P, gp_Vec2d& V1) const override; + Standard_EXPORT void D1(const double U, gp_Pnt2d& P, gp_Vec2d& V1) const final; //! Raised if the continuity of the curve is not C2. - Standard_EXPORT void D2(const double U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const override; + Standard_EXPORT void D2(const double U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const final; //! For this BSpline curve, computes //! - the point P of parameter U, or @@ -601,7 +601,7 @@ public: gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, - gp_Vec2d& V3) const override; + gp_Vec2d& V3) const final; //! For the point of parameter U of this BSpline curve, //! computes the vector corresponding to the Nth derivative. @@ -624,7 +624,7 @@ public: //! the same as if we consider the whole definition of the //! curve. Of course the evaluations are different outside //! this parametric domain. - Standard_EXPORT gp_Vec2d DN(const double U, const int N) const override; + Standard_EXPORT gp_Vec2d DN(const double U, const int N) const final; //! Raised if FromK1 = ToK2. Standard_EXPORT gp_Pnt2d LocalValue(const double U, const int FromK1, const int ToK2) const; @@ -676,7 +676,7 @@ public: //! The last point of the curve is different from the last //! pole of the curve if the multiplicity of the last knot //! is lower than Degree. - Standard_EXPORT gp_Pnt2d EndPoint() const override; + Standard_EXPORT gp_Pnt2d EndPoint() const final; //! For a B-spline curve the first parameter (which gives the start //! point of the curve) is a knot value but if the multiplicity of @@ -687,7 +687,7 @@ public: //! Computes the parametric value of the start point of the curve. //! It is a knot value. - Standard_EXPORT double FirstParameter() const override; + Standard_EXPORT double FirstParameter() const final; //! Returns the knot of range Index. When there is a knot //! with a multiplicity greater than 1 the knot is not repeated. @@ -748,7 +748,7 @@ public: //! Computes the parametric value of the end point of the curve. //! It is a knot value. - Standard_EXPORT double LastParameter() const override; + Standard_EXPORT double LastParameter() const final; //! Locates the parametric value U in the sequence of knots. //! If "WithKnotRepetition" is True we consider the knot's @@ -803,7 +803,7 @@ public: //! Warnings : //! This point is different from the first pole of the curve if the //! multiplicity of the first knot is lower than Degree. - Standard_EXPORT gp_Pnt2d StartPoint() const override; + Standard_EXPORT gp_Pnt2d StartPoint() const final; //! Returns the weight of the pole of range Index . //! Raised if Index < 1 or Index > NbPoles. @@ -826,7 +826,7 @@ public: const NCollection_Array1& WeightsArray() const { return myWeights; } //! Applies the transformation T to this BSpline curve. - Standard_EXPORT void Transform(const gp_Trsf2d& T) override; + Standard_EXPORT void Transform(const gp_Trsf2d& T) final; //! Returns the value of the maximum degree of the normalized //! B-spline basis functions in this package. @@ -842,10 +842,10 @@ public: Standard_EXPORT void Resolution(const double ToleranceUV, double& UTolerance); //! Creates a new object which is a copy of this BSpline curve. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; DEFINE_STANDARD_RTTIEXT(Geom2d_BSplineCurve, Geom2d_BoundedCurve) diff --git a/src/ModelingData/TKG2d/Geom2d/Geom2d_BezierCurve.hxx b/src/ModelingData/TKG2d/Geom2d/Geom2d_BezierCurve.hxx index 523b13c82b..e34c1bea36 100644 --- a/src/ModelingData/TKG2d/Geom2d/Geom2d_BezierCurve.hxx +++ b/src/ModelingData/TKG2d/Geom2d/Geom2d_BezierCurve.hxx @@ -142,13 +142,13 @@ public: //! Reverses the direction of parametrization of //! Value (NewU) = Value (1 - OldU) - Standard_EXPORT void Reverse() override; + Standard_EXPORT void Reverse() final; //! Returns the parameter on the reversed curve for //! the point of parameter U on . //! //! returns 1-U - Standard_EXPORT double ReversedParameter(const double U) const override; + Standard_EXPORT double ReversedParameter(const double U) const final; //! Segments the curve between U1 and U2 which can be out //! of the bounds of the curve. The curve is oriented from U1 @@ -190,38 +190,38 @@ public: //! Returns True if the distance between the first point //! and the last point of the curve is lower or equal to //! the Resolution from package gp. - Standard_EXPORT bool IsClosed() const override; + Standard_EXPORT bool IsClosed() const final; //! Continuity of the curve, returns True. - Standard_EXPORT bool IsCN(const int N) const override; + Standard_EXPORT bool IsCN(const int N) const final; //! Returns False. A BezierCurve cannot be periodic in this //! package - Standard_EXPORT bool IsPeriodic() const override; + Standard_EXPORT bool IsPeriodic() const final; //! Returns false if all the weights are identical. The tolerance //! criterion is Resolution from package gp. Standard_EXPORT bool IsRational() const; //! Returns GeomAbs_CN, which is the continuity of any Bezier curve. - Standard_EXPORT GeomAbs_Shape Continuity() const override; + Standard_EXPORT GeomAbs_Shape Continuity() const final; //! Returns the polynomial degree of the curve. It is the number //! of poles less one. In this package the Degree of a Bezier //! curve cannot be greater than "MaxDegree". Standard_EXPORT int Degree() const; - Standard_EXPORT void D0(const double U, gp_Pnt2d& P) const override; + Standard_EXPORT void D0(const double U, gp_Pnt2d& P) const final; - Standard_EXPORT void D1(const double U, gp_Pnt2d& P, gp_Vec2d& V1) const override; + Standard_EXPORT void D1(const double U, gp_Pnt2d& P, gp_Vec2d& V1) const final; - Standard_EXPORT void D2(const double U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const override; + Standard_EXPORT void D2(const double U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const final; Standard_EXPORT void D3(const double U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, - gp_Vec2d& V3) const override; + gp_Vec2d& V3) const final; //! For this Bezier curve, computes //! - the point P of parameter U, or @@ -231,18 +231,18 @@ public: //! - V3, the third derivative vector. //! Note: the parameter U can be outside the bounds of the curve. //! Raises RangeError if N < 1. - Standard_EXPORT gp_Vec2d DN(const double U, const int N) const override; + Standard_EXPORT gp_Vec2d DN(const double U, const int N) const final; //! Returns the end point or start point of this Bezier curve. - Standard_EXPORT gp_Pnt2d EndPoint() const override; + Standard_EXPORT gp_Pnt2d EndPoint() const final; //! Returns the value of the first parameter of this Bezier curve. //! This is 0.0, which gives the start point of this Bezier curve. - Standard_EXPORT double FirstParameter() const override; + Standard_EXPORT double FirstParameter() const final; //! Returns the value of the last parameter of this Bezier curve. //! This is 1.0, which gives the end point of this Bezier curve. - Standard_EXPORT double LastParameter() const override; + Standard_EXPORT double LastParameter() const final; //! Returns the number of poles for this Bezier curve. Standard_EXPORT int NbPoles() const; @@ -262,7 +262,7 @@ public: //! Returns Value (U=1), it is the first control point //! of the curve. - Standard_EXPORT gp_Pnt2d StartPoint() const override; + Standard_EXPORT gp_Pnt2d StartPoint() const final; //! Returns the weight of range Index. //! Raised if Index is not in the range [1, NbPoles] @@ -288,7 +288,7 @@ public: const NCollection_Array1& WeightsArray() const { return myWeights; } //! Applies the transformation T to this Bezier curve. - Standard_EXPORT void Transform(const gp_Trsf2d& T) override; + Standard_EXPORT void Transform(const gp_Trsf2d& T) final; //! Returns the value of the maximum polynomial degree of a //! BezierCurve. This value is 25. @@ -304,10 +304,10 @@ public: Standard_EXPORT void Resolution(const double ToleranceUV, double& UTolerance); //! Creates a new object which is a copy of this Bezier curve. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; //! Returns Bezier knots {0.0, 1.0} as a static array. Standard_EXPORT const NCollection_Array1& Knots() const; diff --git a/src/ModelingData/TKG2d/Geom2d/Geom2d_Circle.hxx b/src/ModelingData/TKG2d/Geom2d/Geom2d_Circle.hxx index ec27f456e6..4629a8d679 100644 --- a/src/ModelingData/TKG2d/Geom2d/Geom2d_Circle.hxx +++ b/src/ModelingData/TKG2d/Geom2d/Geom2d_Circle.hxx @@ -95,35 +95,35 @@ public: //! Computes the parameter on the reversed circle for //! the point of parameter U on this circle. //! For a circle, the returned value is: 2.*Pi - U. - Standard_EXPORT double ReversedParameter(const double U) const override; + Standard_EXPORT double ReversedParameter(const double U) const final; //! Returns 0., which is the eccentricity of any circle. - Standard_EXPORT double Eccentricity() const override; + Standard_EXPORT double Eccentricity() const final; //! Returns 0.0 - Standard_EXPORT double FirstParameter() const override; + Standard_EXPORT double FirstParameter() const final; //! Returns 2*PI. - Standard_EXPORT double LastParameter() const override; + Standard_EXPORT double LastParameter() const final; //! returns True. - Standard_EXPORT bool IsClosed() const override; + Standard_EXPORT bool IsClosed() const final; //! returns True. The period of a circle is 2.*Pi. - Standard_EXPORT bool IsPeriodic() const override; + Standard_EXPORT bool IsPeriodic() const final; //! Returns in P the point of parameter U. //! P = C + R * Cos (U) * XDir + R * Sin (U) * YDir //! where C is the center of the circle , XDir the XDirection and //! YDir the YDirection of the circle's local coordinate system. - Standard_EXPORT void D0(const double U, gp_Pnt2d& P) const override; + Standard_EXPORT void D0(const double U, gp_Pnt2d& P) const final; //! Returns the point P of parameter U and the first derivative V1. - Standard_EXPORT void D1(const double U, gp_Pnt2d& P, gp_Vec2d& V1) const override; + Standard_EXPORT void D1(const double U, gp_Pnt2d& P, gp_Vec2d& V1) const final; //! Returns the point P of parameter U, the first and second //! derivatives V1 and V2. - Standard_EXPORT void D2(const double U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const override; + Standard_EXPORT void D2(const double U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const final; //! Returns the point P of parameter u, the first second and third //! derivatives V1 V2 and V3. @@ -131,21 +131,21 @@ public: gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, - gp_Vec2d& V3) const override; + gp_Vec2d& V3) const final; //! For the point of parameter U of this circle, computes //! the vector corresponding to the Nth derivative. //! Exceptions: Standard_RangeError if N is less than 1. - Standard_EXPORT gp_Vec2d DN(const double U, const int N) const override; + Standard_EXPORT gp_Vec2d DN(const double U, const int N) const final; //! Applies the transformation T to this circle. - Standard_EXPORT void Transform(const gp_Trsf2d& T) override; + Standard_EXPORT void Transform(const gp_Trsf2d& T) final; //! Creates a new object which is a copy of this circle. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; DEFINE_STANDARD_RTTIEXT(Geom2d_Circle, Geom2d_Conic) diff --git a/src/ModelingData/TKG2d/Geom2d/Geom2d_Ellipse.hxx b/src/ModelingData/TKG2d/Geom2d/Geom2d_Ellipse.hxx index 85548f7c87..58e2d34931 100644 --- a/src/ModelingData/TKG2d/Geom2d/Geom2d_Ellipse.hxx +++ b/src/ModelingData/TKG2d/Geom2d/Geom2d_Ellipse.hxx @@ -133,7 +133,7 @@ public: //! Computes the parameter on the reversed ellipse for //! the point of parameter U on this ellipse. //! For an ellipse, the returned value is: 2.*Pi - U. - Standard_EXPORT double ReversedParameter(const double U) const override; + Standard_EXPORT double ReversedParameter(const double U) const final; //! Computes the directrices of this ellipse. //! This directrix is the line normal to the XAxis of the ellipse @@ -158,7 +158,7 @@ public: //! If f is the distance between the center of the ellipse and //! the Focus1 then the eccentricity e = f / MajorRadius. //! Returns 0 if MajorRadius = 0 - Standard_EXPORT double Eccentricity() const override; + Standard_EXPORT double Eccentricity() const final; //! Computes the focal distance. The focal distance is the distance between the center //! and a focus of the ellipse. @@ -187,30 +187,30 @@ public: //! Returns the value of the first parameter of this //! ellipse. This is 0.0, which gives the start point of this ellipse. //! The start point and end point of an ellipse are coincident. - Standard_EXPORT double FirstParameter() const override; + Standard_EXPORT double FirstParameter() const final; //! Returns the value of the last parameter of this //! ellipse. This is 2.*Pi, which gives the end point of this ellipse. //! The start point and end point of an ellipse are coincident. - Standard_EXPORT double LastParameter() const override; + Standard_EXPORT double LastParameter() const final; //! return True. - Standard_EXPORT bool IsClosed() const override; + Standard_EXPORT bool IsClosed() const final; //! return True. - Standard_EXPORT bool IsPeriodic() const override; + Standard_EXPORT bool IsPeriodic() const final; //! Returns in P the point of parameter U. //! P = C + MajorRadius * Cos (U) * XDir + MinorRadius * Sin (U) * YDir //! where C is the center of the ellipse , XDir the direction of //! the "XAxis" and "YDir" the "YAxis" of the ellipse. - Standard_EXPORT void D0(const double U, gp_Pnt2d& P) const override; + Standard_EXPORT void D0(const double U, gp_Pnt2d& P) const final; - Standard_EXPORT void D1(const double U, gp_Pnt2d& P, gp_Vec2d& V1) const override; + Standard_EXPORT void D1(const double U, gp_Pnt2d& P, gp_Vec2d& V1) const final; //! Returns the point P of parameter U. The vectors V1 and V2 //! are the first and second derivatives at this point. - Standard_EXPORT void D2(const double U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const override; + Standard_EXPORT void D2(const double U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const final; //! Returns the point P of parameter U, the first second and //! third derivatives V1 V2 and V3. @@ -218,21 +218,21 @@ public: gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, - gp_Vec2d& V3) const override; + gp_Vec2d& V3) const final; //! For the point of parameter U of this ellipse, //! computes the vector corresponding to the Nth derivative. //! Exceptions Standard_RangeError if N is less than 1. - Standard_EXPORT gp_Vec2d DN(const double U, const int N) const override; + Standard_EXPORT gp_Vec2d DN(const double U, const int N) const final; //! Applies the transformation T to this ellipse. - Standard_EXPORT void Transform(const gp_Trsf2d& T) override; + Standard_EXPORT void Transform(const gp_Trsf2d& T) final; //! Creates a new object which is a copy of this ellipse. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; DEFINE_STANDARD_RTTIEXT(Geom2d_Ellipse, Geom2d_Conic) diff --git a/src/ModelingData/TKG2d/Geom2d/Geom2d_Hyperbola.hxx b/src/ModelingData/TKG2d/Geom2d/Geom2d_Hyperbola.hxx index cba8e8b7b8..0228d9ea71 100644 --- a/src/ModelingData/TKG2d/Geom2d/Geom2d_Hyperbola.hxx +++ b/src/ModelingData/TKG2d/Geom2d/Geom2d_Hyperbola.hxx @@ -129,19 +129,19 @@ public: //! Computes the parameter on the reversed hyperbola, //! for the point of parameter U on this hyperbola. //! For a hyperbola, the returned value is -U. - Standard_EXPORT double ReversedParameter(const double U) const override; + Standard_EXPORT double ReversedParameter(const double U) const final; //! Returns RealFirst from Standard. - Standard_EXPORT double FirstParameter() const override; + Standard_EXPORT double FirstParameter() const final; //! returns RealLast from Standard. - Standard_EXPORT double LastParameter() const override; + Standard_EXPORT double LastParameter() const final; //! Returns False. - Standard_EXPORT bool IsClosed() const override; + Standard_EXPORT bool IsClosed() const final; //! return False for an hyperbola. - Standard_EXPORT bool IsPeriodic() const override; + Standard_EXPORT bool IsPeriodic() const final; //! In the local coordinate system of the hyperbola the //! equation of the hyperbola is (X*X)/(A*A) - (Y*Y)/(B*B) = 1.0 @@ -188,7 +188,7 @@ public: //! If f is the distance between the location of the hyperbola //! and the Focus1 then the eccentricity e = f / MajorRadius. //! raised if MajorRadius = 0.0 - Standard_EXPORT double Eccentricity() const override; + Standard_EXPORT double Eccentricity() const final; //! Computes the focal distance. It is the distance between the //! two focus of the hyperbola. @@ -250,14 +250,14 @@ public: //! MinorRadius * std::sinh(U) * YDir //! where C is the center of the hyperbola , XDir the XDirection and //! YDir the YDirection of the hyperbola's local coordinate system. - Standard_EXPORT void D0(const double U, gp_Pnt2d& P) const override; + Standard_EXPORT void D0(const double U, gp_Pnt2d& P) const final; //! Returns the point P of parameter U and the first derivative V1. - Standard_EXPORT void D1(const double U, gp_Pnt2d& P, gp_Vec2d& V1) const override; + Standard_EXPORT void D1(const double U, gp_Pnt2d& P, gp_Vec2d& V1) const final; //! Returns the point P of parameter U, the first and second //! derivatives V1 and V2. - Standard_EXPORT void D2(const double U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const override; + Standard_EXPORT void D2(const double U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const final; //! Returns the point P of parameter U, the first second and //! third derivatives V1 V2 and V3. @@ -265,21 +265,21 @@ public: gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, - gp_Vec2d& V3) const override; + gp_Vec2d& V3) const final; //! For the point of parameter U of this hyperbola, //! computes the vector corresponding to the Nth derivative. //! Exceptions Standard_RangeError if N is less than 1. - Standard_EXPORT gp_Vec2d DN(const double U, const int N) const override; + Standard_EXPORT gp_Vec2d DN(const double U, const int N) const final; //! Applies the transformation T to this hyperbola. - Standard_EXPORT void Transform(const gp_Trsf2d& T) override; + Standard_EXPORT void Transform(const gp_Trsf2d& T) final; //! Creates a new object which is a copy of this hyperbola. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; DEFINE_STANDARD_RTTIEXT(Geom2d_Hyperbola, Geom2d_Conic) diff --git a/src/ModelingData/TKG2d/Geom2d/Geom2d_Line.hxx b/src/ModelingData/TKG2d/Geom2d/Geom2d_Line.hxx index 5487eac775..75b610b43c 100644 --- a/src/ModelingData/TKG2d/Geom2d/Geom2d_Line.hxx +++ b/src/ModelingData/TKG2d/Geom2d/Geom2d_Line.hxx @@ -89,69 +89,69 @@ public: //! Changes the orientation of this line. As a result, the //! unit vector of the positioning axis of this line is reversed. - Standard_EXPORT void Reverse() override; + Standard_EXPORT void Reverse() final; //! Computes the parameter on the reversed line for the //! point of parameter U on this line. //! For a line, the returned value is -U. - Standard_EXPORT double ReversedParameter(const double U) const override; + Standard_EXPORT double ReversedParameter(const double U) const final; //! Returns RealFirst from Standard. - Standard_EXPORT double FirstParameter() const override; + Standard_EXPORT double FirstParameter() const final; //! Returns RealLast from Standard - Standard_EXPORT double LastParameter() const override; + Standard_EXPORT double LastParameter() const final; //! Returns False - Standard_EXPORT bool IsClosed() const override; + Standard_EXPORT bool IsClosed() const final; //! Returns False - Standard_EXPORT bool IsPeriodic() const override; + Standard_EXPORT bool IsPeriodic() const final; //! Returns GeomAbs_CN, which is the global continuity of any line. - Standard_EXPORT GeomAbs_Shape Continuity() const override; + Standard_EXPORT GeomAbs_Shape Continuity() const final; //! Computes the distance between and the point P. Standard_EXPORT double Distance(const gp_Pnt2d& P) const; //! Returns True. - Standard_EXPORT bool IsCN(const int N) const override; + Standard_EXPORT bool IsCN(const int N) const final; //! Returns in P the point of parameter U. //! P (U) = O + U * Dir where O is the "Location" point of the //! line and Dir the direction of the line. - Standard_EXPORT void D0(const double U, gp_Pnt2d& P) const override; + Standard_EXPORT void D0(const double U, gp_Pnt2d& P) const final; //! Returns the point P of parameter u and the first derivative V1. - Standard_EXPORT void D1(const double U, gp_Pnt2d& P, gp_Vec2d& V1) const override; + Standard_EXPORT void D1(const double U, gp_Pnt2d& P, gp_Vec2d& V1) const final; //! Returns the point P of parameter U, the first and second //! derivatives V1 and V2. V2 is a vector with null magnitude //! for a line. - Standard_EXPORT void D2(const double U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const override; + Standard_EXPORT void D2(const double U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const final; //! V2 and V3 are vectors with null magnitude for a line. Standard_EXPORT void D3(const double U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, - gp_Vec2d& V3) const override; + gp_Vec2d& V3) const final; //! For the point of parameter U of this line, computes //! the vector corresponding to the Nth derivative. //! Note: if N is greater than or equal to 2, the result is a //! vector with null magnitude. //! Exceptions Standard_RangeError if N is less than 1. - Standard_EXPORT gp_Vec2d DN(const double U, const int N) const override; + Standard_EXPORT gp_Vec2d DN(const double U, const int N) const final; //! Applies the transformation T to this line. - Standard_EXPORT void Transform(const gp_Trsf2d& T) override; + Standard_EXPORT void Transform(const gp_Trsf2d& T) final; //! Computes the parameter on the line transformed by //! T for the point of parameter U on this line. //! For a line, the returned value is equal to U multiplied //! by the scale factor of transformation T. - Standard_EXPORT double TransformedParameter(const double U, const gp_Trsf2d& T) const override; + Standard_EXPORT double TransformedParameter(const double U, const gp_Trsf2d& T) const final; //! Returns the coefficient required to compute the //! parametric transformation of this line when @@ -160,13 +160,13 @@ public: //! and the parameter of the transformed point on the //! new line transformed by T. //! For a line, the returned value is the scale factor of the transformation T. - Standard_EXPORT double ParametricTransformation(const gp_Trsf2d& T) const override; + Standard_EXPORT double ParametricTransformation(const gp_Trsf2d& T) const final; //! Creates a new object, which is a copy of this line. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; DEFINE_STANDARD_RTTIEXT(Geom2d_Line, Geom2d_Curve) diff --git a/src/ModelingData/TKG2d/Geom2d/Geom2d_OffsetCurve.hxx b/src/ModelingData/TKG2d/Geom2d/Geom2d_OffsetCurve.hxx index 5f65ddd932..cb23ad89f3 100644 --- a/src/ModelingData/TKG2d/Geom2d/Geom2d_OffsetCurve.hxx +++ b/src/ModelingData/TKG2d/Geom2d/Geom2d_OffsetCurve.hxx @@ -105,11 +105,11 @@ public: //! - the end point of the initial curve becomes the start //! point of the reversed curve, and //! - the first and last parameters are recomputed. - Standard_EXPORT void Reverse() override; + Standard_EXPORT void Reverse() final; //! Computes the parameter on the reversed curve for //! the point of parameter U on this offset curve. - Standard_EXPORT double ReversedParameter(const double U) const override; + Standard_EXPORT double ReversedParameter(const double U) const final; //! Changes this offset curve by assigning C as the //! basis curve from which it is built. @@ -151,24 +151,24 @@ public: //! the offset curve. //! No check is done at the creation time and we suppose //! in this package that the offset curve is well defined. - Standard_EXPORT GeomAbs_Shape Continuity() const override; + Standard_EXPORT GeomAbs_Shape Continuity() const final; //! Warning! this should not be called //! if the basis curve is not at least C1. Nevertheless //! if used on portion where the curve is C1, it is OK - Standard_EXPORT void D0(const double U, gp_Pnt2d& P) const override; + Standard_EXPORT void D0(const double U, gp_Pnt2d& P) const final; //! Warning! this should not be called //! if the continuity of the basis curve is not C2. //! Nevertheless, it's OK to use it on portion //! where the curve is C2 - Standard_EXPORT void D1(const double U, gp_Pnt2d& P, gp_Vec2d& V1) const override; + Standard_EXPORT void D1(const double U, gp_Pnt2d& P, gp_Vec2d& V1) const final; //! Warning! This should not be called //! if the continuity of the basis curve is not C3. //! Nevertheless, it's OK to use it on portion //! where the curve is C3 - Standard_EXPORT void D2(const double U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const override; + Standard_EXPORT void D2(const double U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const final; //! Warning! This should not be called //! if the continuity of the basis curve is not C4. @@ -178,7 +178,7 @@ public: gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, - gp_Vec2d& V3) const override; + gp_Vec2d& V3) const final; //! The returned vector gives the value of the derivative //! for the order of derivation N. @@ -196,21 +196,21 @@ public: //! Warnings : //! The exception UndefinedValue or UndefinedDerivative is //! raised if it is not possible to compute a unique offset direction. - Standard_EXPORT gp_Vec2d DN(const double U, const int N) const override; + Standard_EXPORT gp_Vec2d DN(const double U, const int N) const final; //! Returns the value of the first parameter of this //! offset curve. The first parameter corresponds to the //! start point of the curve. //! Note: the first and last parameters of this offset curve //! are also the ones of its basis curve. - Standard_EXPORT double FirstParameter() const override; + Standard_EXPORT double FirstParameter() const final; //! Returns the value of the last parameter of this //! offset curve. The last parameter //! corresponds to the end point. //! Note: the first and last parameters of this offset curve //! are also the ones of its basis curve. - Standard_EXPORT double LastParameter() const override; + Standard_EXPORT double LastParameter() const final; //! Returns the offset value of this offset curve. Standard_EXPORT double Offset() const; @@ -218,7 +218,7 @@ public: //! Returns True if the distance between the start point //! and the end point of the curve is lower or equal to //! Resolution from package gp. - Standard_EXPORT bool IsClosed() const override; + Standard_EXPORT bool IsClosed() const final; //! Is the order of continuity of the curve N ? //! Warnings : @@ -227,23 +227,23 @@ public: //! to the basis curve (used to compute the offset curve) is //! defined at any point on the basis curve. //! Raised if N < 0. - Standard_EXPORT bool IsCN(const int N) const override; + Standard_EXPORT bool IsCN(const int N) const final; //! Is the parametrization of a curve is periodic ? //! If the basis curve is a circle or an ellipse the corresponding //! OffsetCurve is periodic. If the basis curve can't be periodic //! (for example BezierCurve) the OffsetCurve can't be periodic. - Standard_EXPORT bool IsPeriodic() const override; + Standard_EXPORT bool IsPeriodic() const final; //! Returns the period of this offset curve, i.e. the period //! of the basis curve of this offset curve. //! Exceptions //! Standard_NoSuchObject if the basis curve is not periodic. - Standard_EXPORT double Period() const override; + Standard_EXPORT double Period() const final; //! Applies the transformation T to this offset curve. //! Note: the basis curve is also modified. - Standard_EXPORT void Transform(const gp_Trsf2d& T) override; + Standard_EXPORT void Transform(const gp_Trsf2d& T) final; //! Returns the parameter on the transformed curve for //! the transform of the point of parameter U on . @@ -255,7 +255,7 @@ public: //! me->Value(U).Transformed(T) //! //! This methods calls the basis curve method. - Standard_EXPORT double TransformedParameter(const double U, const gp_Trsf2d& T) const override; + Standard_EXPORT double TransformedParameter(const double U, const gp_Trsf2d& T) const final; //! Returns a coefficient to compute the parameter on //! the transformed curve for the transform of the @@ -268,16 +268,16 @@ public: //! Value(U).Transformed(T) //! //! This methods calls the basis curve method. - Standard_EXPORT double ParametricTransformation(const gp_Trsf2d& T) const override; + Standard_EXPORT double ParametricTransformation(const gp_Trsf2d& T) const final; //! Creates a new object, which is a copy of this offset curve. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! Returns continuity of the basis curve. Standard_EXPORT GeomAbs_Shape GetBasisCurveContinuity() const; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; DEFINE_STANDARD_RTTIEXT(Geom2d_OffsetCurve, Geom2d_Curve) diff --git a/src/ModelingData/TKG2d/Geom2d/Geom2d_Parabola.hxx b/src/ModelingData/TKG2d/Geom2d/Geom2d_Parabola.hxx index 384cd5a53a..fd73ae0bee 100644 --- a/src/ModelingData/TKG2d/Geom2d/Geom2d_Parabola.hxx +++ b/src/ModelingData/TKG2d/Geom2d/Geom2d_Parabola.hxx @@ -104,19 +104,19 @@ public: //! Computes the parameter on the reversed parabola //! for the point of parameter U on this parabola. //! For a parabola, the returned value is -U. - Standard_EXPORT double ReversedParameter(const double U) const override; + Standard_EXPORT double ReversedParameter(const double U) const final; //! Returns RealFirst from Standard. - Standard_EXPORT double FirstParameter() const override; + Standard_EXPORT double FirstParameter() const final; //! Returns RealLast from Standard. - Standard_EXPORT double LastParameter() const override; + Standard_EXPORT double LastParameter() const final; //! Returns False - Standard_EXPORT bool IsClosed() const override; + Standard_EXPORT bool IsClosed() const final; //! Returns False - Standard_EXPORT bool IsPeriodic() const override; + Standard_EXPORT bool IsPeriodic() const final; //! The directrix is parallel to the "YAxis" of the parabola. //! The "Location" point of the directrix is the intersection @@ -124,7 +124,7 @@ public: Standard_EXPORT gp_Ax2d Directrix() const; //! Returns the eccentricity e = 1.0 - Standard_EXPORT double Eccentricity() const override; + Standard_EXPORT double Eccentricity() const final; //! Computes the focus of this parabola The focus is on the //! positive side of the "X Axis" of the local coordinate system of the parabola. @@ -147,14 +147,14 @@ public: //! P = S + F * (U * U * XDir + * U * YDir) //! where S is the vertex of the parabola, XDir the XDirection and //! YDir the YDirection of the parabola's local coordinate system. - Standard_EXPORT void D0(const double U, gp_Pnt2d& P) const override; + Standard_EXPORT void D0(const double U, gp_Pnt2d& P) const final; //! Returns the point P of parameter U and the first derivative V1. - Standard_EXPORT void D1(const double U, gp_Pnt2d& P, gp_Vec2d& V1) const override; + Standard_EXPORT void D1(const double U, gp_Pnt2d& P, gp_Vec2d& V1) const final; //! Returns the point P of parameter U, the first and second //! derivatives V1 and V2. - Standard_EXPORT void D2(const double U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const override; + Standard_EXPORT void D2(const double U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const final; //! Returns the point P of parameter U, the first second and third //! derivatives V1 V2 and V3. @@ -162,21 +162,21 @@ public: gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, - gp_Vec2d& V3) const override; + gp_Vec2d& V3) const final; //! For the point of parameter U of this parabola, //! computes the vector corresponding to the Nth derivative. //! Exceptions Standard_RangeError if N is less than 1. - Standard_EXPORT gp_Vec2d DN(const double U, const int N) const override; + Standard_EXPORT gp_Vec2d DN(const double U, const int N) const final; //! Applies the transformation T to this parabola. - Standard_EXPORT void Transform(const gp_Trsf2d& T) override; + Standard_EXPORT void Transform(const gp_Trsf2d& T) final; //! Computes the parameter on the transformed //! parabola, for the point of parameter U on this parabola. //! For a parabola, the returned value is equal to U //! multiplied by the scale factor of transformation T. - Standard_EXPORT double TransformedParameter(const double U, const gp_Trsf2d& T) const override; + Standard_EXPORT double TransformedParameter(const double U, const gp_Trsf2d& T) const final; //! Returns a coefficient to compute the parameter on //! the transformed curve for the transform of the @@ -189,13 +189,13 @@ public: //! Value(U).Transformed(T) //! //! This methods returns T.ScaleFactor() - Standard_EXPORT double ParametricTransformation(const gp_Trsf2d& T) const override; + Standard_EXPORT double ParametricTransformation(const gp_Trsf2d& T) const final; //! Creates a new object, which is a copy of this parabola. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; DEFINE_STANDARD_RTTIEXT(Geom2d_Parabola, Geom2d_Conic) diff --git a/src/ModelingData/TKG2d/Geom2d/Geom2d_TrimmedCurve.hxx b/src/ModelingData/TKG2d/Geom2d/Geom2d_TrimmedCurve.hxx index 30cad95cea..bbf8fe0156 100644 --- a/src/ModelingData/TKG2d/Geom2d/Geom2d_TrimmedCurve.hxx +++ b/src/ModelingData/TKG2d/Geom2d/Geom2d_TrimmedCurve.hxx @@ -90,13 +90,13 @@ public: //! - the reversed basis curve, whose parameter range is still [ 0.,1. ], and //! - the two trim values 1. - U2 (first parameter) //! and 1. - U1 (last parameter). - Standard_EXPORT void Reverse() override; + Standard_EXPORT void Reverse() final; //! Returns the parameter on the reversed curve for //! the point of parameter U on . //! //! returns UFirst + ULast - U - Standard_EXPORT double ReversedParameter(const double U) const override; + Standard_EXPORT double ReversedParameter(const double U) const final; //! Changes this trimmed curve, by redefining the //! parameter values U1 and U2, which limit its basis curve. @@ -133,7 +133,7 @@ public: //! C2 : continuity of the second derivative all along the Curve, //! C3 : continuity of the third derivative all along the Curve, //! CN : the order of continuity is infinite. - Standard_EXPORT GeomAbs_Shape Continuity() const override; + Standard_EXPORT GeomAbs_Shape Continuity() const final; //! --- Purpose //! Returns True if the order of continuity of the @@ -143,34 +143,34 @@ public: //! the continuity of the basis curve because you consider //! only a part of the basis curve. //! Raised if N < 0. - Standard_EXPORT bool IsCN(const int N) const override; + Standard_EXPORT bool IsCN(const int N) const final; //! Returns the end point of . This point is the //! evaluation of the curve for the "LastParameter". - Standard_EXPORT gp_Pnt2d EndPoint() const override; + Standard_EXPORT gp_Pnt2d EndPoint() const final; //! Returns the value of the first parameter of . //! The first parameter is the parameter of the "StartPoint" //! of the trimmed curve. - Standard_EXPORT double FirstParameter() const override; + Standard_EXPORT double FirstParameter() const final; //! Returns True if the distance between the StartPoint and //! the EndPoint is lower or equal to Resolution from package //! gp. - Standard_EXPORT bool IsClosed() const override; + Standard_EXPORT bool IsClosed() const final; //! Always returns FALSE (independently of the type of basis curve). - Standard_EXPORT bool IsPeriodic() const override; + Standard_EXPORT bool IsPeriodic() const final; //! Returns the period of the basis curve of this trimmed curve. //! Exceptions //! Standard_NoSuchObject if the basis curve is not periodic. - Standard_EXPORT double Period() const override; + Standard_EXPORT double Period() const final; //! Returns the value of the last parameter of . //! The last parameter is the parameter of the "EndPoint" of the //! trimmed curve. - Standard_EXPORT double LastParameter() const override; + Standard_EXPORT double LastParameter() const final; //! Returns the start point of . //! This point is the evaluation of the curve from the @@ -179,25 +179,25 @@ public: //! Warnings : //! The returned derivatives have the same orientation as the //! derivatives of the basis curve. - Standard_EXPORT gp_Pnt2d StartPoint() const override; + Standard_EXPORT gp_Pnt2d StartPoint() const final; //! If the basis curve is an OffsetCurve sometimes it is not //! possible to do the evaluation of the curve at the parameter //! U (see class OffsetCurve). - Standard_EXPORT void D0(const double U, gp_Pnt2d& P) const override; + Standard_EXPORT void D0(const double U, gp_Pnt2d& P) const final; //! Raised if the continuity of the curve is not C1. - Standard_EXPORT void D1(const double U, gp_Pnt2d& P, gp_Vec2d& V1) const override; + Standard_EXPORT void D1(const double U, gp_Pnt2d& P, gp_Vec2d& V1) const final; //! Raised if the continuity of the curve is not C2. - Standard_EXPORT void D2(const double U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const override; + Standard_EXPORT void D2(const double U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const final; //! Raised if the continuity of the curve is not C3. Standard_EXPORT void D3(const double U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, - gp_Vec2d& V3) const override; + gp_Vec2d& V3) const final; //! For the point of parameter U of this trimmed curve, //! computes the vector corresponding to the Nth derivative. @@ -209,11 +209,11 @@ public: //! Exceptions //! Standard_RangeError if N is less than 1. //! geometric transformations - Standard_EXPORT gp_Vec2d DN(const double U, const int N) const override; + Standard_EXPORT gp_Vec2d DN(const double U, const int N) const final; //! Applies the transformation T to this trimmed curve. //! Warning The basis curve is also modified. - Standard_EXPORT void Transform(const gp_Trsf2d& T) override; + Standard_EXPORT void Transform(const gp_Trsf2d& T) final; //! Returns the parameter on the transformed curve for //! the transform of the point of parameter U on . @@ -225,7 +225,7 @@ public: //! me->Value(U).Transformed(T) //! //! This methods calls the basis curve method. - Standard_EXPORT double TransformedParameter(const double U, const gp_Trsf2d& T) const override; + Standard_EXPORT double TransformedParameter(const double U, const gp_Trsf2d& T) const final; //! Returns a coefficient to compute the parameter on //! the transformed curve for the transform of the @@ -238,13 +238,13 @@ public: //! Value(U).Transformed(T) //! //! This methods calls the basis curve method. - Standard_EXPORT double ParametricTransformation(const gp_Trsf2d& T) const override; + Standard_EXPORT double ParametricTransformation(const gp_Trsf2d& T) const final; //! Creates a new object, which is a copy of this trimmed curve. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; DEFINE_STANDARD_RTTIEXT(Geom2d_TrimmedCurve, Geom2d_BoundedCurve) diff --git a/src/ModelingData/TKG2d/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx b/src/ModelingData/TKG2d/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx index 247c214785..4752d4a675 100644 --- a/src/ModelingData/TKG2d/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx +++ b/src/ModelingData/TKG2d/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -93,6 +94,11 @@ occ::handle Geom2dAdaptor_Curve::ShallowCopy() const { aCopy->myCurveData = BezierData{}; } + else + { + // Elementary curve types (gp_Lin2d, gp_Circ2d, etc.) are value types + aCopy->myCurveData = myCurveData; + } return aCopy; } @@ -245,22 +251,27 @@ void Geom2dAdaptor_Curve::load(const occ::handle& C, else if (TheType == STANDARD_TYPE(Geom2d_Circle)) { myTypeCurve = GeomAbs_Circle; + myCurveData = occ::down_cast(C)->Circ2d(); } else if (TheType == STANDARD_TYPE(Geom2d_Line)) { myTypeCurve = GeomAbs_Line; + myCurveData = occ::down_cast(C)->Lin2d(); } else if (TheType == STANDARD_TYPE(Geom2d_Ellipse)) { myTypeCurve = GeomAbs_Ellipse; + myCurveData = occ::down_cast(C)->Elips2d(); } else if (TheType == STANDARD_TYPE(Geom2d_Parabola)) { myTypeCurve = GeomAbs_Parabola; + myCurveData = occ::down_cast(C)->Parab2d(); } else if (TheType == STANDARD_TYPE(Geom2d_Hyperbola)) { myTypeCurve = GeomAbs_Hyperbola; + myCurveData = occ::down_cast(C)->Hypr2d(); } else if (TheType == STANDARD_TYPE(Geom2d_BezierCurve)) { @@ -639,6 +650,22 @@ void Geom2dAdaptor_Curve::D0(const double U, gp_Pnt2d& P) const { switch (myTypeCurve) { + case GeomAbs_Line: + P = ElCLib::Value(U, std::get(myCurveData)); + break; + case GeomAbs_Circle: + P = ElCLib::Value(U, std::get(myCurveData)); + break; + case GeomAbs_Ellipse: + P = ElCLib::Value(U, std::get(myCurveData)); + break; + case GeomAbs_Hyperbola: + P = ElCLib::Value(U, std::get(myCurveData)); + break; + case GeomAbs_Parabola: + P = ElCLib::Value(U, std::get(myCurveData)); + break; + case GeomAbs_BezierCurve: { auto& aBezierData = std::get(myCurveData); // use cached data @@ -688,6 +715,22 @@ void Geom2dAdaptor_Curve::D1(const double U, gp_Pnt2d& P, gp_Vec2d& V) const { switch (myTypeCurve) { + case GeomAbs_Line: + ElCLib::D1(U, std::get(myCurveData), P, V); + break; + case GeomAbs_Circle: + ElCLib::D1(U, std::get(myCurveData), P, V); + break; + case GeomAbs_Ellipse: + ElCLib::D1(U, std::get(myCurveData), P, V); + break; + case GeomAbs_Hyperbola: + ElCLib::D1(U, std::get(myCurveData), P, V); + break; + case GeomAbs_Parabola: + ElCLib::D1(U, std::get(myCurveData), P, V); + break; + case GeomAbs_BezierCurve: { auto& aBezierData = std::get(myCurveData); // use cached data @@ -738,6 +781,23 @@ void Geom2dAdaptor_Curve::D2(const double U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d { switch (myTypeCurve) { + case GeomAbs_Line: + ElCLib::D1(U, std::get(myCurveData), P, V1); + V2.SetCoord(0., 0.); + break; + case GeomAbs_Circle: + ElCLib::D2(U, std::get(myCurveData), P, V1, V2); + break; + case GeomAbs_Ellipse: + ElCLib::D2(U, std::get(myCurveData), P, V1, V2); + break; + case GeomAbs_Hyperbola: + ElCLib::D2(U, std::get(myCurveData), P, V1, V2); + break; + case GeomAbs_Parabola: + ElCLib::D2(U, std::get(myCurveData), P, V1, V2); + break; + case GeomAbs_BezierCurve: { auto& aBezierData = std::get(myCurveData); // use cached data @@ -793,6 +853,25 @@ void Geom2dAdaptor_Curve::D3(const double U, { switch (myTypeCurve) { + case GeomAbs_Line: + ElCLib::D1(U, std::get(myCurveData), P, V1); + V2.SetCoord(0., 0.); + V3.SetCoord(0., 0.); + break; + case GeomAbs_Circle: + ElCLib::D3(U, std::get(myCurveData), P, V1, V2, V3); + break; + case GeomAbs_Ellipse: + ElCLib::D3(U, std::get(myCurveData), P, V1, V2, V3); + break; + case GeomAbs_Hyperbola: + ElCLib::D3(U, std::get(myCurveData), P, V1, V2, V3); + break; + case GeomAbs_Parabola: + ElCLib::D2(U, std::get(myCurveData), P, V1, V2); + V3.SetCoord(0., 0.); + break; + case GeomAbs_BezierCurve: { auto& aBezierData = std::get(myCurveData); // use cached data @@ -845,6 +924,17 @@ gp_Vec2d Geom2dAdaptor_Curve::DN(const double U, const int N) const { switch (myTypeCurve) { + case GeomAbs_Line: + return ElCLib::DN(U, std::get(myCurveData), N); + case GeomAbs_Circle: + return ElCLib::DN(U, std::get(myCurveData), N); + case GeomAbs_Ellipse: + return ElCLib::DN(U, std::get(myCurveData), N); + case GeomAbs_Hyperbola: + return ElCLib::DN(U, std::get(myCurveData), N); + case GeomAbs_Parabola: + return ElCLib::DN(U, std::get(myCurveData), N); + case GeomAbs_BezierCurve: return myCurve->DN(U, N); @@ -893,14 +983,14 @@ double Geom2dAdaptor_Curve::Resolution(const double Ruv) const case GeomAbs_Line: return Ruv; case GeomAbs_Circle: { - double R = occ::down_cast(myCurve)->Circ2d().Radius(); + double R = std::get(myCurveData).Radius(); if (R > Ruv / 2.) return 2 * std::asin(Ruv / (2 * R)); else return 2 * M_PI; } case GeomAbs_Ellipse: { - return Ruv / occ::down_cast(myCurve)->MajorRadius(); + return Ruv / std::get(myCurveData).MajorRadius(); } case GeomAbs_BezierCurve: { double res; @@ -928,7 +1018,7 @@ gp_Lin2d Geom2dAdaptor_Curve::Line() const { Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Line, "Geom2dAdaptor_Curve::Line() - curve is not a Line"); - return occ::down_cast(myCurve)->Lin2d(); + return std::get(myCurveData); } //================================================================================================= @@ -937,7 +1027,7 @@ gp_Circ2d Geom2dAdaptor_Curve::Circle() const { Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Circle, "Geom2dAdaptor_Curve::Circle() - curve is not a Circle"); - return occ::down_cast(myCurve)->Circ2d(); + return std::get(myCurveData); } //================================================================================================= @@ -946,7 +1036,7 @@ gp_Elips2d Geom2dAdaptor_Curve::Ellipse() const { Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Ellipse, "Geom2dAdaptor_Curve::Ellipse() - curve is not an Ellipse"); - return occ::down_cast(myCurve)->Elips2d(); + return std::get(myCurveData); } //================================================================================================= @@ -955,7 +1045,7 @@ gp_Hypr2d Geom2dAdaptor_Curve::Hyperbola() const { Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Hyperbola, "Geom2dAdaptor_Curve::Hyperbola() - curve is not a Hyperbola"); - return occ::down_cast(myCurve)->Hypr2d(); + return std::get(myCurveData); } //================================================================================================= @@ -964,7 +1054,7 @@ gp_Parab2d Geom2dAdaptor_Curve::Parabola() const { Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Parabola, "Geom2dAdaptor_Curve::Parabola() - curve is not a Parabola"); - return occ::down_cast(myCurve)->Parab2d(); + return std::get(myCurveData); } //================================================================================================= diff --git a/src/ModelingData/TKG2d/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx b/src/ModelingData/TKG2d/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx index 21e83b5f37..cfb8c63d04 100644 --- a/src/ModelingData/TKG2d/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx +++ b/src/ModelingData/TKG2d/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx @@ -22,6 +22,11 @@ #include #include #include +#include +#include +#include +#include +#include #include #include #include @@ -30,11 +35,6 @@ #include class gp_Vec2d; -class gp_Lin2d; -class gp_Circ2d; -class gp_Elips2d; -class gp_Hypr2d; -class gp_Parab2d; class Geom2d_BezierCurve; class Geom2d_BSplineCurve; @@ -70,7 +70,15 @@ public: }; //! Variant type for 2D curve-specific evaluation data. - using CurveDataVariant = std::variant; + using CurveDataVariant = std::variant; public: Standard_EXPORT Geom2dAdaptor_Curve(); @@ -149,22 +157,22 @@ public: Standard_EXPORT double Period() const override; //! Computes the point of parameter U on the curve - Standard_EXPORT gp_Pnt2d Value(const double U) const override; + Standard_EXPORT gp_Pnt2d Value(const double U) const final; //! Computes the point of parameter U. - Standard_EXPORT void D0(const double U, gp_Pnt2d& P) const override; + Standard_EXPORT void D0(const double U, gp_Pnt2d& P) const final; //! Computes the point of parameter U on the curve with its //! first derivative. //! Raised if the continuity of the current interval //! is not C1. - Standard_EXPORT void D1(const double U, gp_Pnt2d& P, gp_Vec2d& V) const override; + Standard_EXPORT void D1(const double U, gp_Pnt2d& P, gp_Vec2d& V) const final; //! Returns the point P of parameter U, the first and second //! derivatives V1 and V2. //! Raised if the continuity of the current interval //! is not C2. - Standard_EXPORT void D2(const double U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const override; + Standard_EXPORT void D2(const double U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const final; //! Returns the point P of parameter U, the first, the second //! and the third derivative. @@ -174,14 +182,14 @@ public: gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, - gp_Vec2d& V3) const override; + gp_Vec2d& V3) const final; //! The returned vector gives the value of the derivative for the //! order of derivation N. //! Raised if the continuity of the current interval //! is not CN. //! Raised if N < 1. - Standard_EXPORT gp_Vec2d DN(const double U, const int N) const override; + Standard_EXPORT gp_Vec2d DN(const double U, const int N) const final; //! returns the parametric resolution Standard_EXPORT double Resolution(const double Ruv) const override; diff --git a/src/ModelingData/TKG3d/Geom/Geom_BSplineCurve.hxx b/src/ModelingData/TKG3d/Geom/Geom_BSplineCurve.hxx index 2501f398eb..3e0c9f98f7 100644 --- a/src/ModelingData/TKG3d/Geom/Geom_BSplineCurve.hxx +++ b/src/ModelingData/TKG3d/Geom/Geom_BSplineCurve.hxx @@ -276,13 +276,13 @@ public: //! initial curve becomes the EndPoint of the reversed curve //! and the EndPoint of the initial curve becomes the StartPoint //! of the reversed curve. - Standard_EXPORT void Reverse() override; + Standard_EXPORT void Reverse() final; //! Returns the parameter on the reversed curve for //! the point of parameter U on . //! //! returns UFirst + ULast - U - Standard_EXPORT double ReversedParameter(const double U) const override; + Standard_EXPORT double ReversedParameter(const double U) const final; //! Modifies this BSpline curve by segmenting it between //! U1 and U2. Either of these values can be outside the @@ -454,7 +454,7 @@ public: //! Returns the continuity of the curve, the curve is at least C0. //! Raised if N < 0. - Standard_EXPORT bool IsCN(const int N) const override; + Standard_EXPORT bool IsCN(const int N) const final; //! Check if curve has at least G1 continuity in interval [theTf, theTl] //! Returns true if IsCN(1) @@ -470,10 +470,10 @@ public: //! Warnings : //! The first and the last point can be different from the first //! pole and the last pole of the curve. - Standard_EXPORT bool IsClosed() const override; + Standard_EXPORT bool IsClosed() const final; //! Returns True if the curve is periodic. - Standard_EXPORT bool IsPeriodic() const override; + Standard_EXPORT bool IsPeriodic() const final; //! Returns True if the weights are not identical. //! The tolerance criterion is Epsilon of the class Real. @@ -491,7 +491,7 @@ public: //! than Cd-p where p is the maximum multiplicity of the interior //! Knots. In the interior of a knot span the curve is infinitely //! continuously differentiable. - Standard_EXPORT GeomAbs_Shape Continuity() const override; + Standard_EXPORT GeomAbs_Shape Continuity() const final; //! Returns the degree of this BSpline curve. //! The degree of a Geom_BSplineCurve curve cannot @@ -500,20 +500,20 @@ public: Standard_EXPORT int Degree() const; //! Returns in P the point of parameter U. - Standard_EXPORT void D0(const double U, gp_Pnt& P) const override; + Standard_EXPORT void D0(const double U, gp_Pnt& P) const final; //! Raised if the continuity of the curve is not C1. - Standard_EXPORT void D1(const double U, gp_Pnt& P, gp_Vec& V1) const override; + Standard_EXPORT void D1(const double U, gp_Pnt& P, gp_Vec& V1) const final; //! Raised if the continuity of the curve is not C2. - Standard_EXPORT void D2(const double U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const override; + Standard_EXPORT void D2(const double U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const final; //! Raised if the continuity of the curve is not C3. Standard_EXPORT void D3(const double U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, - gp_Vec& V3) const override; + gp_Vec& V3) const final; //! For the point of parameter U of this BSpline curve, //! computes the vector corresponding to the Nth derivative. @@ -537,7 +537,7 @@ public: //! the same as if we consider the whole definition of the //! curve. Of course the evaluations are different outside //! this parametric domain. - Standard_EXPORT gp_Vec DN(const double U, const int N) const override; + Standard_EXPORT gp_Vec DN(const double U, const int N) const final; //! Raised if FromK1 = ToK2. Standard_EXPORT gp_Pnt LocalValue(const double U, const int FromK1, const int ToK2) const; @@ -589,7 +589,7 @@ public: //! The last point of the curve is different from the last //! pole of the curve if the multiplicity of the last knot //! is lower than Degree. - Standard_EXPORT gp_Pnt EndPoint() const override; + Standard_EXPORT gp_Pnt EndPoint() const final; //! Returns the index in the knot array of the knot //! corresponding to the first or last parameter of this BSpline curve. @@ -604,7 +604,7 @@ public: //! Returns the value of the first parameter of this //! BSpline curve. This is a knot value. //! The first parameter is the one of the start point of the BSpline curve. - Standard_EXPORT double FirstParameter() const override; + Standard_EXPORT double FirstParameter() const final; //! Returns the knot of range Index. When there is a knot //! with a multiplicity greater than 1 the knot is not repeated. @@ -714,7 +714,7 @@ public: //! Computes the parametric value of the end point of the curve. //! It is a knot value. - Standard_EXPORT double LastParameter() const override; + Standard_EXPORT double LastParameter() const final; //! Locates the parametric value U in the sequence of knots. //! If "WithKnotRepetition" is True we consider the knot's @@ -769,7 +769,7 @@ public: //! Warnings : //! This point is different from the first pole of the curve if the //! multiplicity of the first knot is lower than Degree. - Standard_EXPORT gp_Pnt StartPoint() const override; + Standard_EXPORT gp_Pnt StartPoint() const final; //! Returns the weight of the pole of range Index . //! Raised if Index < 1 or Index > NbPoles. @@ -792,7 +792,7 @@ public: const NCollection_Array1& WeightsArray() const { return myWeights; } //! Applies the transformation T to this BSpline curve. - Standard_EXPORT void Transform(const gp_Trsf& T) override; + Standard_EXPORT void Transform(const gp_Trsf& T) final; //! Returns the value of the maximum degree of the normalized //! B-spline basis functions in this package. @@ -807,14 +807,14 @@ public: Standard_EXPORT void Resolution(const double Tolerance3D, double& UTolerance); //! Creates a new object which is a copy of this BSpline curve. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! Compare two Bspline curve on identity; Standard_EXPORT bool IsEqual(const occ::handle& theOther, const double thePreci) const; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; DEFINE_STANDARD_RTTIEXT(Geom_BSplineCurve, Geom_BoundedCurve) diff --git a/src/ModelingData/TKG3d/Geom/Geom_BSplineSurface.hxx b/src/ModelingData/TKG3d/Geom/Geom_BSplineSurface.hxx index 9bf80e4f4a..25360fda90 100644 --- a/src/ModelingData/TKG3d/Geom/Geom_BSplineSurface.hxx +++ b/src/ModelingData/TKG3d/Geom/Geom_BSplineSurface.hxx @@ -319,7 +319,7 @@ public: //! direction is reversed. Hence the orientation of the //! surface is reversed. //! The knots and poles tables are modified. - Standard_EXPORT void UReverse() override; + Standard_EXPORT void UReverse() final; //! Changes the orientation of this BSpline surface in the //! V parametric direction. The bounds of the @@ -327,7 +327,7 @@ public: //! direction is reversed. Hence the orientation of the //! surface is reversed. //! The knots and poles tables are modified. - Standard_EXPORT void VReverse() override; + Standard_EXPORT void VReverse() final; //! Computes the u parameter on the modified //! surface, produced by reversing its U parametric @@ -337,7 +337,7 @@ public: //! where UFirst, ULast are //! the values of the first and last parameters of this //! BSpline surface, in the u parametric directions. - Standard_EXPORT double UReversedParameter(const double U) const override; + Standard_EXPORT double UReversedParameter(const double U) const final; //! Computes the v parameter on the modified //! surface, produced by reversing its V parametric @@ -347,7 +347,7 @@ public: //! VFirst and VLast are //! the values of the first and last parameters of this //! BSpline surface, in the v pametric directions. - Standard_EXPORT double VReversedParameter(const double V) const override; + Standard_EXPORT double VReversedParameter(const double V) const final; //! Increases the degrees of this BSpline surface to //! UDegree and VDegree in the u and v parametric @@ -809,27 +809,27 @@ public: //! Returns true if the first control points row and the last //! control points row are identical. The tolerance criterion //! is Resolution from package gp. - Standard_EXPORT bool IsUClosed() const override; + Standard_EXPORT bool IsUClosed() const final; //! Returns true if the first control points column and the //! last last control points column are identical. //! The tolerance criterion is Resolution from package gp. - Standard_EXPORT bool IsVClosed() const override; + Standard_EXPORT bool IsVClosed() const final; //! Returns True if the order of continuity of the surface in the //! U direction is N. //! Raised if N < 0. - Standard_EXPORT bool IsCNu(const int N) const override; + Standard_EXPORT bool IsCNu(const int N) const final; //! Returns True if the order of continuity of the surface //! in the V direction is N. //! Raised if N < 0. - Standard_EXPORT bool IsCNv(const int N) const override; + Standard_EXPORT bool IsCNv(const int N) const final; //! Returns True if the surface is closed in the U direction //! and if the B-spline has been turned into a periodic surface //! using the function SetUPeriodic. - Standard_EXPORT bool IsUPeriodic() const override; + Standard_EXPORT bool IsUPeriodic() const final; //! Returns False if for each row of weights all the weights //! are identical. @@ -843,7 +843,7 @@ public: //! Returns True if the surface is closed in the V direction //! and if the B-spline has been turned into a periodic //! surface using the function SetVPeriodic. - Standard_EXPORT bool IsVPeriodic() const override; + Standard_EXPORT bool IsVPeriodic() const final; //! Returns False if for each column of weights all the weights //! are identical. @@ -860,7 +860,7 @@ public: //! knots UKnots and VKnots only if the first knots and the //! last knots have a multiplicity equal to UDegree + 1 or //! VDegree + 1 - Standard_EXPORT void Bounds(double& U1, double& U2, double& V1, double& V2) const override; + Standard_EXPORT void Bounds(double& U1, double& U2, double& V1, double& V2) const final; //! Returns the continuity of the surface : //! C0 : only geometric continuity, @@ -875,7 +875,7 @@ public: //! Example : //! If the surface is C1 in the V direction and C2 in the U //! direction this function returns Shape = C1. - Standard_EXPORT GeomAbs_Shape Continuity() const override; + Standard_EXPORT GeomAbs_Shape Continuity() const final; //! Computes the Index of the UKnots which gives the first //! parametric value of the surface in the U direction. @@ -1083,14 +1083,14 @@ public: //! value and derivatives computation Standard_EXPORT const NCollection_Array2* Weights() const; - Standard_EXPORT void D0(const double U, const double V, gp_Pnt& P) const override; + Standard_EXPORT void D0(const double U, const double V, gp_Pnt& P) const final; //! Raised if the continuity of the surface is not C1. Standard_EXPORT void D1(const double U, const double V, gp_Pnt& P, gp_Vec& D1U, - gp_Vec& D1V) const override; + gp_Vec& D1V) const final; //! Raised if the continuity of the surface is not C2. Standard_EXPORT void D2(const double U, @@ -1100,7 +1100,7 @@ public: gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, - gp_Vec& D2UV) const override; + gp_Vec& D2UV) const final; //! Raised if the continuity of the surface is not C3. Standard_EXPORT void D3(const double U, @@ -1114,7 +1114,7 @@ public: gp_Vec& D3U, gp_Vec& D3V, gp_Vec& D3UUV, - gp_Vec& D3UVV) const override; + gp_Vec& D3UVV) const final; //! Nu is the order of derivation in the U parametric direction and //! Nv is the order of derivation in the V parametric direction. @@ -1137,10 +1137,7 @@ public: //! the evaluations are the same as if we consider the whole //! definition of the surface. Of course the evaluations are //! different outside this parametric domain. - Standard_EXPORT gp_Vec DN(const double U, - const double V, - const int Nu, - const int Nv) const override; + Standard_EXPORT gp_Vec DN(const double U, const double V, const int Nu, const int Nv) const final; //! Raised if FromUK1 = ToUK2 or FromVK1 = ToVK2. Standard_EXPORT void LocalD0(const double U, @@ -1228,11 +1225,11 @@ public: //! Computes the U isoparametric curve. //! A B-spline curve is returned. - Standard_EXPORT occ::handle UIso(const double U) const override; + Standard_EXPORT occ::handle UIso(const double U) const final; //! Computes the V isoparametric curve. //! A B-spline curve is returned. - Standard_EXPORT occ::handle VIso(const double V) const override; + Standard_EXPORT occ::handle VIso(const double V) const final; //! Computes the U isoparametric curve. //! If CheckRational=False, no try to make it non-rational. @@ -1246,7 +1243,7 @@ public: Standard_EXPORT occ::handle VIso(const double V, const bool CheckRational) const; //! Applies the transformation T to this BSpline surface. - Standard_EXPORT void Transform(const gp_Trsf& T) override; + Standard_EXPORT void Transform(const gp_Trsf& T) final; //! Returns the value of the maximum degree of the normalized //! B-spline basis functions in the u and v directions. @@ -1265,10 +1262,10 @@ public: Standard_EXPORT void Resolution(const double Tolerance3D, double& UTolerance, double& VTolerance); //! Creates a new object which is a copy of this BSpline surface. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; DEFINE_STANDARD_RTTIEXT(Geom_BSplineSurface, Geom_BoundedSurface) diff --git a/src/ModelingData/TKG3d/Geom/Geom_BezierCurve.hxx b/src/ModelingData/TKG3d/Geom/Geom_BezierCurve.hxx index ae14ead29e..3ef28e3995 100644 --- a/src/ModelingData/TKG3d/Geom/Geom_BezierCurve.hxx +++ b/src/ModelingData/TKG3d/Geom/Geom_BezierCurve.hxx @@ -157,13 +157,13 @@ public: //! Reverses the direction of parametrization of //! Value (NewU) = Value (1 - OldU) - Standard_EXPORT void Reverse() override; + Standard_EXPORT void Reverse() final; //! Returns the parameter on the reversed curve for //! the point of parameter U on . //! //! returns 1-U - Standard_EXPORT double ReversedParameter(const double U) const override; + Standard_EXPORT double ReversedParameter(const double U) const final; //! Segments the curve between U1 and U2 which can be out //! of the bounds of the curve. The curve is oriented from U1 @@ -205,21 +205,21 @@ public: //! Returns True if the distance between the first point //! and the last point of the curve is lower or equal to //! the Resolution from package gp. - Standard_EXPORT bool IsClosed() const override; + Standard_EXPORT bool IsClosed() const final; //! Continuity of the curve, returns True. - Standard_EXPORT bool IsCN(const int N) const override; + Standard_EXPORT bool IsCN(const int N) const final; //! Returns True if the parametrization of a curve is periodic. //! (P(u) = P(u + T) T = constante) - Standard_EXPORT bool IsPeriodic() const override; + Standard_EXPORT bool IsPeriodic() const final; //! Returns false if all the weights are identical. The tolerance //! criterion is Resolution from package gp. Standard_EXPORT bool IsRational() const; //! a Bezier curve is CN - Standard_EXPORT GeomAbs_Shape Continuity() const override; + Standard_EXPORT GeomAbs_Shape Continuity() const final; //! Returns the polynomial degree of the curve. //! it is the number of poles - 1 @@ -228,11 +228,11 @@ public: //! parameter U can be out of the bounds of the curve. Standard_EXPORT int Degree() const; - Standard_EXPORT void D0(const double U, gp_Pnt& P) const override; + Standard_EXPORT void D0(const double U, gp_Pnt& P) const final; - Standard_EXPORT void D1(const double U, gp_Pnt& P, gp_Vec& V1) const override; + Standard_EXPORT void D1(const double U, gp_Pnt& P, gp_Vec& V1) const final; - Standard_EXPORT void D2(const double U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const override; + Standard_EXPORT void D2(const double U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const final; //! For this Bezier curve, computes //! - the point P of parameter U, or @@ -245,27 +245,27 @@ public: gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, - gp_Vec& V3) const override; + gp_Vec& V3) const final; //! For the point of parameter U of this Bezier curve, //! computes the vector corresponding to the Nth derivative. //! Note: the parameter U can be outside the bounds of the curve. //! Exceptions Standard_RangeError if N is less than 1. - Standard_EXPORT gp_Vec DN(const double U, const int N) const override; + Standard_EXPORT gp_Vec DN(const double U, const int N) const final; //! Returns Value (U=0.), it is the first control point of the curve. - Standard_EXPORT gp_Pnt StartPoint() const override; + Standard_EXPORT gp_Pnt StartPoint() const final; //! Returns Value (U=1.), it is the last control point of the Bezier curve. - Standard_EXPORT gp_Pnt EndPoint() const override; + Standard_EXPORT gp_Pnt EndPoint() const final; //! Returns the value of the first parameter of this //! Bezier curve. This is 0.0, which gives the start point of this Bezier curve - Standard_EXPORT double FirstParameter() const override; + Standard_EXPORT double FirstParameter() const final; //! Returns the value of the last parameter of this //! Bezier curve. This is 1.0, which gives the end point of this Bezier curve. - Standard_EXPORT double LastParameter() const override; + Standard_EXPORT double LastParameter() const final; //! Returns the number of poles of this Bezier curve. Standard_EXPORT int NbPoles() const; @@ -307,7 +307,7 @@ public: const NCollection_Array1& WeightsArray() const { return myWeights; } //! Applies the transformation T to this Bezier curve. - Standard_EXPORT void Transform(const gp_Trsf& T) override; + Standard_EXPORT void Transform(const gp_Trsf& T) final; //! Returns the value of the maximum polynomial degree //! of any Geom_BezierCurve curve. This value is 25. @@ -321,10 +321,10 @@ public: Standard_EXPORT void Resolution(const double Tolerance3D, double& UTolerance); //! Creates a new object which is a copy of this Bezier curve. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; //! Returns Bezier knots {0.0, 1.0} as a static array. Standard_EXPORT const NCollection_Array1& Knots() const; diff --git a/src/ModelingData/TKG3d/Geom/Geom_BezierSurface.hxx b/src/ModelingData/TKG3d/Geom/Geom_BezierSurface.hxx index 9cbacf7e3f..f3c353a4e9 100644 --- a/src/ModelingData/TKG3d/Geom/Geom_BezierSurface.hxx +++ b/src/ModelingData/TKG3d/Geom/Geom_BezierSurface.hxx @@ -394,7 +394,7 @@ public: //! u parametric direction. The bounds of the //! surface are not changed, but the given parametric //! direction is reversed. Hence, the orientation of the surface is reversed. - Standard_EXPORT void UReverse() override; + Standard_EXPORT void UReverse() final; //! Computes the u (or v) parameter on the modified //! surface, produced by reversing its u (or v) parametric @@ -402,14 +402,14 @@ public: //! parameter V) on this Bezier surface. //! In the case of a Bezier surface, these functions return respectively: //! - 1.-U, or 1.-V. - Standard_EXPORT double UReversedParameter(const double U) const override; + Standard_EXPORT double UReversedParameter(const double U) const final; //! Changes the orientation of this Bezier surface in the //! v parametric direction. The bounds of the //! surface are not changed, but the given parametric //! direction is reversed. Hence, the orientation of the //! surface is reversed. - Standard_EXPORT void VReverse() override; + Standard_EXPORT void VReverse() final; //! Computes the u (or v) parameter on the modified //! surface, produced by reversing its u (or v) parametric @@ -417,25 +417,25 @@ public: //! parameter V) on this Bezier surface. //! In the case of a Bezier surface, these functions return respectively: //! - 1.-U, or 1.-V. - Standard_EXPORT double VReversedParameter(const double V) const override; + Standard_EXPORT double VReversedParameter(const double V) const final; //! Returns the parametric bounds U1, U2, V1 and V2 of //! this Bezier surface. //! In the case of a Bezier surface, this function returns //! U1 = 0, V1 = 0, U2 = 1, V2 = 1. - Standard_EXPORT void Bounds(double& U1, double& U2, double& V1, double& V2) const override; + Standard_EXPORT void Bounds(double& U1, double& U2, double& V1, double& V2) const final; //! Returns the continuity of the surface CN : the order of //! continuity is infinite. - Standard_EXPORT GeomAbs_Shape Continuity() const override; + Standard_EXPORT GeomAbs_Shape Continuity() const final; - Standard_EXPORT void D0(const double U, const double V, gp_Pnt& P) const override; + Standard_EXPORT void D0(const double U, const double V, gp_Pnt& P) const final; Standard_EXPORT void D1(const double U, const double V, gp_Pnt& P, gp_Vec& D1U, - gp_Vec& D1V) const override; + gp_Vec& D1V) const final; Standard_EXPORT void D2(const double U, const double V, @@ -444,7 +444,7 @@ public: gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, - gp_Vec& D2UV) const override; + gp_Vec& D2UV) const final; //! Computes P, the point of parameters (U, V) of this Bezier surface, and //! - one or more of the following sets of vectors: @@ -465,7 +465,7 @@ public: gp_Vec& D3U, gp_Vec& D3V, gp_Vec& D3UUV, - gp_Vec& D3UVV) const override; + gp_Vec& D3UVV) const final; //! Computes the derivative of order Nu in the u //! parametric direction, and Nv in the v parametric @@ -474,10 +474,7 @@ public: //! Exceptions //! Standard_RangeError if: //! - Nu + Nv is less than 1, or Nu or Nv is negative. - Standard_EXPORT gp_Vec DN(const double U, - const double V, - const int Nu, - const int Nv) const override; + Standard_EXPORT gp_Vec DN(const double U, const double V, const int Nu, const int Nv) const final; //! Returns the number of poles in the U direction. Standard_EXPORT int NbUPoles() const; @@ -506,7 +503,7 @@ public: //! Computes the U isoparametric curve. For a Bezier surface the //! UIso curve is a Bezier curve. - Standard_EXPORT occ::handle UIso(const double U) const override; + Standard_EXPORT occ::handle UIso(const double U) const final; //! Returns the degree of the surface in the V direction it is //! NbVPoles - 1 @@ -514,7 +511,7 @@ public: //! Computes the V isoparametric curve. For a Bezier surface the //! VIso curve is a Bezier curve. - Standard_EXPORT occ::handle VIso(const double V) const override; + Standard_EXPORT occ::handle VIso(const double V) const final; //! Returns the weight of range UIndex, VIndex //! @@ -545,24 +542,24 @@ public: //! Returns True if the first control points row and the //! last control points row are identical. The tolerance //! criterion is Resolution from package gp. - Standard_EXPORT bool IsUClosed() const override; + Standard_EXPORT bool IsUClosed() const final; //! Returns True if the first control points column //! and the last control points column are identical. //! The tolerance criterion is Resolution from package gp. - Standard_EXPORT bool IsVClosed() const override; + Standard_EXPORT bool IsVClosed() const final; //! Returns True, a Bezier surface is always CN - Standard_EXPORT bool IsCNu(const int N) const override; + Standard_EXPORT bool IsCNu(const int N) const final; //! Returns True, a BezierSurface is always CN - Standard_EXPORT bool IsCNv(const int N) const override; + Standard_EXPORT bool IsCNv(const int N) const final; //! Returns False. - Standard_EXPORT bool IsUPeriodic() const override; + Standard_EXPORT bool IsUPeriodic() const final; //! Returns False. - Standard_EXPORT bool IsVPeriodic() const override; + Standard_EXPORT bool IsVPeriodic() const final; //! Returns False if the weights are identical in the U direction, //! The tolerance criterion is Resolution from package gp. @@ -581,7 +578,7 @@ public: Standard_EXPORT bool IsVRational() const; //! Applies the transformation T to this Bezier surface. - Standard_EXPORT void Transform(const gp_Trsf& T) override; + Standard_EXPORT void Transform(const gp_Trsf& T) final; //! Returns the value of the maximum polynomial degree of a //! Bezier surface. This value is 25. @@ -600,10 +597,10 @@ public: Standard_EXPORT void Resolution(const double Tolerance3D, double& UTolerance, double& VTolerance); //! Creates a new object which is a copy of this Bezier surface. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; //! Returns Bezier knots {0.0, 1.0} as a static array. Standard_EXPORT const NCollection_Array1& UKnots() const; diff --git a/src/ModelingData/TKG3d/Geom/Geom_Circle.hxx b/src/ModelingData/TKG3d/Geom/Geom_Circle.hxx index 1da925e1ca..a211c395a8 100644 --- a/src/ModelingData/TKG3d/Geom/Geom_Circle.hxx +++ b/src/ModelingData/TKG3d/Geom/Geom_Circle.hxx @@ -93,39 +93,39 @@ public: //! Computes the parameter on the reversed circle for //! the point of parameter U on this circle. //! For a circle, the returned value is: 2.*Pi - U. - Standard_EXPORT double ReversedParameter(const double U) const override; + Standard_EXPORT double ReversedParameter(const double U) const final; //! Returns the eccentricity e = 0 for a circle. - Standard_EXPORT double Eccentricity() const override; + Standard_EXPORT double Eccentricity() const final; //! Returns the value of the first parameter of this //! circle. This is 0.0, which gives the start point of this circle, or //! The start point and end point of a circle are coincident. - Standard_EXPORT double FirstParameter() const override; + Standard_EXPORT double FirstParameter() const final; //! Returns the value of the last parameter of this //! circle. This is 2.*Pi, which gives the end point of this circle. //! The start point and end point of a circle are coincident. - Standard_EXPORT double LastParameter() const override; + Standard_EXPORT double LastParameter() const final; //! returns True. - Standard_EXPORT bool IsClosed() const override; + Standard_EXPORT bool IsClosed() const final; //! returns True. - Standard_EXPORT bool IsPeriodic() const override; + Standard_EXPORT bool IsPeriodic() const final; //! Returns in P the point of parameter U. //! P = C + R * Cos (U) * XDir + R * Sin (U) * YDir //! where C is the center of the circle , XDir the XDirection and //! YDir the YDirection of the circle's local coordinate system. - Standard_EXPORT void D0(const double U, gp_Pnt& P) const override; + Standard_EXPORT void D0(const double U, gp_Pnt& P) const final; //! Returns the point P of parameter U and the first derivative V1. - Standard_EXPORT void D1(const double U, gp_Pnt& P, gp_Vec& V1) const override; + Standard_EXPORT void D1(const double U, gp_Pnt& P, gp_Vec& V1) const final; //! Returns the point P of parameter U, the first and second //! derivatives V1 and V2. - Standard_EXPORT void D2(const double U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const override; + Standard_EXPORT void D2(const double U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const final; //! Returns the point P of parameter u, the first second and third //! derivatives V1 V2 and V3. @@ -133,21 +133,21 @@ public: gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, - gp_Vec& V3) const override; + gp_Vec& V3) const final; //! The returned vector gives the value of the derivative for the //! order of derivation N. //! Raised if N < 1. - Standard_EXPORT gp_Vec DN(const double U, const int N) const override; + Standard_EXPORT gp_Vec DN(const double U, const int N) const final; //! Applies the transformation T to this circle. - Standard_EXPORT void Transform(const gp_Trsf& T) override; + Standard_EXPORT void Transform(const gp_Trsf& T) final; //! Creates a new object which is a copy of this circle. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; DEFINE_STANDARD_RTTIEXT(Geom_Circle, Geom_Conic) diff --git a/src/ModelingData/TKG3d/Geom/Geom_ConicalSurface.hxx b/src/ModelingData/TKG3d/Geom/Geom_ConicalSurface.hxx index 694ab127bd..358e6de486 100644 --- a/src/ModelingData/TKG3d/Geom/Geom_ConicalSurface.hxx +++ b/src/ModelingData/TKG3d/Geom/Geom_ConicalSurface.hxx @@ -112,14 +112,14 @@ public: Standard_EXPORT gp_Cone Cone() const; //! Eeturn 2.PI - U. - Standard_EXPORT double UReversedParameter(const double U) const override; + Standard_EXPORT double UReversedParameter(const double U) const final; //! Computes the u (or v) parameter on the modified surface, //! when reversing its u (or v) parametric direction, //! for any point of u parameter U (or of v parameter V) on this cone. //! In the case of a cone, these functions return respectively: //! - 2.*Pi - U, -V. - Standard_EXPORT double VReversedParameter(const double V) const override; + Standard_EXPORT double VReversedParameter(const double V) const final; //! Changes the orientation of this cone in the v parametric direction. //! The bounds of the surface are not changed but the v parametric direction is reversed. @@ -127,7 +127,7 @@ public: //! - the "main Direction" of the local coordinate system //! is reversed, and //! - the half-angle at the apex is inverted. - Standard_EXPORT void VReverse() override; + Standard_EXPORT void VReverse() final; //! Computes the parameters on the transformed surface for //! the transform of the point of parameters U,V on . @@ -143,7 +143,7 @@ public: //! me->TransformParameters(U,V,T) //! @endcode //! This method multiplies V by T.ScaleFactor() - Standard_EXPORT void TransformParameters(double& U, double& V, const gp_Trsf& T) const override; + Standard_EXPORT void TransformParameters(double& U, double& V, const gp_Trsf& T) const final; //! Returns a 2d transformation used to find the new //! parameters of a point on the transformed surface. @@ -159,7 +159,7 @@ public: //! me->ParametricTransformation(T) //! @endcode //! This method returns a scale centered on the U axis with T.ScaleFactor - Standard_EXPORT gp_GTrsf2d ParametricTransformation(const gp_Trsf& T) const override; + Standard_EXPORT gp_GTrsf2d ParametricTransformation(const gp_Trsf& T) const final; //! Computes the apex of this cone. It is on the negative //! side of the axis of revolution of this cone if the @@ -170,7 +170,7 @@ public: //! The conical surface is infinite in the V direction so //! V1 = Realfirst from Standard and V2 = RealLast. //! U1 = 0 and U2 = 2*PI. - Standard_EXPORT void Bounds(double& U1, double& U2, double& V1, double& V2) const override; + Standard_EXPORT void Bounds(double& U1, double& U2, double& V1, double& V2) const final; //! Returns the coefficients of the implicit equation of the //! quadric in the absolute cartesian coordinate system : @@ -205,22 +205,22 @@ public: Standard_EXPORT double SemiAngle() const; //! returns True. - Standard_EXPORT bool IsUClosed() const override; + Standard_EXPORT bool IsUClosed() const final; //! returns False. - Standard_EXPORT bool IsVClosed() const override; + Standard_EXPORT bool IsVClosed() const final; //! Returns True. - Standard_EXPORT bool IsUPeriodic() const override; + Standard_EXPORT bool IsUPeriodic() const final; //! Returns False. - Standard_EXPORT bool IsVPeriodic() const override; + Standard_EXPORT bool IsVPeriodic() const final; //! Builds the U isoparametric line of this cone. //! The origin of this line is on the reference plane of this cone //! (i.e. the plane defined by the origin, "X Direction" //! and "Y Direction" of the local coordinate system of this cone). - Standard_EXPORT occ::handle UIso(const double U) const override; + Standard_EXPORT occ::handle UIso(const double U) const final; //! Builds the V isoparametric circle of this cone. //! It is the circle on this cone, located in the plane of Z @@ -231,7 +231,7 @@ public: //! If the V isoparametric circle is close to the apex of //! this cone, the radius of the circle becomes very small. //! It is possible to have a circle with radius equal to 0.0. - Standard_EXPORT occ::handle VIso(const double V) const override; + Standard_EXPORT occ::handle VIso(const double V) const final; //! Computes the point P (U, V) on the surface. //! @code @@ -241,14 +241,14 @@ public: //! @endcode //! where Loc is the origin of the placement plane (XAxis, YAxis) //! XDir is the direction of the XAxis and YDir the direction of the YAxis. - Standard_EXPORT void D0(const double U, const double V, gp_Pnt& P) const override; + Standard_EXPORT void D0(const double U, const double V, gp_Pnt& P) const final; //! Computes the current point and the first derivatives in the directions U and V. Standard_EXPORT void D1(const double U, const double V, gp_Pnt& P, gp_Vec& D1U, - gp_Vec& D1V) const override; + gp_Vec& D1V) const final; //! Computes the current point, the first and the second derivatives in the directions U and V. Standard_EXPORT void D2(const double U, @@ -258,7 +258,7 @@ public: gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, - gp_Vec& D2UV) const override; + gp_Vec& D2UV) const final; //! Computes the current point, the first,the second and the third //! derivatives in the directions U and V. @@ -273,7 +273,7 @@ public: gp_Vec& D3U, gp_Vec& D3V, gp_Vec& D3UUV, - gp_Vec& D3UVV) const override; + gp_Vec& D3UVV) const final; //! Computes the derivative of order Nu in the u //! parametric direction, and Nv in the v parametric @@ -282,18 +282,15 @@ public: //! Standard_RangeError if: //! - Nu + Nv is less than 1, //! - Nu or Nv is negative. - Standard_EXPORT gp_Vec DN(const double U, - const double V, - const int Nu, - const int Nv) const override; + Standard_EXPORT gp_Vec DN(const double U, const double V, const int Nu, const int Nv) const final; //! Applies the transformation T to this cone. - Standard_EXPORT void Transform(const gp_Trsf& T) override; + Standard_EXPORT void Transform(const gp_Trsf& T) final; //! Creates a new object which is a copy of this cone. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; DEFINE_STANDARD_RTTIEXT(Geom_ConicalSurface, Geom_ElementarySurface) diff --git a/src/ModelingData/TKG3d/Geom/Geom_CylindricalSurface.hxx b/src/ModelingData/TKG3d/Geom/Geom_CylindricalSurface.hxx index c06d9a6ea4..4d2df6820f 100644 --- a/src/ModelingData/TKG3d/Geom/Geom_CylindricalSurface.hxx +++ b/src/ModelingData/TKG3d/Geom/Geom_CylindricalSurface.hxx @@ -93,12 +93,12 @@ public: //! Return the parameter on the Ureversed surface for //! the point of parameter U on . //! Return 2.PI - U. - Standard_EXPORT double UReversedParameter(const double U) const override; + Standard_EXPORT double UReversedParameter(const double U) const final; //! Return the parameter on the Vreversed surface for //! the point of parameter V on . //! Return -V - Standard_EXPORT double VReversedParameter(const double V) const override; + Standard_EXPORT double VReversedParameter(const double V) const final; //! Computes the parameters on the transformed surface for //! the transform of the point of parameters U,V on . @@ -114,7 +114,7 @@ public: //! me->TransformParameters(U,V,T) //! @endcode //! This method multiplies V by T.ScaleFactor() - Standard_EXPORT void TransformParameters(double& U, double& V, const gp_Trsf& T) const override; + Standard_EXPORT void TransformParameters(double& U, double& V, const gp_Trsf& T) const final; //! Returns a 2d transformation used to find the new //! parameters of a point on the transformed surface. @@ -130,12 +130,12 @@ public: //! me->ParametricTransformation(T) //! @endcode //! This method returns a scale centered on the U axis with T.ScaleFactor - Standard_EXPORT gp_GTrsf2d ParametricTransformation(const gp_Trsf& T) const override; + Standard_EXPORT gp_GTrsf2d ParametricTransformation(const gp_Trsf& T) const final; //! The CylindricalSurface is infinite in the V direction so //! V1 = Realfirst, V2 = RealLast from package Standard. //! U1 = 0 and U2 = 2*PI. - Standard_EXPORT void Bounds(double& U1, double& U2, double& V1, double& V2) const override; + Standard_EXPORT void Bounds(double& U1, double& U2, double& V1, double& V2) const final; //! Returns the coefficients of the implicit equation of the quadric //! in the absolute cartesian coordinate system : @@ -158,26 +158,26 @@ public: Standard_EXPORT double Radius() const; //! Returns True. - Standard_EXPORT bool IsUClosed() const override; + Standard_EXPORT bool IsUClosed() const final; //! Returns False. - Standard_EXPORT bool IsVClosed() const override; + Standard_EXPORT bool IsVClosed() const final; //! Returns True. - Standard_EXPORT bool IsUPeriodic() const override; + Standard_EXPORT bool IsUPeriodic() const final; //! Returns False. - Standard_EXPORT bool IsVPeriodic() const override; + Standard_EXPORT bool IsVPeriodic() const final; //! The UIso curve is a Line. The location point of this line is //! on the placement plane (XAxis, YAxis) of the surface. //! This line is parallel to the axis of symmetry of the surface. - Standard_EXPORT occ::handle UIso(const double U) const override; + Standard_EXPORT occ::handle UIso(const double U) const final; //! The VIso curve is a circle. The start point of this circle //! (U = 0) is defined with the "XAxis" of the surface. //! The center of the circle is on the symmetry axis. - Standard_EXPORT occ::handle VIso(const double V) const override; + Standard_EXPORT occ::handle VIso(const double V) const final; //! Computes the point P (U, V) on the surface. //! P (U, V) = Loc + Radius * (cos (U) * XDir + sin (U) * YDir) + @@ -185,7 +185,7 @@ public: //! where Loc is the origin of the placement plane (XAxis, YAxis) //! XDir is the direction of the XAxis and YDir the direction of //! the YAxis. - Standard_EXPORT void D0(const double U, const double V, gp_Pnt& P) const override; + Standard_EXPORT void D0(const double U, const double V, gp_Pnt& P) const final; //! Computes the current point and the first derivatives in the //! directions U and V. @@ -193,7 +193,7 @@ public: const double V, gp_Pnt& P, gp_Vec& D1U, - gp_Vec& D1V) const override; + gp_Vec& D1V) const final; //! Computes the current point, the first and the second derivatives //! in the directions U and V. @@ -204,7 +204,7 @@ public: gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, - gp_Vec& D2UV) const override; + gp_Vec& D2UV) const final; //! Computes the current point, the first, the second and the //! third derivatives in the directions U and V. @@ -219,24 +219,21 @@ public: gp_Vec& D3U, gp_Vec& D3V, gp_Vec& D3UUV, - gp_Vec& D3UVV) const override; + gp_Vec& D3UVV) const final; //! Computes the derivative of order Nu in the direction u and Nv //! in the direction v. //! Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0. - Standard_EXPORT gp_Vec DN(const double U, - const double V, - const int Nu, - const int Nv) const override; + Standard_EXPORT gp_Vec DN(const double U, const double V, const int Nu, const int Nv) const final; //! Applies the transformation T to this cylinder. - Standard_EXPORT void Transform(const gp_Trsf& T) override; + Standard_EXPORT void Transform(const gp_Trsf& T) final; //! Creates a new object which is a copy of this cylinder. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; DEFINE_STANDARD_RTTIEXT(Geom_CylindricalSurface, Geom_ElementarySurface) diff --git a/src/ModelingData/TKG3d/Geom/Geom_Ellipse.hxx b/src/ModelingData/TKG3d/Geom/Geom_Ellipse.hxx index 8823c5815d..86468bd022 100644 --- a/src/ModelingData/TKG3d/Geom/Geom_Ellipse.hxx +++ b/src/ModelingData/TKG3d/Geom/Geom_Ellipse.hxx @@ -107,7 +107,7 @@ public: //! Computes the parameter on the reversed ellipse for //! the point of parameter U on this ellipse. //! For an ellipse, the returned value is: 2.*Pi - U. - Standard_EXPORT double ReversedParameter(const double U) const override; + Standard_EXPORT double ReversedParameter(const double U) const final; //! This directrix is the line normal to the XAxis of the ellipse //! in the local plane (Z = 0) at a distance d = MajorRadius / e @@ -132,7 +132,7 @@ public: //! If f is the distance between the center of the ellipse and //! the Focus1 then the eccentricity e = f / MajorRadius. //! Returns 0 if MajorRadius = 0 - Standard_EXPORT double Eccentricity() const override; + Standard_EXPORT double Eccentricity() const final; //! Computes the focal distance. It is the distance between the //! the two focus of the ellipse. @@ -161,31 +161,31 @@ public: //! ellipse. This is respectively: //! - 0.0, which gives the start point of this ellipse, or //! The start point and end point of an ellipse are coincident. - Standard_EXPORT double FirstParameter() const override; + Standard_EXPORT double FirstParameter() const final; //! Returns the value of the last parameter of this //! ellipse. This is respectively: //! - 2.*Pi, which gives the end point of this ellipse. //! The start point and end point of an ellipse are coincident. - Standard_EXPORT double LastParameter() const override; + Standard_EXPORT double LastParameter() const final; //! return True. - Standard_EXPORT bool IsClosed() const override; + Standard_EXPORT bool IsClosed() const final; //! return True. - Standard_EXPORT bool IsPeriodic() const override; + Standard_EXPORT bool IsPeriodic() const final; //! Returns in P the point of parameter U. //! P = C + MajorRadius * Cos (U) * XDir + MinorRadius * Sin (U) * YDir //! where C is the center of the ellipse , XDir the direction of //! the "XAxis" and "YDir" the "YAxis" of the ellipse. - Standard_EXPORT void D0(const double U, gp_Pnt& P) const override; + Standard_EXPORT void D0(const double U, gp_Pnt& P) const final; - Standard_EXPORT void D1(const double U, gp_Pnt& P, gp_Vec& V1) const override; + Standard_EXPORT void D1(const double U, gp_Pnt& P, gp_Vec& V1) const final; //! Returns the point P of parameter U. The vectors V1 and V2 //! are the first and second derivatives at this point. - Standard_EXPORT void D2(const double U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const override; + Standard_EXPORT void D2(const double U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const final; //! Returns the point P of parameter U, the first second and //! third derivatives V1 V2 and V3. @@ -193,21 +193,21 @@ public: gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, - gp_Vec& V3) const override; + gp_Vec& V3) const final; //! For the point of parameter U of this ellipse, computes //! the vector corresponding to the Nth derivative. //! Exceptions Standard_RangeError if N is less than 1. - Standard_EXPORT gp_Vec DN(const double U, const int N) const override; + Standard_EXPORT gp_Vec DN(const double U, const int N) const final; //! Applies the transformation T to this ellipse. - Standard_EXPORT void Transform(const gp_Trsf& T) override; + Standard_EXPORT void Transform(const gp_Trsf& T) final; //! Creates a new object which is a copy of this ellipse. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; DEFINE_STANDARD_RTTIEXT(Geom_Ellipse, Geom_Conic) diff --git a/src/ModelingData/TKG3d/Geom/Geom_Hyperbola.hxx b/src/ModelingData/TKG3d/Geom/Geom_Hyperbola.hxx index a452f39c61..5734903629 100644 --- a/src/ModelingData/TKG3d/Geom/Geom_Hyperbola.hxx +++ b/src/ModelingData/TKG3d/Geom/Geom_Hyperbola.hxx @@ -130,19 +130,19 @@ public: //! Computes the parameter on the reversed hyperbola, //! for the point of parameter U on this hyperbola. //! For a hyperbola, the returned value is: -U. - Standard_EXPORT double ReversedParameter(const double U) const override; + Standard_EXPORT double ReversedParameter(const double U) const final; //! Returns RealFirst from Standard. - Standard_EXPORT double FirstParameter() const override; + Standard_EXPORT double FirstParameter() const final; //! returns RealLast from Standard. - Standard_EXPORT double LastParameter() const override; + Standard_EXPORT double LastParameter() const final; //! Returns False. - Standard_EXPORT bool IsClosed() const override; + Standard_EXPORT bool IsClosed() const final; //! return False for an hyperbola. - Standard_EXPORT bool IsPeriodic() const override; + Standard_EXPORT bool IsPeriodic() const final; //! In the local coordinate system of the hyperbola the equation of //! the hyperbola is (X*X)/(A*A) - (Y*Y)/(B*B) = 1.0 and the @@ -184,7 +184,7 @@ public: //! If f is the distance between the location of the hyperbola //! and the Focus1 then the eccentricity e = f / MajorRadius. //! raised if MajorRadius = 0.0 - Standard_EXPORT double Eccentricity() const override; + Standard_EXPORT double Eccentricity() const final; //! Computes the focal distance. It is the distance between the //! two focus of the hyperbola. @@ -227,14 +227,14 @@ public: //! MinorRadius * std::sinh(U) * YDir //! where C is the center of the hyperbola , XDir the XDirection and //! YDir the YDirection of the hyperbola's local coordinate system. - Standard_EXPORT void D0(const double U, gp_Pnt& P) const override; + Standard_EXPORT void D0(const double U, gp_Pnt& P) const final; //! Returns the point P of parameter U and the first derivative V1. - Standard_EXPORT void D1(const double U, gp_Pnt& P, gp_Vec& V1) const override; + Standard_EXPORT void D1(const double U, gp_Pnt& P, gp_Vec& V1) const final; //! Returns the point P of parameter U, the first and second //! derivatives V1 and V2. - Standard_EXPORT void D2(const double U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const override; + Standard_EXPORT void D2(const double U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const final; //! Returns the point P of parameter U, the first second and //! third derivatives V1 V2 and V3. @@ -242,21 +242,21 @@ public: gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, - gp_Vec& V3) const override; + gp_Vec& V3) const final; //! The returned vector gives the value of the derivative for the //! order of derivation N. //! Raised if N < 1. - Standard_EXPORT gp_Vec DN(const double U, const int N) const override; + Standard_EXPORT gp_Vec DN(const double U, const int N) const final; //! Applies the transformation T to this hyperbola. - Standard_EXPORT void Transform(const gp_Trsf& T) override; + Standard_EXPORT void Transform(const gp_Trsf& T) final; //! Creates a new object which is a copy of this hyperbola. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; DEFINE_STANDARD_RTTIEXT(Geom_Hyperbola, Geom_Conic) diff --git a/src/ModelingData/TKG3d/Geom/Geom_Line.hxx b/src/ModelingData/TKG3d/Geom/Geom_Line.hxx index 96bcf4a814..d411dbc838 100644 --- a/src/ModelingData/TKG3d/Geom/Geom_Line.hxx +++ b/src/ModelingData/TKG3d/Geom/Geom_Line.hxx @@ -78,61 +78,61 @@ public: //! Changes the orientation of this line. As a result, the //! unit vector of the positioning axis of this line is reversed. - Standard_EXPORT void Reverse() override; + Standard_EXPORT void Reverse() final; //! Computes the parameter on the reversed line for the //! point of parameter U on this line. //! For a line, the returned value is -U. - Standard_EXPORT double ReversedParameter(const double U) const override; + Standard_EXPORT double ReversedParameter(const double U) const final; //! Returns the value of the first parameter of this //! line. This is double::RealFirst(). - Standard_EXPORT double FirstParameter() const override; + Standard_EXPORT double FirstParameter() const final; //! Returns the value of the last parameter of this //! line. This is double::RealLast(). - Standard_EXPORT double LastParameter() const override; + Standard_EXPORT double LastParameter() const final; //! returns False - Standard_EXPORT bool IsClosed() const override; + Standard_EXPORT bool IsClosed() const final; //! returns False - Standard_EXPORT bool IsPeriodic() const override; + Standard_EXPORT bool IsPeriodic() const final; //! Returns GeomAbs_CN, which is the global continuity of any line. - Standard_EXPORT GeomAbs_Shape Continuity() const override; + Standard_EXPORT GeomAbs_Shape Continuity() const final; //! returns True. //! Raised if N < 0. - Standard_EXPORT bool IsCN(const int N) const override; + Standard_EXPORT bool IsCN(const int N) const final; //! Returns in P the point of parameter U. //! P (U) = O + U * Dir where O is the "Location" point of the //! line and Dir the direction of the line. - Standard_EXPORT void D0(const double U, gp_Pnt& P) const override; + Standard_EXPORT void D0(const double U, gp_Pnt& P) const final; //! Returns the point P of parameter u and the first derivative V1. - Standard_EXPORT void D1(const double U, gp_Pnt& P, gp_Vec& V1) const override; + Standard_EXPORT void D1(const double U, gp_Pnt& P, gp_Vec& V1) const final; //! Returns the point P of parameter U, the first and second //! derivatives V1 and V2. V2 is a vector with null magnitude //! for a line. - Standard_EXPORT void D2(const double U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const override; + Standard_EXPORT void D2(const double U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const final; //! V2 and V3 are vectors with null magnitude for a line. Standard_EXPORT void D3(const double U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, - gp_Vec& V3) const override; + gp_Vec& V3) const final; //! The returned vector gives the value of the derivative for the //! order of derivation N. //! Raised if N < 1. - Standard_EXPORT gp_Vec DN(const double U, const int N) const override; + Standard_EXPORT gp_Vec DN(const double U, const int N) const final; //! Applies the transformation T to this line. - Standard_EXPORT void Transform(const gp_Trsf& T) override; + Standard_EXPORT void Transform(const gp_Trsf& T) final; //! Returns the parameter on the transformed curve for //! the transform of the point of parameter U on . @@ -144,7 +144,7 @@ public: //! me->Value(U).Transformed(T) //! //! This methods returns * T.ScaleFactor() - Standard_EXPORT double TransformedParameter(const double U, const gp_Trsf& T) const override; + Standard_EXPORT double TransformedParameter(const double U, const gp_Trsf& T) const final; //! Returns a coefficient to compute the parameter on //! the transformed curve for the transform of the @@ -157,13 +157,13 @@ public: //! Value(U).Transformed(T) //! //! This methods returns T.ScaleFactor() - Standard_EXPORT double ParametricTransformation(const gp_Trsf& T) const override; + Standard_EXPORT double ParametricTransformation(const gp_Trsf& T) const final; //! Creates a new object which is a copy of this line. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; DEFINE_STANDARD_RTTIEXT(Geom_Line, Geom_Curve) diff --git a/src/ModelingData/TKG3d/Geom/Geom_OffsetCurve.hxx b/src/ModelingData/TKG3d/Geom/Geom_OffsetCurve.hxx index 6b7ec65997..a036098430 100644 --- a/src/ModelingData/TKG3d/Geom/Geom_OffsetCurve.hxx +++ b/src/ModelingData/TKG3d/Geom/Geom_OffsetCurve.hxx @@ -109,11 +109,11 @@ public: //! - the end point of the initial curve becomes the //! start point of the reversed curve, and //! - the first and last parameters are recomputed. - Standard_EXPORT void Reverse() override; + Standard_EXPORT void Reverse() final; //! Computes the parameter on the reversed curve for //! the point of parameter U on this offset curve. - Standard_EXPORT double ReversedParameter(const double U) const override; + Standard_EXPORT double ReversedParameter(const double U) const final; //! Changes this offset curve by assigning C //! as the basis curve from which it is built. @@ -151,7 +151,7 @@ public: //! Returns the continuity of the basis curve - 1. //! The offset curve must have a unique offset direction defined //! at any point. - Standard_EXPORT GeomAbs_Shape Continuity() const override; + Standard_EXPORT GeomAbs_Shape Continuity() const final; //! Returns the reference vector of this offset curve. //! Value and derivatives @@ -169,25 +169,25 @@ public: //! Warning! this should not be called //! if the basis curve is not at least C1. Nevertheless //! if used on portion where the curve is C1, it is OK - Standard_EXPORT void D0(const double U, gp_Pnt& P) const override; + Standard_EXPORT void D0(const double U, gp_Pnt& P) const final; //! Warning! this should not be called //! if the continuity of the basis curve is not C2. //! Nevertheless, it's OK to use it on a portion //! where the curve is C2 - Standard_EXPORT void D1(const double U, gp_Pnt& P, gp_Vec& V1) const override; + Standard_EXPORT void D1(const double U, gp_Pnt& P, gp_Vec& V1) const final; //! Warning! this should not be called //! if the continuity of the basis curve is not C3. //! Nevertheless, it's OK to use it on a portion //! where the curve is C3 - Standard_EXPORT void D2(const double U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const override; + Standard_EXPORT void D2(const double U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const final; Standard_EXPORT void D3(const double U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, - gp_Vec& V3) const override; + gp_Vec& V3) const final; //! The returned vector gives the value of the derivative //! for the order of derivation N. @@ -203,21 +203,21 @@ public: //! raised if it is not possible to compute a unique offset //! direction. //! Raised if N < 1. - Standard_EXPORT gp_Vec DN(const double U, const int N) const override; + Standard_EXPORT gp_Vec DN(const double U, const int N) const final; //! Returns the value of the first parameter of this //! offset curve. The first parameter corresponds to the //! start point of the curve. //! Note: the first and last parameters of this offset curve //! are also the ones of its basis curve. - Standard_EXPORT double FirstParameter() const override; + Standard_EXPORT double FirstParameter() const final; //! Returns the value of the last parameter of this //! offset curve. The last parameter //! corresponds to the end point. //! Note: the first and last parameters of this offset curve //! are also the ones of its basis curve. - Standard_EXPORT double LastParameter() const override; + Standard_EXPORT double LastParameter() const final; //! Returns the offset value of this offset curve. Standard_EXPORT double Offset() const; @@ -225,7 +225,7 @@ public: //! Returns True if the distance between the start point //! and the end point of the curve is lower or equal to //! Resolution from package gp. - Standard_EXPORT bool IsClosed() const override; + Standard_EXPORT bool IsClosed() const final; //! Returns true if the degree of continuity of the basis //! curve of this offset curve is at least N + 1. @@ -234,21 +234,21 @@ public: //! to the basis curve (used to compute the offset curve) is //! defined at any point on the basis curve. //! Raised if N < 0. - Standard_EXPORT bool IsCN(const int N) const override; + Standard_EXPORT bool IsCN(const int N) const final; //! Returns true if this offset curve is periodic, i.e. if the //! basis curve of this offset curve is periodic. - Standard_EXPORT bool IsPeriodic() const override; + Standard_EXPORT bool IsPeriodic() const final; //! Returns the period of this offset curve, i.e. the period //! of the basis curve of this offset curve. //! Exceptions //! Standard_NoSuchObject if the basis curve is not periodic. - Standard_EXPORT double Period() const override; + Standard_EXPORT double Period() const final; //! Applies the transformation T to this offset curve. //! Note: the basis curve is also modified. - Standard_EXPORT void Transform(const gp_Trsf& T) override; + Standard_EXPORT void Transform(const gp_Trsf& T) final; //! Returns the parameter on the transformed curve for //! the transform of the point of parameter U on . @@ -256,7 +256,7 @@ public: //! is the same point as //! me->Value(U).Transformed(T) //! This methods calls the basis curve method. - Standard_EXPORT double TransformedParameter(const double U, const gp_Trsf& T) const override; + Standard_EXPORT double TransformedParameter(const double U, const gp_Trsf& T) const final; //! Returns a coefficient to compute the parameter on //! the transformed curve for the transform of the @@ -266,16 +266,16 @@ public: //! is the same point as //! Value(U).Transformed(T) //! This methods calls the basis curve method. - Standard_EXPORT double ParametricTransformation(const gp_Trsf& T) const override; + Standard_EXPORT double ParametricTransformation(const gp_Trsf& T) const final; //! Creates a new object which is a copy of this offset curve. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! Returns continuity of the basis curve. Standard_EXPORT GeomAbs_Shape GetBasisCurveContinuity() const; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; DEFINE_STANDARD_RTTIEXT(Geom_OffsetCurve, Geom_Curve) diff --git a/src/ModelingData/TKG3d/Geom/Geom_OffsetSurface.hxx b/src/ModelingData/TKG3d/Geom/Geom_OffsetSurface.hxx index 1180f32c1b..4fa386f924 100644 --- a/src/ModelingData/TKG3d/Geom/Geom_OffsetSurface.hxx +++ b/src/ModelingData/TKG3d/Geom/Geom_OffsetSurface.hxx @@ -121,30 +121,30 @@ public: //! Changes the orientation of this offset surface in the u //! parametric direction. The bounds of the surface //! are not changed but the given parametric direction is reversed. - Standard_EXPORT void UReverse() override; + Standard_EXPORT void UReverse() final; //! Computes the u parameter on the modified //! surface, produced by reversing the u //! parametric direction of this offset surface, for any //! point of u parameter U on this offset surface. - Standard_EXPORT double UReversedParameter(const double U) const override; + Standard_EXPORT double UReversedParameter(const double U) const final; //! Changes the orientation of this offset surface in the v parametric direction. The bounds of //! the surface are not changed but the given parametric direction is reversed. - Standard_EXPORT void VReverse() override; + Standard_EXPORT void VReverse() final; //! Computes the v parameter on the modified //! surface, produced by reversing the or v //! parametric direction of this offset surface, for any //! point of v parameter V on this offset surface. - Standard_EXPORT double VReversedParameter(const double V) const override; + Standard_EXPORT double VReversedParameter(const double V) const final; //! Returns the parametric bounds U1, U2, V1 and V2 of //! this offset surface. //! If the surface is infinite, this function can return: //! - double::RealFirst(), or //! - double::RealLast(). - Standard_EXPORT void Bounds(double& U1, double& U2, double& V1, double& V2) const override; + Standard_EXPORT void Bounds(double& U1, double& U2, double& V1, double& V2) const final; //! This method returns the continuity of the basis surface - 1. //! Continuity of the Offset surface : @@ -161,21 +161,21 @@ public: //! any point this method gives the continuity of the offset //! surface otherwise the effective continuity can be lower than //! the continuity of the basis surface - 1. - Standard_EXPORT GeomAbs_Shape Continuity() const override; + Standard_EXPORT GeomAbs_Shape Continuity() const final; //! This method answer True if the continuity of the basis surface //! is N + 1 in the U parametric direction. We suppose in this //! class that a unique normal is defined at any point on the basis //! surface. //! Raised if N <0. - Standard_EXPORT bool IsCNu(const int N) const override; + Standard_EXPORT bool IsCNu(const int N) const final; //! This method answer True if the continuity of the basis surface //! is N + 1 in the V parametric direction. We suppose in this //! class that a unique normal is defined at any point on the basis //! surface. //! Raised if N <0. - Standard_EXPORT bool IsCNv(const int N) const override; + Standard_EXPORT bool IsCNv(const int N) const final; //! Checks whether this offset surface is closed in the u //! parametric direction. @@ -184,7 +184,7 @@ public: //! the distance between the points P(uFirst,v) //! and P(uLast,v) is less than or equal to //! gp::Resolution() for each value of the parameter v. - Standard_EXPORT bool IsUClosed() const override; + Standard_EXPORT bool IsUClosed() const final; //! Checks whether this offset surface is closed in the u //! or v parametric direction. Returns true if taking vFirst and vLast as the @@ -192,32 +192,32 @@ public: //! distance between the points P(u,vFirst) and //! P(u,vLast) is less than or equal to //! gp::Resolution() for each value of the parameter u. - Standard_EXPORT bool IsVClosed() const override; + Standard_EXPORT bool IsVClosed() const final; //! Returns true if this offset surface is periodic in the u //! parametric direction, i.e. if the basis //! surface of this offset surface is periodic in this direction. - Standard_EXPORT bool IsUPeriodic() const override; + Standard_EXPORT bool IsUPeriodic() const final; //! Returns the period of this offset surface in the u //! parametric direction respectively, i.e. the period of the //! basis surface of this offset surface in this parametric direction. //! raises if the surface is not uperiodic. - Standard_EXPORT double UPeriod() const override; + Standard_EXPORT double UPeriod() const final; //! Returns true if this offset surface is periodic in the v //! parametric direction, i.e. if the basis //! surface of this offset surface is periodic in this direction. - Standard_EXPORT bool IsVPeriodic() const override; + Standard_EXPORT bool IsVPeriodic() const final; //! Returns the period of this offset surface in the v //! parametric direction respectively, i.e. the period of the //! basis surface of this offset surface in this parametric direction. //! raises if the surface is not vperiodic. - Standard_EXPORT double VPeriod() const override; + Standard_EXPORT double VPeriod() const final; //! Computes the U isoparametric curve. - Standard_EXPORT occ::handle UIso(const double U) const override; + Standard_EXPORT occ::handle UIso(const double U) const final; //! Computes the V isoparametric curve. //! @@ -228,7 +228,7 @@ public: //! not defined on the basis surface for the parametric value (U,V). //! No check is done at the creation time and we suppose //! in this package that the offset surface can be defined at any point. - Standard_EXPORT occ::handle VIso(const double V) const override; + Standard_EXPORT occ::handle VIso(const double V) const final; //! @code //! P (U, V) = Pbasis + Offset * Ndir @@ -251,14 +251,14 @@ public: //! Raised if the continuity of the basis surface is not C1. //! Raised if the order of derivation required to compute the //! normal direction is greater than the second order. - Standard_EXPORT void D0(const double U, const double V, gp_Pnt& P) const override; + Standard_EXPORT void D0(const double U, const double V, gp_Pnt& P) const final; //! Raised if the continuity of the basis surface is not C2. Standard_EXPORT void D1(const double U, const double V, gp_Pnt& P, gp_Vec& D1U, - gp_Vec& D1V) const override; + gp_Vec& D1V) const final; //! Raised if the continuity of the basis surface is not C3. Standard_EXPORT void D2(const double U, @@ -268,7 +268,7 @@ public: gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, - gp_Vec& D2UV) const override; + gp_Vec& D2UV) const final; //! Raised if the continuity of the basis surface is not C4. Standard_EXPORT void D3(const double U, @@ -282,7 +282,7 @@ public: gp_Vec& D3U, gp_Vec& D3V, gp_Vec& D3UUV, - gp_Vec& D3UVV) const override; + gp_Vec& D3UVV) const final; //! Computes the derivative of order Nu in the direction u and Nv in the direction v. //! @@ -299,14 +299,11 @@ public: //! Warnings: //! The exception UndefinedValue or UndefinedDerivative is //! raised if it is not possible to compute a unique offset direction. - Standard_EXPORT gp_Vec DN(const double U, - const double V, - const int Nu, - const int Nv) const override; + Standard_EXPORT gp_Vec DN(const double U, const double V, const int Nu, const int Nv) const final; //! Applies the transformation T to this offset surface. //! Note: the basis surface is also modified. - Standard_EXPORT void Transform(const gp_Trsf& T) override; + Standard_EXPORT void Transform(const gp_Trsf& T) final; //! Computes the parameters on the transformed surface for //! the transform of the point of parameters U,V on . @@ -322,7 +319,7 @@ public: //! me->TransformParameters(U,V,T) //! @endcode //! This method calls the basis surface method. - Standard_EXPORT void TransformParameters(double& U, double& V, const gp_Trsf& T) const override; + Standard_EXPORT void TransformParameters(double& U, double& V, const gp_Trsf& T) const final; //! Returns a 2d transformation used to find the new //! parameters of a point on the transformed surface. @@ -338,10 +335,10 @@ public: //! me->ParametricTransformation(T) //! @endcode //! This method calls the basis surface method. - Standard_EXPORT gp_GTrsf2d ParametricTransformation(const gp_Trsf& T) const override; + Standard_EXPORT gp_GTrsf2d ParametricTransformation(const gp_Trsf& T) const final; //! Creates a new object which is a copy of this offset surface. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! returns an equivalent surface of the offset surface //! when the basis surface is a canonic surface or a @@ -372,7 +369,7 @@ public: inline GeomAbs_Shape GetBasisSurfContinuity() const { return myBasisSurfContinuity; } //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; DEFINE_STANDARD_RTTIEXT(Geom_OffsetSurface, Geom_Surface) diff --git a/src/ModelingData/TKG3d/Geom/Geom_Parabola.hxx b/src/ModelingData/TKG3d/Geom/Geom_Parabola.hxx index 390dbbf463..ca76b2e508 100644 --- a/src/ModelingData/TKG3d/Geom/Geom_Parabola.hxx +++ b/src/ModelingData/TKG3d/Geom/Geom_Parabola.hxx @@ -103,25 +103,25 @@ public: //! Computes the parameter on the reversed parabola, //! for the point of parameter U on this parabola. //! For a parabola, the returned value is: -U. - Standard_EXPORT double ReversedParameter(const double U) const override; + Standard_EXPORT double ReversedParameter(const double U) const final; //! Returns the value of the first or last parameter of this //! parabola. This is, respectively: //! - double::RealFirst(), or //! - double::RealLast(). - Standard_EXPORT double FirstParameter() const override; + Standard_EXPORT double FirstParameter() const final; //! Returns the value of the first or last parameter of this //! parabola. This is, respectively: //! - double::RealFirst(), or //! - double::RealLast(). - Standard_EXPORT double LastParameter() const override; + Standard_EXPORT double LastParameter() const final; //! Returns False - Standard_EXPORT bool IsClosed() const override; + Standard_EXPORT bool IsClosed() const final; //! Returns False - Standard_EXPORT bool IsPeriodic() const override; + Standard_EXPORT bool IsPeriodic() const final; //! Computes the directrix of this parabola. //! This is a line normal to the axis of symmetry, in the @@ -133,7 +133,7 @@ public: Standard_EXPORT gp_Ax1 Directrix() const; //! Returns 1. (which is the eccentricity of any parabola). - Standard_EXPORT double Eccentricity() const override; + Standard_EXPORT double Eccentricity() const final; //! Computes the focus of this parabola. The focus is on the //! positive side of the "X Axis" of the local coordinate @@ -158,14 +158,14 @@ public: //! P = S + F * (U * U * XDir + * U * YDir) //! where S is the vertex of the parabola, XDir the XDirection and //! YDir the YDirection of the parabola's local coordinate system. - Standard_EXPORT void D0(const double U, gp_Pnt& P) const override; + Standard_EXPORT void D0(const double U, gp_Pnt& P) const final; //! Returns the point P of parameter U and the first derivative V1. - Standard_EXPORT void D1(const double U, gp_Pnt& P, gp_Vec& V1) const override; + Standard_EXPORT void D1(const double U, gp_Pnt& P, gp_Vec& V1) const final; //! Returns the point P of parameter U, the first and second //! derivatives V1 and V2. - Standard_EXPORT void D2(const double U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const override; + Standard_EXPORT void D2(const double U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const final; //! Returns the point P of parameter U, the first second and third //! derivatives V1 V2 and V3. @@ -173,15 +173,15 @@ public: gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, - gp_Vec& V3) const override; + gp_Vec& V3) const final; //! For the point of parameter U of this parabola, //! computes the vector corresponding to the Nth derivative. //! Exceptions Standard_RangeError if N is less than 1. - Standard_EXPORT gp_Vec DN(const double U, const int N) const override; + Standard_EXPORT gp_Vec DN(const double U, const int N) const final; //! Applies the transformation T to this parabola. - Standard_EXPORT void Transform(const gp_Trsf& T) override; + Standard_EXPORT void Transform(const gp_Trsf& T) final; //! Returns the parameter on the transformed curve for //! the transform of the point of parameter U on . @@ -193,7 +193,7 @@ public: //! me->Value(U).Transformed(T) //! //! This methods returns * T.ScaleFactor() - Standard_EXPORT double TransformedParameter(const double U, const gp_Trsf& T) const override; + Standard_EXPORT double TransformedParameter(const double U, const gp_Trsf& T) const final; //! Returns a coefficient to compute the parameter on //! the transformed curve for the transform of the @@ -206,13 +206,13 @@ public: //! Value(U).Transformed(T) //! //! This methods returns T.ScaleFactor() - Standard_EXPORT double ParametricTransformation(const gp_Trsf& T) const override; + Standard_EXPORT double ParametricTransformation(const gp_Trsf& T) const final; //! Creates a new object which is a copy of this parabola. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; DEFINE_STANDARD_RTTIEXT(Geom_Parabola, Geom_Conic) diff --git a/src/ModelingData/TKG3d/Geom/Geom_Plane.hxx b/src/ModelingData/TKG3d/Geom/Geom_Plane.hxx index 71aeb8907d..5c74e4341a 100644 --- a/src/ModelingData/TKG3d/Geom/Geom_Plane.hxx +++ b/src/ModelingData/TKG3d/Geom/Geom_Plane.hxx @@ -92,24 +92,24 @@ public: //! Changes the orientation of this plane in the u (or v) parametric direction. //! The bounds of the plane are not changed but the given parametric direction is reversed. //! Hence the orientation of the surface is reversed. - Standard_EXPORT void UReverse() override; + Standard_EXPORT void UReverse() final; //! Computes the u parameter on the modified plane, //! produced when reversing the u parametric of this plane, //! for any point of u parameter U on this plane. //! In the case of a plane, these methods return - -U. - Standard_EXPORT double UReversedParameter(const double U) const override; + Standard_EXPORT double UReversedParameter(const double U) const final; //! Changes the orientation of this plane in the u (or v) parametric direction. //! The bounds of the plane are not changed but the given parametric direction is reversed. //! Hence the orientation of the surface is reversed. - Standard_EXPORT void VReverse() override; + Standard_EXPORT void VReverse() final; //! Computes the v parameter on the modified plane, //! produced when reversing the v parametric of this plane, //! for any point of v parameter V on this plane. //! In the case of a plane, these methods return -V. - Standard_EXPORT double VReversedParameter(const double V) const override; + Standard_EXPORT double VReversedParameter(const double V) const final; //! Computes the parameters on the transformed surface for //! the transform of the point of parameters U,V on . @@ -125,7 +125,7 @@ public: //! me->TransformParameters(U,V,T) //! @endcode //! This method multiplies U and V by T.ScaleFactor() - Standard_EXPORT void TransformParameters(double& U, double& V, const gp_Trsf& T) const override; + Standard_EXPORT void TransformParameters(double& U, double& V, const gp_Trsf& T) const final; //! Returns a 2d transformation used to find the new //! parameters of a point on the transformed surface. @@ -141,13 +141,13 @@ public: //! me->ParametricTransformation(T) //! @endcode //! This method returns a scale centered on the origin with T.ScaleFactor - Standard_EXPORT gp_GTrsf2d ParametricTransformation(const gp_Trsf& T) const override; + Standard_EXPORT gp_GTrsf2d ParametricTransformation(const gp_Trsf& T) const final; //! Returns the parametric bounds U1, U2, V1 and V2 of this plane. //! Because a plane is an infinite surface, the following is always true: //! - U1 = V1 = double::RealFirst() //! - U2 = V2 = double::RealLast(). - Standard_EXPORT void Bounds(double& U1, double& U2, double& V1, double& V2) const override; + Standard_EXPORT void Bounds(double& U1, double& U2, double& V1, double& V2) const final; //! Computes the normalized coefficients of the plane's cartesian equation: //! @code @@ -156,24 +156,24 @@ public: Standard_EXPORT void Coefficients(double& A, double& B, double& C, double& D) const; //! return False - Standard_EXPORT bool IsUClosed() const override; + Standard_EXPORT bool IsUClosed() const final; //! return False - Standard_EXPORT bool IsVClosed() const override; + Standard_EXPORT bool IsVClosed() const final; //! return False. - Standard_EXPORT bool IsUPeriodic() const override; + Standard_EXPORT bool IsUPeriodic() const final; //! return False. - Standard_EXPORT bool IsVPeriodic() const override; + Standard_EXPORT bool IsVPeriodic() const final; //! Computes the U isoparametric curve. //! This is a Line parallel to the YAxis of the plane. - Standard_EXPORT occ::handle UIso(const double U) const override; + Standard_EXPORT occ::handle UIso(const double U) const final; //! Computes the V isoparametric curve. //! This is a Line parallel to the XAxis of the plane. - Standard_EXPORT occ::handle VIso(const double V) const override; + Standard_EXPORT occ::handle VIso(const double V) const final; //! Computes the point P (U, V) on . //! @code @@ -181,14 +181,14 @@ public: //! @endcode //! where O is the "Location" point of the plane, XDir the //! "XDirection" and YDir the "YDirection" of the plane's local coordinate system. - Standard_EXPORT void D0(const double U, const double V, gp_Pnt& P) const override; + Standard_EXPORT void D0(const double U, const double V, gp_Pnt& P) const final; //! Computes the current point and the first derivatives in the directions U and V. Standard_EXPORT void D1(const double U, const double V, gp_Pnt& P, gp_Vec& D1U, - gp_Vec& D1V) const override; + gp_Vec& D1V) const final; //! Computes the current point, the first and the second //! derivatives in the directions U and V. @@ -199,7 +199,7 @@ public: gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, - gp_Vec& D2UV) const override; + gp_Vec& D2UV) const final; //! Computes the current point, the first,the second and the //! third derivatives in the directions U and V. @@ -214,24 +214,21 @@ public: gp_Vec& D3U, gp_Vec& D3V, gp_Vec& D3UUV, - gp_Vec& D3UVV) const override; + gp_Vec& D3UVV) const final; //! Computes the derivative of order Nu in the direction u //! and Nv in the direction v. //! Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0. - Standard_EXPORT gp_Vec DN(const double U, - const double V, - const int Nu, - const int Nv) const override; + Standard_EXPORT gp_Vec DN(const double U, const double V, const int Nu, const int Nv) const final; //! Applies the transformation T to this plane. - Standard_EXPORT void Transform(const gp_Trsf& T) override; + Standard_EXPORT void Transform(const gp_Trsf& T) final; //! Creates a new object which is a copy of this plane. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; DEFINE_STANDARD_RTTIEXT(Geom_Plane, Geom_ElementarySurface) }; diff --git a/src/ModelingData/TKG3d/Geom/Geom_RectangularTrimmedSurface.hxx b/src/ModelingData/TKG3d/Geom/Geom_RectangularTrimmedSurface.hxx index 349f5e239a..17b38bb281 100644 --- a/src/ModelingData/TKG3d/Geom/Geom_RectangularTrimmedSurface.hxx +++ b/src/ModelingData/TKG3d/Geom/Geom_RectangularTrimmedSurface.hxx @@ -160,26 +160,26 @@ public: //! parametric direction. The bounds of the surface are //! not changed, but the given parametric direction is //! reversed. Hence the orientation of the surface is reversed. - Standard_EXPORT void UReverse() override; + Standard_EXPORT void UReverse() final; //! Computes the u parameter on the modified //! surface, produced by when reversing its u //! parametric direction, for any point of u parameter U on this patch. - Standard_EXPORT double UReversedParameter(const double U) const override; + Standard_EXPORT double UReversedParameter(const double U) const final; //! Changes the orientation of this patch in the v //! parametric direction. The bounds of the surface are //! not changed, but the given parametric direction is //! reversed. Hence the orientation of the surface is reversed. - Standard_EXPORT void VReverse() override; + Standard_EXPORT void VReverse() final; //! Computes the v parameter on the modified //! surface, produced by when reversing its v //! parametric direction, for any point of v parameter V on this patch. - Standard_EXPORT double VReversedParameter(const double V) const override; + Standard_EXPORT double VReversedParameter(const double V) const final; //! Returns the parametric bounds U1, U2, V1 and V2 of this patch. - Standard_EXPORT void Bounds(double& U1, double& U2, double& V1, double& V2) const override; + Standard_EXPORT void Bounds(double& U1, double& U2, double& V1, double& V2) const final; //! Returns the continuity of the surface : //! C0 : only geometric continuity, @@ -187,51 +187,51 @@ public: //! C2 : continuity of the second derivative all along the Surface, //! C3 : continuity of the third derivative all along the Surface, //! CN : the order of continuity is infinite. - Standard_EXPORT GeomAbs_Shape Continuity() const override; + Standard_EXPORT GeomAbs_Shape Continuity() const final; //! Returns true if this patch is closed in the given parametric direction. - Standard_EXPORT bool IsUClosed() const override; + Standard_EXPORT bool IsUClosed() const final; //! Returns true if this patch is closed in the given parametric direction. - Standard_EXPORT bool IsVClosed() const override; + Standard_EXPORT bool IsVClosed() const final; //! Returns true if the order of derivation in the U parametric //! direction is N. //! Raised if N < 0. - Standard_EXPORT bool IsCNu(const int N) const override; + Standard_EXPORT bool IsCNu(const int N) const final; //! Returns true if the order of derivation in the V parametric //! direction is N. //! Raised if N < 0. - Standard_EXPORT bool IsCNv(const int N) const override; + Standard_EXPORT bool IsCNv(const int N) const final; //! Returns true if this patch is periodic and not trimmed in the given //! parametric direction. - Standard_EXPORT bool IsUPeriodic() const override; + Standard_EXPORT bool IsUPeriodic() const final; //! Returns the period of this patch in the u //! parametric direction. //! raises if the surface is not uperiodic. - Standard_EXPORT double UPeriod() const override; + Standard_EXPORT double UPeriod() const final; //! Returns true if this patch is periodic and not trimmed in the given //! parametric direction. - Standard_EXPORT bool IsVPeriodic() const override; + Standard_EXPORT bool IsVPeriodic() const final; //! Returns the period of this patch in the v //! parametric direction. //! raises if the surface is not vperiodic. //! value and derivatives - Standard_EXPORT double VPeriod() const override; + Standard_EXPORT double VPeriod() const final; //! computes the U isoparametric curve. - Standard_EXPORT occ::handle UIso(const double U) const override; + Standard_EXPORT occ::handle UIso(const double U) const final; //! Computes the V isoparametric curve. - Standard_EXPORT occ::handle VIso(const double V) const override; + Standard_EXPORT occ::handle VIso(const double V) const final; //! Can be raised if the basis surface is an OffsetSurface. - Standard_EXPORT void D0(const double U, const double V, gp_Pnt& P) const override; + Standard_EXPORT void D0(const double U, const double V, gp_Pnt& P) const final; //! The returned derivatives have the same orientation as the //! derivatives of the basis surface even if the trimmed surface @@ -241,7 +241,7 @@ public: const double V, gp_Pnt& P, gp_Vec& D1U, - gp_Vec& D1V) const override; + gp_Vec& D1V) const final; //! The returned derivatives have the same orientation as the //! derivatives of the basis surface even if the trimmed surface @@ -254,7 +254,7 @@ public: gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, - gp_Vec& D2UV) const override; + gp_Vec& D2UV) const final; //! The returned derivatives have the same orientation as the //! derivatives of the basis surface even if the trimmed surface @@ -271,7 +271,7 @@ public: gp_Vec& D3U, gp_Vec& D3V, gp_Vec& D3UUV, - gp_Vec& D3UVV) const override; + gp_Vec& D3UVV) const final; //! The returned derivative has the same orientation as the //! derivative of the basis surface even if the trimmed surface @@ -279,16 +279,13 @@ public: //! Warning! UndefinedDerivative raised if the continuity of the surface is not CNu in the U //! parametric direction and CNv in the V parametric direction. //! RangeError Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0. - Standard_EXPORT gp_Vec DN(const double U, - const double V, - const int Nu, - const int Nv) const override; + Standard_EXPORT gp_Vec DN(const double U, const double V, const int Nu, const int Nv) const final; //! Applies the transformation T to this patch. //! Warning //! As a consequence, the basis surface included in the //! data structure of this patch is also modified. - Standard_EXPORT void Transform(const gp_Trsf& T) override; + Standard_EXPORT void Transform(const gp_Trsf& T) final; //! Computes the parameters on the transformed surface for //! the transform of the point of parameters U,V on . @@ -304,7 +301,7 @@ public: //! me->TransformParameters(U,V,T) //! @endcode //! This method calls the basis surface method. - Standard_EXPORT void TransformParameters(double& U, double& V, const gp_Trsf& T) const override; + Standard_EXPORT void TransformParameters(double& U, double& V, const gp_Trsf& T) const final; //! Returns a 2d transformation used to find the new //! parameters of a point on the transformed surface. @@ -321,13 +318,13 @@ public: //! me->ParametricTransformation(T) //! @endcode //! This method calls the basis surface method. - Standard_EXPORT gp_GTrsf2d ParametricTransformation(const gp_Trsf& T) const override; + Standard_EXPORT gp_GTrsf2d ParametricTransformation(const gp_Trsf& T) const final; //! Creates a new object which is a copy of this patch. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; DEFINE_STANDARD_RTTIEXT(Geom_RectangularTrimmedSurface, Geom_BoundedSurface) diff --git a/src/ModelingData/TKG3d/Geom/Geom_SphericalSurface.hxx b/src/ModelingData/TKG3d/Geom/Geom_SphericalSurface.hxx index ce6757bc92..d8b4f116fa 100644 --- a/src/ModelingData/TKG3d/Geom/Geom_SphericalSurface.hxx +++ b/src/ModelingData/TKG3d/Geom/Geom_SphericalSurface.hxx @@ -107,20 +107,20 @@ public: //! surface, when reversing its u parametric //! direction, for any point of u parameter U on this sphere. //! In the case of a sphere, these functions returns 2.PI - U. - Standard_EXPORT double UReversedParameter(const double U) const override; + Standard_EXPORT double UReversedParameter(const double U) const final; //! Computes the v parameter on the modified //! surface, when reversing its v parametric //! direction, for any point of v parameter V on this sphere. //! In the case of a sphere, these functions returns -U. - Standard_EXPORT double VReversedParameter(const double V) const override; + Standard_EXPORT double VReversedParameter(const double V) const final; //! Computes the area of the spherical surface. Standard_EXPORT double Area() const; //! Returns the parametric bounds U1, U2, V1 and V2 of this sphere. //! For a sphere: U1 = 0, U2 = 2*PI, V1 = -PI/2, V2 = PI/2. - Standard_EXPORT void Bounds(double& U1, double& U2, double& V1, double& V2) const override; + Standard_EXPORT void Bounds(double& U1, double& U2, double& V1, double& V2) const final; //! Returns the coefficients of the implicit equation of the //! quadric in the absolute cartesian coordinates system : @@ -150,16 +150,16 @@ public: Standard_EXPORT double Volume() const; //! Returns True. - Standard_EXPORT bool IsUClosed() const override; + Standard_EXPORT bool IsUClosed() const final; //! Returns False. - Standard_EXPORT bool IsVClosed() const override; + Standard_EXPORT bool IsVClosed() const final; //! Returns True. - Standard_EXPORT bool IsUPeriodic() const override; + Standard_EXPORT bool IsUPeriodic() const final; //! Returns False. - Standard_EXPORT bool IsVPeriodic() const override; + Standard_EXPORT bool IsVPeriodic() const final; //! Computes the U isoparametric curve. //! The U isoparametric curves of the surface are defined by the @@ -168,7 +168,7 @@ public: //! defines the origin of parametrization u. //! For a SphericalSurface the UIso curve is a Circle. //! Warnings : The radius of this circle can be zero. - Standard_EXPORT occ::handle UIso(const double U) const override; + Standard_EXPORT occ::handle UIso(const double U) const final; //! Computes the V isoparametric curve. //! The V isoparametric curves of the surface are defined by @@ -180,7 +180,7 @@ public: //! create circle with radius = 0.0 //! For a SphericalSurface the VIso curve is a Circle. //! Warnings : The radius of this circle can be zero. - Standard_EXPORT occ::handle VIso(const double V) const override; + Standard_EXPORT occ::handle VIso(const double V) const final; //! Computes the point P (U, V) on the surface. //! P (U, V) = Loc + Radius * Sin (V) * Zdir + @@ -188,7 +188,7 @@ public: //! where Loc is the origin of the placement plane (XAxis, YAxis) //! XDir is the direction of the XAxis and YDir the direction of //! the YAxis and ZDir the direction of the ZAxis. - Standard_EXPORT void D0(const double U, const double V, gp_Pnt& P) const override; + Standard_EXPORT void D0(const double U, const double V, gp_Pnt& P) const final; //! Computes the current point and the first derivatives in the //! directions U and V. @@ -196,7 +196,7 @@ public: const double V, gp_Pnt& P, gp_Vec& D1U, - gp_Vec& D1V) const override; + gp_Vec& D1V) const final; //! Computes the current point, the first and the second derivatives //! in the directions U and V. @@ -207,7 +207,7 @@ public: gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, - gp_Vec& D2UV) const override; + gp_Vec& D2UV) const final; //! Computes the current point, the first,the second and the third //! derivatives in the directions U and V. @@ -222,24 +222,21 @@ public: gp_Vec& D3U, gp_Vec& D3V, gp_Vec& D3UUV, - gp_Vec& D3UVV) const override; + gp_Vec& D3UVV) const final; //! Computes the derivative of order Nu in the direction u //! and Nv in the direction v. //! Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0. - Standard_EXPORT gp_Vec DN(const double U, - const double V, - const int Nu, - const int Nv) const override; + Standard_EXPORT gp_Vec DN(const double U, const double V, const int Nu, const int Nv) const final; //! Applies the transformation T to this sphere. - Standard_EXPORT void Transform(const gp_Trsf& T) override; + Standard_EXPORT void Transform(const gp_Trsf& T) final; //! Creates a new object which is a copy of this sphere. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; DEFINE_STANDARD_RTTIEXT(Geom_SphericalSurface, Geom_ElementarySurface) diff --git a/src/ModelingData/TKG3d/Geom/Geom_SurfaceOfLinearExtrusion.hxx b/src/ModelingData/TKG3d/Geom/Geom_SurfaceOfLinearExtrusion.hxx index c55840b0dc..b62918537b 100644 --- a/src/ModelingData/TKG3d/Geom/Geom_SurfaceOfLinearExtrusion.hxx +++ b/src/ModelingData/TKG3d/Geom/Geom_SurfaceOfLinearExtrusion.hxx @@ -91,7 +91,7 @@ public: //! In the case of a surface of linear extrusion: //! - UReverse reverses the basis curve, and //! - VReverse reverses the direction of linear extrusion. - Standard_EXPORT void UReverse() override; + Standard_EXPORT void UReverse() final; //! Computes the u parameter on the modified //! surface, produced by reversing its u parametric @@ -100,7 +100,7 @@ public: //! - UReverseParameter returns the reversed //! parameter given by the function //! ReversedParameter called with U on the basis curve, - Standard_EXPORT double UReversedParameter(const double U) const override; + Standard_EXPORT double UReversedParameter(const double U) const final; //! Changes the orientation of this surface of linear //! extrusion in the v parametric direction. The @@ -110,13 +110,13 @@ public: //! In the case of a surface of linear extrusion: //! - UReverse reverses the basis curve, and //! - VReverse reverses the direction of linear extrusion. - Standard_EXPORT void VReverse() override; + Standard_EXPORT void VReverse() final; //! Computes the v parameter on the modified //! surface, produced by reversing its u v parametric //! direction, for any point of v parameter V on this surface of linear extrusion. //! In the case of an extruded surface VReverse returns -V. - Standard_EXPORT double VReversedParameter(const double V) const override; + Standard_EXPORT double VReversedParameter(const double V) const final; //! Returns the parametric bounds U1, U2, V1 and V2 of //! this surface of linear extrusion. @@ -124,48 +124,48 @@ public: //! parametric direction, so: //! - V1 = double::RealFirst() //! - V2 = double::RealLast(). - Standard_EXPORT void Bounds(double& U1, double& U2, double& V1, double& V2) const override; + Standard_EXPORT void Bounds(double& U1, double& U2, double& V1, double& V2) const final; //! IsUClosed returns true if the "basis curve" of this //! surface of linear extrusion is closed. - Standard_EXPORT bool IsUClosed() const override; + Standard_EXPORT bool IsUClosed() const final; //! IsVClosed always returns false. - Standard_EXPORT bool IsVClosed() const override; + Standard_EXPORT bool IsVClosed() const final; //! IsCNu returns true if the degree of continuity for the //! "basis curve" of this surface of linear extrusion is at least N. //! Raises RangeError if N < 0. - Standard_EXPORT bool IsCNu(const int N) const override; + Standard_EXPORT bool IsCNu(const int N) const final; //! IsCNv always returns true. - Standard_EXPORT bool IsCNv(const int N) const override; + Standard_EXPORT bool IsCNv(const int N) const final; //! IsUPeriodic returns true if the "basis curve" of this //! surface of linear extrusion is periodic. - Standard_EXPORT bool IsUPeriodic() const override; + Standard_EXPORT bool IsUPeriodic() const final; //! IsVPeriodic always returns false. - Standard_EXPORT bool IsVPeriodic() const override; + Standard_EXPORT bool IsVPeriodic() const final; //! Computes the U isoparametric curve of this surface //! of linear extrusion. This is the line parallel to the //! direction of extrusion, passing through the point of //! parameter U of the basis curve. - Standard_EXPORT occ::handle UIso(const double U) const override; + Standard_EXPORT occ::handle UIso(const double U) const final; //! Computes the V isoparametric curve of this surface //! of linear extrusion. This curve is obtained by //! translating the extruded curve in the direction of //! extrusion, with the magnitude V. - Standard_EXPORT occ::handle VIso(const double V) const override; + Standard_EXPORT occ::handle VIso(const double V) const final; //! Computes the point P (U, V) on the surface. //! The parameter U is the parameter on the extruded curve. //! The parametrization V is a linear parametrization, and //! the direction of parametrization is the direction of //! extrusion. If the point is on the extruded curve, V = 0.0 - Standard_EXPORT void D0(const double U, const double V, gp_Pnt& P) const override; + Standard_EXPORT void D0(const double U, const double V, gp_Pnt& P) const final; //! Computes the current point and the first derivatives in the //! directions U and V. @@ -174,7 +174,7 @@ public: const double V, gp_Pnt& P, gp_Vec& D1U, - gp_Vec& D1V) const override; + gp_Vec& D1V) const final; //! --- Purpose ; //! Computes the current point, the first and the second derivatives @@ -187,7 +187,7 @@ public: gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, - gp_Vec& D2UV) const override; + gp_Vec& D2UV) const final; //! Computes the current point, the first,the second and the third //! derivatives in the directions U and V. @@ -203,20 +203,17 @@ public: gp_Vec& D3U, gp_Vec& D3V, gp_Vec& D3UUV, - gp_Vec& D3UVV) const override; + gp_Vec& D3UVV) const final; //! Computes the derivative of order Nu in the direction u //! and Nv in the direction v. //! Raises UndefinedDerivative if the continuity of the surface is not CNu in the u //! direction and CNv in the v direction. //! Raises RangeError if Nu + Nv < 1 or Nu < 0 or Nv < 0. - Standard_EXPORT gp_Vec DN(const double U, - const double V, - const int Nu, - const int Nv) const override; + Standard_EXPORT gp_Vec DN(const double U, const double V, const int Nu, const int Nv) const final; //! Applies the transformation T to this surface of linear extrusion. - Standard_EXPORT void Transform(const gp_Trsf& T) override; + Standard_EXPORT void Transform(const gp_Trsf& T) final; //! Computes the parameters on the transformed surface for //! the transform of the point of parameters U,V on . @@ -234,7 +231,7 @@ public: //! This method multiplies: //! U by BasisCurve()->ParametricTransformation(T) //! V by T.ScaleFactor() - Standard_EXPORT void TransformParameters(double& U, double& V, const gp_Trsf& T) const override; + Standard_EXPORT void TransformParameters(double& U, double& V, const gp_Trsf& T) const final; //! Returns a 2d transformation used to find the new //! parameters of a point on the transformed surface. @@ -253,13 +250,13 @@ public: //! This method returns a scale //! U by BasisCurve()->ParametricTransformation(T) //! V by T.ScaleFactor() - Standard_EXPORT gp_GTrsf2d ParametricTransformation(const gp_Trsf& T) const override; + Standard_EXPORT gp_GTrsf2d ParametricTransformation(const gp_Trsf& T) const final; //! Creates a new object which is a copy of this surface of linear extrusion. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; DEFINE_STANDARD_RTTIEXT(Geom_SurfaceOfLinearExtrusion, Geom_SweptSurface) }; diff --git a/src/ModelingData/TKG3d/Geom/Geom_SurfaceOfRevolution.hxx b/src/ModelingData/TKG3d/Geom/Geom_SurfaceOfRevolution.hxx index e256d9272f..2b8a88d18b 100644 --- a/src/ModelingData/TKG3d/Geom/Geom_SurfaceOfRevolution.hxx +++ b/src/ModelingData/TKG3d/Geom/Geom_SurfaceOfRevolution.hxx @@ -147,14 +147,14 @@ public: //! As a consequence: //! - UReverse reverses the direction of the axis of //! revolution of this surface, - Standard_EXPORT void UReverse() override; + Standard_EXPORT void UReverse() final; //! Computes the u parameter on the modified //! surface, when reversing its u parametric //! direction, for any point of u parameter U on this surface of revolution. //! In the case of a revolved surface: //! - UReversedParameter returns 2.*Pi - U - Standard_EXPORT double UReversedParameter(const double U) const override; + Standard_EXPORT double UReversedParameter(const double U) const final; //! Changes the orientation of this surface of revolution //! in the v parametric direction. The bounds of the @@ -163,7 +163,7 @@ public: //! surface is reversed. //! As a consequence: //! - VReverse reverses the meridian of this surface of revolution. - Standard_EXPORT void VReverse() override; + Standard_EXPORT void VReverse() final; //! Computes the v parameter on the modified //! surface, when reversing its v parametric @@ -172,7 +172,7 @@ public: //! - VReversedParameter returns the reversed //! parameter given by the function //! ReversedParameter called with V on the meridian. - Standard_EXPORT double VReversedParameter(const double V) const override; + Standard_EXPORT double VReversedParameter(const double V) const final; //! Computes the parameters on the transformed surface for //! the transform of the point of parameters U,V on . @@ -188,7 +188,7 @@ public: //! me->TransformParameters(U,V,T) //! @endcode //! This method multiplies V by BasisCurve()->ParametricTransformation(T) - Standard_EXPORT void TransformParameters(double& U, double& V, const gp_Trsf& T) const override; + Standard_EXPORT void TransformParameters(double& U, double& V, const gp_Trsf& T) const final; //! Returns a 2d transformation used to find the new //! parameters of a point on the transformed surface. @@ -206,49 +206,49 @@ public: //! @endcode //! This method returns a scale centered on the //! U axis with BasisCurve()->ParametricTransformation(T) - Standard_EXPORT gp_GTrsf2d ParametricTransformation(const gp_Trsf& T) const override; + Standard_EXPORT gp_GTrsf2d ParametricTransformation(const gp_Trsf& T) const final; //! Returns the parametric bounds U1, U2 , V1 and V2 of this surface. //! A surface of revolution is always complete, so U1 = 0, U2 = 2*PI. - Standard_EXPORT void Bounds(double& U1, double& U2, double& V1, double& V2) const override; + Standard_EXPORT void Bounds(double& U1, double& U2, double& V1, double& V2) const final; //! IsUClosed always returns true. - Standard_EXPORT bool IsUClosed() const override; + Standard_EXPORT bool IsUClosed() const final; //! IsVClosed returns true if the meridian of this //! surface of revolution is closed. - Standard_EXPORT bool IsVClosed() const override; + Standard_EXPORT bool IsVClosed() const final; //! IsCNu always returns true. - Standard_EXPORT bool IsCNu(const int N) const override; + Standard_EXPORT bool IsCNu(const int N) const final; //! IsCNv returns true if the degree of continuity of the //! meridian of this surface of revolution is at least N. //! Raised if N < 0. - Standard_EXPORT bool IsCNv(const int N) const override; + Standard_EXPORT bool IsCNv(const int N) const final; //! Returns True. - Standard_EXPORT bool IsUPeriodic() const override; + Standard_EXPORT bool IsUPeriodic() const final; //! IsVPeriodic returns true if the meridian of this //! surface of revolution is periodic. - Standard_EXPORT bool IsVPeriodic() const override; + Standard_EXPORT bool IsVPeriodic() const final; //! Computes the U isoparametric curve of this surface //! of revolution. It is the curve obtained by rotating the //! meridian through an angle U about the axis of revolution. - Standard_EXPORT occ::handle UIso(const double U) const override; + Standard_EXPORT occ::handle UIso(const double U) const final; //! Computes the U isoparametric curve of this surface //! of revolution. It is the curve obtained by rotating the //! meridian through an angle U about the axis of revolution. - Standard_EXPORT occ::handle VIso(const double V) const override; + Standard_EXPORT occ::handle VIso(const double V) const final; //! Computes the point P (U, V) on the surface. //! U is the angle of the rotation around the revolution axis. //! The direction of this axis gives the sense of rotation. //! V is the parameter of the revolved curve. - Standard_EXPORT void D0(const double U, const double V, gp_Pnt& P) const override; + Standard_EXPORT void D0(const double U, const double V, gp_Pnt& P) const final; //! Computes the current point and the first derivatives //! in the directions U and V. @@ -257,7 +257,7 @@ public: const double V, gp_Pnt& P, gp_Vec& D1U, - gp_Vec& D1V) const override; + gp_Vec& D1V) const final; //! Computes the current point, the first and the second derivatives //! in the directions U and V. @@ -269,7 +269,7 @@ public: gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, - gp_Vec& D2UV) const override; + gp_Vec& D2UV) const final; //! Computes the current point, the first,the second and the third //! derivatives in the directions U and V. @@ -285,7 +285,7 @@ public: gp_Vec& D3U, gp_Vec& D3V, gp_Vec& D3UUV, - gp_Vec& D3UVV) const override; + gp_Vec& D3UVV) const final; //! Computes the derivative of order Nu in the direction u and //! Nv in the direction v. @@ -300,19 +300,16 @@ public: //! else P is between discontinuities //! can be evaluated using methods of //! global evaluations P = S( U ,V ) - Standard_EXPORT gp_Vec DN(const double U, - const double V, - const int Nu, - const int Nv) const override; + Standard_EXPORT gp_Vec DN(const double U, const double V, const int Nu, const int Nv) const final; //! Applies the transformation T to this surface of revolution. - Standard_EXPORT void Transform(const gp_Trsf& T) override; + Standard_EXPORT void Transform(const gp_Trsf& T) final; //! Creates a new object which is a copy of this surface of revolution. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; DEFINE_STANDARD_RTTIEXT(Geom_SurfaceOfRevolution, Geom_SweptSurface) diff --git a/src/ModelingData/TKG3d/Geom/Geom_ToroidalSurface.hxx b/src/ModelingData/TKG3d/Geom/Geom_ToroidalSurface.hxx index dd2a900fec..e56e7c67ad 100644 --- a/src/ModelingData/TKG3d/Geom/Geom_ToroidalSurface.hxx +++ b/src/ModelingData/TKG3d/Geom/Geom_ToroidalSurface.hxx @@ -124,19 +124,19 @@ public: //! Return the parameter on the Ureversed surface for //! the point of parameter U on . //! Return 2.PI - U. - Standard_EXPORT double UReversedParameter(const double U) const override; + Standard_EXPORT double UReversedParameter(const double U) const final; //! Return the parameter on the Ureversed surface for //! the point of parameter U on . //! Return 2.PI - U. - Standard_EXPORT double VReversedParameter(const double U) const override; + Standard_EXPORT double VReversedParameter(const double U) const final; //! Computes the area of the surface. Standard_EXPORT double Area() const; //! Returns the parametric bounds U1, U2, V1 and V2 of this torus. //! For a torus: U1 = V1 = 0 and U2 = V2 = 2*PI . - Standard_EXPORT void Bounds(double& U1, double& U2, double& V1, double& V2) const override; + Standard_EXPORT void Bounds(double& U1, double& U2, double& V1, double& V2) const final; //! Returns the coefficients of the implicit equation of the surface //! in the absolute cartesian coordinate system : @@ -164,16 +164,16 @@ public: Standard_EXPORT double Volume() const; //! Returns True. - Standard_EXPORT bool IsUClosed() const override; + Standard_EXPORT bool IsUClosed() const final; //! Returns True. - Standard_EXPORT bool IsVClosed() const override; + Standard_EXPORT bool IsVClosed() const final; //! Returns True. - Standard_EXPORT bool IsUPeriodic() const override; + Standard_EXPORT bool IsUPeriodic() const final; //! Returns True. - Standard_EXPORT bool IsVPeriodic() const override; + Standard_EXPORT bool IsVPeriodic() const final; //! Computes the U isoparametric curve. //! @@ -183,7 +183,7 @@ public: //! Warnings: //! The radius of the circle can be zero if for the surface //! MinorRadius = 0.0 - Standard_EXPORT occ::handle UIso(const double U) const override; + Standard_EXPORT occ::handle UIso(const double U) const final; //! Computes the V isoparametric curve. //! @@ -193,7 +193,7 @@ public: //! Warnings: //! The radius of the circle can be zero if for the surface //! MajorRadius = MinorRadius - Standard_EXPORT occ::handle VIso(const double V) const override; + Standard_EXPORT occ::handle VIso(const double V) const final; //! Computes the point P (U, V) on the surface. //! P (U, V) = Loc + MinorRadius * Sin (V) * Zdir + @@ -202,7 +202,7 @@ public: //! where Loc is the origin of the placement plane (XAxis, YAxis) //! XDir is the direction of the XAxis and YDir the direction of //! the YAxis and ZDir the direction of the ZAxis. - Standard_EXPORT void D0(const double U, const double V, gp_Pnt& P) const override; + Standard_EXPORT void D0(const double U, const double V, gp_Pnt& P) const final; //! Computes the current point and the first derivatives in //! the directions U and V. @@ -210,7 +210,7 @@ public: const double V, gp_Pnt& P, gp_Vec& D1U, - gp_Vec& D1V) const override; + gp_Vec& D1V) const final; //! Computes the current point, the first and the second derivatives //! in the directions U and V. @@ -221,7 +221,7 @@ public: gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, - gp_Vec& D2UV) const override; + gp_Vec& D2UV) const final; //! Computes the current point, the first,the second and the //! third derivatives in the directions U and V. @@ -236,24 +236,21 @@ public: gp_Vec& D3U, gp_Vec& D3V, gp_Vec& D3UUV, - gp_Vec& D3UVV) const override; + gp_Vec& D3UVV) const final; //! Computes the derivative of order Nu in the direction u and //! Nv in the direction v. //! Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0. - Standard_EXPORT gp_Vec DN(const double U, - const double V, - const int Nu, - const int Nv) const override; + Standard_EXPORT gp_Vec DN(const double U, const double V, const int Nu, const int Nv) const final; //! Applies the transformation T to this torus. - Standard_EXPORT void Transform(const gp_Trsf& T) override; + Standard_EXPORT void Transform(const gp_Trsf& T) final; //! Creates a new object which is a copy of this torus. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; DEFINE_STANDARD_RTTIEXT(Geom_ToroidalSurface, Geom_ElementarySurface) diff --git a/src/ModelingData/TKG3d/Geom/Geom_TrimmedCurve.hxx b/src/ModelingData/TKG3d/Geom/Geom_TrimmedCurve.hxx index f9fa832249..a539bb941f 100644 --- a/src/ModelingData/TKG3d/Geom/Geom_TrimmedCurve.hxx +++ b/src/ModelingData/TKG3d/Geom/Geom_TrimmedCurve.hxx @@ -96,11 +96,11 @@ public: //! the reversed trimmed curve is defined by: //! - the reversed basis curve, whose parameter range is still [ 0., 1. ], //! - the two trim values 1. - U2 (first parameter) and 1. - U1 (last parameter). - Standard_EXPORT void Reverse() override; + Standard_EXPORT void Reverse() final; //! Computes the parameter on the reversed curve for //! the point of parameter U on this trimmed curve. - Standard_EXPORT double ReversedParameter(const double U) const override; + Standard_EXPORT double ReversedParameter(const double U) const final; //! Changes this trimmed curve, by redefining the //! parameter values U1 and U2 which limit its basis curve. @@ -138,7 +138,7 @@ public: //! C2 : continuity of the second derivative all along the Curve, //! C3 : continuity of the third derivative all along the Curve, //! CN : the order of continuity is infinite. - Standard_EXPORT GeomAbs_Shape Continuity() const override; + Standard_EXPORT GeomAbs_Shape Continuity() const final; //! Returns true if the degree of continuity of the basis //! curve of this trimmed curve is at least N. A trimmed @@ -148,33 +148,33 @@ public: //! the continuity of the basis curve because you consider //! only a part of the basis curve. //! Raised if N < 0. - Standard_EXPORT bool IsCN(const int N) const override; + Standard_EXPORT bool IsCN(const int N) const final; //! Returns the end point of . This point is the //! evaluation of the curve for the "LastParameter". - Standard_EXPORT gp_Pnt EndPoint() const override; + Standard_EXPORT gp_Pnt EndPoint() const final; //! Returns the value of the first parameter of . //! The first parameter is the parameter of the "StartPoint" //! of the trimmed curve. - Standard_EXPORT double FirstParameter() const override; + Standard_EXPORT double FirstParameter() const final; //! Returns True if the distance between the StartPoint and //! the EndPoint is lower or equal to Resolution from package gp. - Standard_EXPORT bool IsClosed() const override; + Standard_EXPORT bool IsClosed() const final; //! Always returns FALSE (independently of the type of basis curve). - Standard_EXPORT bool IsPeriodic() const override; + Standard_EXPORT bool IsPeriodic() const final; //! Returns the period of the basis curve of this trimmed curve. //! Exceptions //! Standard_NoSuchObject if the basis curve is not periodic. - Standard_EXPORT double Period() const override; + Standard_EXPORT double Period() const final; //! Returns the value of the last parameter of . //! The last parameter is the parameter of the "EndPoint" of the //! trimmed curve. - Standard_EXPORT double LastParameter() const override; + Standard_EXPORT double LastParameter() const final; //! Returns the start point of . //! This point is the evaluation of the curve from the @@ -184,37 +184,37 @@ public: //! The returned derivatives have the same orientation as the //! derivatives of the basis curve even if the trimmed curve //! has not the same orientation as the basis curve. - Standard_EXPORT gp_Pnt StartPoint() const override; + Standard_EXPORT gp_Pnt StartPoint() const final; //! Returns in P the point of parameter U. //! //! If the basis curve is an OffsetCurve sometimes it is not //! possible to do the evaluation of the curve at the parameter //! U (see class OffsetCurve). - Standard_EXPORT void D0(const double U, gp_Pnt& P) const override; + Standard_EXPORT void D0(const double U, gp_Pnt& P) const final; //! Raised if the continuity of the curve is not C1. - Standard_EXPORT void D1(const double U, gp_Pnt& P, gp_Vec& V1) const override; + Standard_EXPORT void D1(const double U, gp_Pnt& P, gp_Vec& V1) const final; //! Raised if the continuity of the curve is not C2. - Standard_EXPORT void D2(const double U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const override; + Standard_EXPORT void D2(const double U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const final; //! Raised if the continuity of the curve is not C3. Standard_EXPORT void D3(const double U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, - gp_Vec& V3) const override; + gp_Vec& V3) const final; //! N is the order of derivation. //! Raised if the continuity of the curve is not CN. //! Raised if N < 1. //! geometric transformations - Standard_EXPORT gp_Vec DN(const double U, const int N) const override; + Standard_EXPORT gp_Vec DN(const double U, const int N) const final; //! Applies the transformation T to this trimmed curve. //! Warning The basis curve is also modified. - Standard_EXPORT void Transform(const gp_Trsf& T) override; + Standard_EXPORT void Transform(const gp_Trsf& T) final; //! Returns the parameter on the transformed curve for //! the transform of the point of parameter U on . @@ -226,7 +226,7 @@ public: //! me->Value(U).Transformed(T) //! //! This methods calls the basis curve method. - Standard_EXPORT double TransformedParameter(const double U, const gp_Trsf& T) const override; + Standard_EXPORT double TransformedParameter(const double U, const gp_Trsf& T) const final; //! Returns a coefficient to compute the parameter on //! the transformed curve for the transform of the @@ -239,13 +239,13 @@ public: //! Value(U).Transformed(T) //! //! This methods calls the basis curve method. - Standard_EXPORT double ParametricTransformation(const gp_Trsf& T) const override; + Standard_EXPORT double ParametricTransformation(const gp_Trsf& T) const final; //! Creates a new object which is a copy of this trimmed curve. - Standard_EXPORT occ::handle Copy() const override; + Standard_EXPORT occ::handle Copy() const final; //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; + Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const final; DEFINE_STANDARD_RTTIEXT(Geom_TrimmedCurve, Geom_BoundedCurve) diff --git a/src/ModelingData/TKG3d/GeomAdaptor/GeomAdaptor_Curve.cxx b/src/ModelingData/TKG3d/GeomAdaptor/GeomAdaptor_Curve.cxx index 5055ce1728..d2ea1cd351 100644 --- a/src/ModelingData/TKG3d/GeomAdaptor/GeomAdaptor_Curve.cxx +++ b/src/ModelingData/TKG3d/GeomAdaptor/GeomAdaptor_Curve.cxx @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -89,6 +90,11 @@ occ::handle GeomAdaptor_Curve::ShallowCopy() const { aCopy->myCurveData = BezierData{}; } + else + { + // Elementary curve types (gp_Lin, gp_Circ, etc.) are value types - direct copy + aCopy->myCurveData = myCurveData; + } return aCopy; } @@ -210,22 +216,27 @@ void GeomAdaptor_Curve::load(const occ::handle& C, else if (TheType == STANDARD_TYPE(Geom_Circle)) { myTypeCurve = GeomAbs_Circle; + myCurveData = occ::down_cast(C)->Circ(); } else if (TheType == STANDARD_TYPE(Geom_Line)) { myTypeCurve = GeomAbs_Line; + myCurveData = occ::down_cast(C)->Lin(); } else if (TheType == STANDARD_TYPE(Geom_Ellipse)) { myTypeCurve = GeomAbs_Ellipse; + myCurveData = occ::down_cast(C)->Elips(); } else if (TheType == STANDARD_TYPE(Geom_Parabola)) { myTypeCurve = GeomAbs_Parabola; + myCurveData = occ::down_cast(C)->Parab(); } else if (TheType == STANDARD_TYPE(Geom_Hyperbola)) { myTypeCurve = GeomAbs_Hyperbola; + myCurveData = occ::down_cast(C)->Hypr(); } else if (TheType == STANDARD_TYPE(Geom_BezierCurve)) { @@ -611,6 +622,26 @@ void GeomAdaptor_Curve::D0(const double U, gp_Pnt& P) const { switch (myTypeCurve) { + case GeomAbs_Line: + P = ElCLib::Value(U, std::get(myCurveData)); + break; + + case GeomAbs_Circle: + P = ElCLib::Value(U, std::get(myCurveData)); + break; + + case GeomAbs_Ellipse: + P = ElCLib::Value(U, std::get(myCurveData)); + break; + + case GeomAbs_Hyperbola: + P = ElCLib::Value(U, std::get(myCurveData)); + break; + + case GeomAbs_Parabola: + P = ElCLib::Value(U, std::get(myCurveData)); + break; + case GeomAbs_BezierCurve: { auto& aCache = std::get(myCurveData).Cache; if (aCache.IsNull() || !aCache->IsCacheValid(U)) @@ -660,6 +691,26 @@ void GeomAdaptor_Curve::D1(const double U, gp_Pnt& P, gp_Vec& V) const { switch (myTypeCurve) { + case GeomAbs_Line: + ElCLib::D1(U, std::get(myCurveData), P, V); + break; + + case GeomAbs_Circle: + ElCLib::D1(U, std::get(myCurveData), P, V); + break; + + case GeomAbs_Ellipse: + ElCLib::D1(U, std::get(myCurveData), P, V); + break; + + case GeomAbs_Hyperbola: + ElCLib::D1(U, std::get(myCurveData), P, V); + break; + + case GeomAbs_Parabola: + ElCLib::D1(U, std::get(myCurveData), P, V); + break; + case GeomAbs_BezierCurve: { auto& aCache = std::get(myCurveData).Cache; if (aCache.IsNull() || !aCache->IsCacheValid(U)) @@ -710,6 +761,27 @@ void GeomAdaptor_Curve::D2(const double U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) co { switch (myTypeCurve) { + case GeomAbs_Line: + ElCLib::D1(U, std::get(myCurveData), P, V1); + V2.SetCoord(0., 0., 0.); + break; + + case GeomAbs_Circle: + ElCLib::D2(U, std::get(myCurveData), P, V1, V2); + break; + + case GeomAbs_Ellipse: + ElCLib::D2(U, std::get(myCurveData), P, V1, V2); + break; + + case GeomAbs_Hyperbola: + ElCLib::D2(U, std::get(myCurveData), P, V1, V2); + break; + + case GeomAbs_Parabola: + ElCLib::D2(U, std::get(myCurveData), P, V1, V2); + break; + case GeomAbs_BezierCurve: { auto& aCache = std::get(myCurveData).Cache; if (aCache.IsNull() || !aCache->IsCacheValid(U)) @@ -761,6 +833,29 @@ void GeomAdaptor_Curve::D3(const double U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp { switch (myTypeCurve) { + case GeomAbs_Line: + ElCLib::D1(U, std::get(myCurveData), P, V1); + V2.SetCoord(0., 0., 0.); + V3.SetCoord(0., 0., 0.); + break; + + case GeomAbs_Circle: + ElCLib::D3(U, std::get(myCurveData), P, V1, V2, V3); + break; + + case GeomAbs_Ellipse: + ElCLib::D3(U, std::get(myCurveData), P, V1, V2, V3); + break; + + case GeomAbs_Hyperbola: + ElCLib::D3(U, std::get(myCurveData), P, V1, V2, V3); + break; + + case GeomAbs_Parabola: + ElCLib::D2(U, std::get(myCurveData), P, V1, V2); + V3.SetCoord(0., 0., 0.); + break; + case GeomAbs_BezierCurve: { auto& aCache = std::get(myCurveData).Cache; if (aCache.IsNull() || !aCache->IsCacheValid(U)) @@ -813,6 +908,21 @@ gp_Vec GeomAdaptor_Curve::DN(const double U, const int N) const { switch (myTypeCurve) { + case GeomAbs_Line: + return ElCLib::DN(U, std::get(myCurveData), N); + + case GeomAbs_Circle: + return ElCLib::DN(U, std::get(myCurveData), N); + + case GeomAbs_Ellipse: + return ElCLib::DN(U, std::get(myCurveData), N); + + case GeomAbs_Hyperbola: + return ElCLib::DN(U, std::get(myCurveData), N); + + case GeomAbs_Parabola: + return ElCLib::DN(U, std::get(myCurveData), N); + case GeomAbs_BezierCurve: return myCurve->DN(U, N); @@ -856,14 +966,14 @@ double GeomAdaptor_Curve::Resolution(const double R3D) const case GeomAbs_Line: return R3D; case GeomAbs_Circle: { - double R = occ::down_cast(myCurve)->Circ().Radius(); + double R = std::get(myCurveData).Radius(); if (R > R3D / 2.) return 2 * std::asin(R3D / (2 * R)); else return 2 * M_PI; } case GeomAbs_Ellipse: { - return R3D / occ::down_cast(myCurve)->MajorRadius(); + return R3D / std::get(myCurveData).MajorRadius(); } case GeomAbs_BezierCurve: { double res; @@ -891,7 +1001,7 @@ gp_Lin GeomAdaptor_Curve::Line() const { Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Line, "GeomAdaptor_Curve::Line() - curve is not a Line"); - return occ::down_cast(myCurve)->Lin(); + return std::get(myCurveData); } //================================================================================================= @@ -900,7 +1010,7 @@ gp_Circ GeomAdaptor_Curve::Circle() const { Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Circle, "GeomAdaptor_Curve::Circle() - curve is not a Circle"); - return occ::down_cast(myCurve)->Circ(); + return std::get(myCurveData); } //================================================================================================= @@ -909,7 +1019,7 @@ gp_Elips GeomAdaptor_Curve::Ellipse() const { Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Ellipse, "GeomAdaptor_Curve::Ellipse() - curve is not an Ellipse"); - return occ::down_cast(myCurve)->Elips(); + return std::get(myCurveData); } //================================================================================================= @@ -918,7 +1028,7 @@ gp_Hypr GeomAdaptor_Curve::Hyperbola() const { Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Hyperbola, "GeomAdaptor_Curve::Hyperbola() - curve is not a Hyperbola"); - return occ::down_cast(myCurve)->Hypr(); + return std::get(myCurveData); } //================================================================================================= @@ -927,7 +1037,7 @@ gp_Parab GeomAdaptor_Curve::Parabola() const { Standard_NoSuchObject_Raise_if(myTypeCurve != GeomAbs_Parabola, "GeomAdaptor_Curve::Parabola() - curve is not a Parabola"); - return occ::down_cast(myCurve)->Parab(); + return std::get(myCurveData); } //================================================================================================= diff --git a/src/ModelingData/TKG3d/GeomAdaptor/GeomAdaptor_Curve.hxx b/src/ModelingData/TKG3d/GeomAdaptor/GeomAdaptor_Curve.hxx index f8f5b7f33c..6ff9193fa8 100644 --- a/src/ModelingData/TKG3d/GeomAdaptor/GeomAdaptor_Curve.hxx +++ b/src/ModelingData/TKG3d/GeomAdaptor/GeomAdaptor_Curve.hxx @@ -21,7 +21,12 @@ #include #include #include +#include #include +#include +#include +#include +#include #include #include #include @@ -63,7 +68,17 @@ public: }; //! Variant type for curve-specific evaluation data. - using CurveDataVariant = std::variant; + //! Elementary curve primitives (gp_Lin, gp_Circ, etc.) are stored directly + //! to enable direct ElCLib dispatch without virtual calls. + using CurveDataVariant = std::variant; public: GeomAdaptor_Curve() diff --git a/src/ModelingData/TKG3d/GeomAdaptor/GeomAdaptor_Surface.cxx b/src/ModelingData/TKG3d/GeomAdaptor/GeomAdaptor_Surface.cxx index c3a193d167..ac63d24551 100644 --- a/src/ModelingData/TKG3d/GeomAdaptor/GeomAdaptor_Surface.cxx +++ b/src/ModelingData/TKG3d/GeomAdaptor/GeomAdaptor_Surface.cxx @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -338,6 +339,11 @@ occ::handle GeomAdaptor_Surface::ShallowCopy() const // Cache is not copied - will be rebuilt on demand aCopy->mySurfaceData = aNewData; } + else + { + // Elementary surface types (gp_Pln, gp_Cylinder, etc.) are value types - direct copy + aCopy->mySurfaceData = mySurfaceData; + } return aCopy; } @@ -374,15 +380,30 @@ void GeomAdaptor_Surface::load(const occ::handle& S, VLast); } else if (TheType == STANDARD_TYPE(Geom_Plane)) + { mySurfaceType = GeomAbs_Plane; + mySurfaceData = occ::down_cast(S)->Pln(); + } else if (TheType == STANDARD_TYPE(Geom_CylindricalSurface)) + { mySurfaceType = GeomAbs_Cylinder; + mySurfaceData = occ::down_cast(S)->Cylinder(); + } else if (TheType == STANDARD_TYPE(Geom_ConicalSurface)) + { mySurfaceType = GeomAbs_Cone; + mySurfaceData = occ::down_cast(S)->Cone(); + } else if (TheType == STANDARD_TYPE(Geom_SphericalSurface)) + { mySurfaceType = GeomAbs_Sphere; + mySurfaceData = occ::down_cast(S)->Sphere(); + } else if (TheType == STANDARD_TYPE(Geom_ToroidalSurface)) + { mySurfaceType = GeomAbs_Torus; + mySurfaceData = occ::down_cast(S)->Torus(); + } else if (TheType == STANDARD_TYPE(Geom_SurfaceOfRevolution)) { mySurfaceType = GeomAbs_SurfaceOfRevolution; @@ -955,6 +976,22 @@ void GeomAdaptor_Surface::D0(const double U, const double V, gp_Pnt& P) const { switch (mySurfaceType) { + case GeomAbs_Plane: + ElSLib::D0(U, V, std::get(mySurfaceData), P); + break; + case GeomAbs_Cylinder: + ElSLib::D0(U, V, std::get(mySurfaceData), P); + break; + case GeomAbs_Cone: + ElSLib::D0(U, V, std::get(mySurfaceData), P); + break; + case GeomAbs_Sphere: + ElSLib::D0(U, V, std::get(mySurfaceData), P); + break; + case GeomAbs_Torus: + ElSLib::D0(U, V, std::get(mySurfaceData), P); + break; + case GeomAbs_BezierSurface: { auto& aCache = std::get(mySurfaceData).Cache; if (aCache.IsNull() || !aCache->IsCacheValid(U, V)) @@ -1026,6 +1063,22 @@ void GeomAdaptor_Surface::D1(const double U, switch (mySurfaceType) { + case GeomAbs_Plane: + ElSLib::D1(u, v, std::get(mySurfaceData), P, D1U, D1V); + break; + case GeomAbs_Cylinder: + ElSLib::D1(u, v, std::get(mySurfaceData), P, D1U, D1V); + break; + case GeomAbs_Cone: + ElSLib::D1(u, v, std::get(mySurfaceData), P, D1U, D1V); + break; + case GeomAbs_Sphere: + ElSLib::D1(u, v, std::get(mySurfaceData), P, D1U, D1V); + break; + case GeomAbs_Torus: + ElSLib::D1(u, v, std::get(mySurfaceData), P, D1U, D1V); + break; + case GeomAbs_BezierSurface: { auto& aCache = std::get(mySurfaceData).Cache; if (aCache.IsNull() || !aCache->IsCacheValid(U, V)) @@ -1106,6 +1159,25 @@ void GeomAdaptor_Surface::D2(const double U, switch (mySurfaceType) { + case GeomAbs_Plane: + ElSLib::D1(u, v, std::get(mySurfaceData), P, D1U, D1V); + D2U.SetCoord(0., 0., 0.); + D2V.SetCoord(0., 0., 0.); + D2UV.SetCoord(0., 0., 0.); + break; + case GeomAbs_Cylinder: + ElSLib::D2(u, v, std::get(mySurfaceData), P, D1U, D1V, D2U, D2V, D2UV); + break; + case GeomAbs_Cone: + ElSLib::D2(u, v, std::get(mySurfaceData), P, D1U, D1V, D2U, D2V, D2UV); + break; + case GeomAbs_Sphere: + ElSLib::D2(u, v, std::get(mySurfaceData), P, D1U, D1V, D2U, D2V, D2UV); + break; + case GeomAbs_Torus: + ElSLib::D2(u, v, std::get(mySurfaceData), P, D1U, D1V, D2U, D2V, D2UV); + break; + case GeomAbs_BezierSurface: { auto& aCache = std::get(mySurfaceData).Cache; if (aCache.IsNull() || !aCache->IsCacheValid(U, V)) @@ -1210,6 +1282,77 @@ void GeomAdaptor_Surface::D3(const double U, switch (mySurfaceType) { + case GeomAbs_Plane: + ElSLib::D1(u, v, std::get(mySurfaceData), P, D1U, D1V); + D2U.SetCoord(0., 0., 0.); + D2V.SetCoord(0., 0., 0.); + D2UV.SetCoord(0., 0., 0.); + D3U.SetCoord(0., 0., 0.); + D3V.SetCoord(0., 0., 0.); + D3UUV.SetCoord(0., 0., 0.); + D3UVV.SetCoord(0., 0., 0.); + break; + case GeomAbs_Cylinder: + ElSLib::D3(u, + v, + std::get(mySurfaceData), + P, + D1U, + D1V, + D2U, + D2V, + D2UV, + D3U, + D3V, + D3UUV, + D3UVV); + break; + case GeomAbs_Cone: + ElSLib::D3(u, + v, + std::get(mySurfaceData), + P, + D1U, + D1V, + D2U, + D2V, + D2UV, + D3U, + D3V, + D3UUV, + D3UVV); + break; + case GeomAbs_Sphere: + ElSLib::D3(u, + v, + std::get(mySurfaceData), + P, + D1U, + D1V, + D2U, + D2V, + D2UV, + D3U, + D3V, + D3UUV, + D3UVV); + break; + case GeomAbs_Torus: + ElSLib::D3(u, + v, + std::get(mySurfaceData), + P, + D1U, + D1V, + D2U, + D2V, + D2UV, + D3U, + D3V, + D3UUV, + D3UVV); + break; + case GeomAbs_BSplineSurface: { const auto& aBSpl = std::get(mySurfaceData).Surface; if ((USide == 0) && (VSide == 0)) @@ -1348,10 +1491,16 @@ gp_Vec GeomAdaptor_Surface::DN(const double U, const double V, const int Nu, con } case GeomAbs_Plane: + return ElSLib::DN(u, v, std::get(mySurfaceData), Nu, Nv); case GeomAbs_Cylinder: + return ElSLib::DN(u, v, std::get(mySurfaceData), Nu, Nv); case GeomAbs_Cone: + return ElSLib::DN(u, v, std::get(mySurfaceData), Nu, Nv); case GeomAbs_Sphere: + return ElSLib::DN(u, v, std::get(mySurfaceData), Nu, Nv); case GeomAbs_Torus: + return ElSLib::DN(u, v, std::get(mySurfaceData), Nu, Nv); + case GeomAbs_BezierSurface: case GeomAbs_OtherSurface: default: @@ -1507,7 +1656,7 @@ gp_Pln GeomAdaptor_Surface::Plane() const { if (mySurfaceType != GeomAbs_Plane) throw Standard_NoSuchObject("GeomAdaptor_Surface::Plane"); - return occ::down_cast(mySurface)->Pln(); + return std::get(mySurfaceData); } //================================================================================================= @@ -1516,7 +1665,7 @@ gp_Cylinder GeomAdaptor_Surface::Cylinder() const { if (mySurfaceType != GeomAbs_Cylinder) throw Standard_NoSuchObject("GeomAdaptor_Surface::Cylinder"); - return occ::down_cast(mySurface)->Cylinder(); + return std::get(mySurfaceData); } //================================================================================================= @@ -1525,7 +1674,7 @@ gp_Cone GeomAdaptor_Surface::Cone() const { if (mySurfaceType != GeomAbs_Cone) throw Standard_NoSuchObject("GeomAdaptor_Surface::Cone"); - return occ::down_cast(mySurface)->Cone(); + return std::get(mySurfaceData); } //================================================================================================= @@ -1534,7 +1683,7 @@ gp_Sphere GeomAdaptor_Surface::Sphere() const { if (mySurfaceType != GeomAbs_Sphere) throw Standard_NoSuchObject("GeomAdaptor_Surface::Sphere"); - return occ::down_cast(mySurface)->Sphere(); + return std::get(mySurfaceData); } //================================================================================================= @@ -1543,7 +1692,7 @@ gp_Torus GeomAdaptor_Surface::Torus() const { if (mySurfaceType != GeomAbs_Torus) throw Standard_NoSuchObject("GeomAdaptor_Surface::Torus"); - return occ::down_cast(mySurface)->Torus(); + return std::get(mySurfaceData); } //================================================================================================= diff --git a/src/ModelingData/TKG3d/GeomAdaptor/GeomAdaptor_Surface.hxx b/src/ModelingData/TKG3d/GeomAdaptor/GeomAdaptor_Surface.hxx index 487a218bd0..cd4d5c4af6 100644 --- a/src/ModelingData/TKG3d/GeomAdaptor/GeomAdaptor_Surface.hxx +++ b/src/ModelingData/TKG3d/GeomAdaptor/GeomAdaptor_Surface.hxx @@ -23,7 +23,12 @@ #include #include #include +#include +#include #include +#include +#include +#include #include #include #include @@ -84,8 +89,17 @@ public: }; //! Variant type for surface-specific evaluation data. - using SurfaceDataVariant = std:: - variant; + using SurfaceDataVariant = std::variant; public: GeomAdaptor_Surface()