|
17 | 17 | #ifndef _Adaptor3d_Curve_HeaderFile |
18 | 18 | #define _Adaptor3d_Curve_HeaderFile |
19 | 19 |
|
| 20 | +#include <Geom_Curve.hxx> |
20 | 21 | #include <gp_Circ.hxx> |
21 | 22 | #include <gp_Elips.hxx> |
22 | 23 | #include <gp_Hypr.hxx> |
|
28 | 29 | #include <NCollection_Array1.hxx> |
29 | 30 | #include <GeomAbs_CurveType.hxx> |
30 | 31 |
|
31 | | -class gp_Pnt; |
32 | | -class gp_Vec; |
33 | 32 | class Geom_BezierCurve; |
34 | 33 | class Geom_BSplineCurve; |
35 | 34 | class Geom_OffsetCurve; |
@@ -87,39 +86,53 @@ public: |
87 | 86 | Standard_EXPORT virtual double Period() const; |
88 | 87 |
|
89 | 88 | //! Computes the point of parameter U on the curve. |
90 | | - Standard_EXPORT virtual gp_Pnt Value(const double U) const; |
| 89 | + gp_Pnt Value(const double theU) const { return EvalD0(theU); } |
91 | 90 |
|
92 | 91 | //! Computes the point of parameter U on the curve. |
93 | | - Standard_EXPORT virtual void D0(const double U, gp_Pnt& P) const; |
| 92 | + void D0(const double theU, gp_Pnt& theP) const { theP = EvalD0(theU); } |
94 | 93 |
|
95 | 94 | //! Computes the point of parameter U on the curve with its |
96 | 95 | //! first derivative. |
97 | 96 | //! Raised if the continuity of the current interval |
98 | 97 | //! is not C1. |
99 | | - Standard_EXPORT virtual void D1(const double U, gp_Pnt& P, gp_Vec& V) const; |
| 98 | + void D1(const double theU, gp_Pnt& theP, gp_Vec& theV) const |
| 99 | + { |
| 100 | + const Geom_Curve::ResD1 aRes = EvalD1(theU); |
| 101 | + theP = aRes.Point; |
| 102 | + theV = aRes.D1; |
| 103 | + } |
100 | 104 |
|
101 | 105 | //! Returns the point P of parameter U, the first and second |
102 | 106 | //! derivatives V1 and V2. |
103 | 107 | //! Raised if the continuity of the current interval |
104 | 108 | //! is not C2. |
105 | | - Standard_EXPORT virtual void D2(const double U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const; |
| 109 | + void D2(const double theU, gp_Pnt& theP, gp_Vec& theV1, gp_Vec& theV2) const |
| 110 | + { |
| 111 | + const Geom_Curve::ResD2 aRes = EvalD2(theU); |
| 112 | + theP = aRes.Point; |
| 113 | + theV1 = aRes.D1; |
| 114 | + theV2 = aRes.D2; |
| 115 | + } |
106 | 116 |
|
107 | 117 | //! Returns the point P of parameter U, the first, the second |
108 | 118 | //! and the third derivative. |
109 | 119 | //! Raised if the continuity of the current interval |
110 | 120 | //! is not C3. |
111 | | - Standard_EXPORT virtual void D3(const double U, |
112 | | - gp_Pnt& P, |
113 | | - gp_Vec& V1, |
114 | | - gp_Vec& V2, |
115 | | - gp_Vec& V3) const; |
| 121 | + void D3(const double theU, gp_Pnt& theP, gp_Vec& theV1, gp_Vec& theV2, gp_Vec& theV3) const |
| 122 | + { |
| 123 | + const Geom_Curve::ResD3 aRes = EvalD3(theU); |
| 124 | + theP = aRes.Point; |
| 125 | + theV1 = aRes.D1; |
| 126 | + theV2 = aRes.D2; |
| 127 | + theV3 = aRes.D3; |
| 128 | + } |
116 | 129 |
|
117 | 130 | //! The returned vector gives the value of the derivative for the |
118 | 131 | //! order of derivation N. |
119 | 132 | //! Raised if the continuity of the current interval |
120 | 133 | //! is not CN. |
121 | 134 | //! Raised if N < 1. |
122 | | - Standard_EXPORT virtual gp_Vec DN(const double U, const int N) const; |
| 135 | + gp_Vec DN(const double theU, const int theN) const { return EvalDN(theU, theN); } |
123 | 136 |
|
124 | 137 | //! Returns the parametric resolution corresponding |
125 | 138 | //! to the real space resolution <R3d>. |
@@ -154,6 +167,26 @@ public: |
154 | 167 |
|
155 | 168 | Standard_EXPORT virtual occ::handle<Geom_OffsetCurve> OffsetCurve() const; |
156 | 169 |
|
| 170 | + //! Computes the point of parameter U on the curve. |
| 171 | + //! Raises an exception on failure. |
| 172 | + [[nodiscard]] Standard_EXPORT virtual gp_Pnt EvalD0(const double theU) const; |
| 173 | + |
| 174 | + //! Computes the point and first derivative at parameter U. |
| 175 | + //! Raises an exception on failure. |
| 176 | + [[nodiscard]] Standard_EXPORT virtual Geom_Curve::ResD1 EvalD1(const double theU) const; |
| 177 | + |
| 178 | + //! Computes the point and first two derivatives at parameter U. |
| 179 | + //! Raises an exception on failure. |
| 180 | + [[nodiscard]] Standard_EXPORT virtual Geom_Curve::ResD2 EvalD2(const double theU) const; |
| 181 | + |
| 182 | + //! Computes the point and first three derivatives at parameter U. |
| 183 | + //! Raises an exception on failure. |
| 184 | + [[nodiscard]] Standard_EXPORT virtual Geom_Curve::ResD3 EvalD3(const double theU) const; |
| 185 | + |
| 186 | + //! Computes the Nth derivative at parameter U. |
| 187 | + //! Raises an exception on failure. |
| 188 | + [[nodiscard]] Standard_EXPORT virtual gp_Vec EvalDN(const double theU, const int theN) const; |
| 189 | + |
157 | 190 | Standard_EXPORT ~Adaptor3d_Curve() override; |
158 | 191 | }; |
159 | 192 |
|
|
0 commit comments