b311480e |
1 | // Created on: 1995-07-18 |
2 | // Created by: Modelistation |
3 | // Copyright (c) 1995-1999 Matra Datavision |
4 | // Copyright (c) 1999-2012 OPEN CASCADE SAS |
5 | // |
6 | // The content of this file is subject to the Open CASCADE Technology Public |
7 | // License Version 6.5 (the "License"). You may not use the content of this file |
8 | // except in compliance with the License. Please obtain a copy of the License |
9 | // at http://www.opencascade.org and read it completely before using this file. |
10 | // |
11 | // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
12 | // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
13 | // |
14 | // The Original Code and all software distributed under the License is |
15 | // distributed on an "AS IS" basis, without warranty of any kind, and the |
16 | // Initial Developer hereby disclaims all such warranties, including without |
17 | // limitation, any warranties of merchantability, fitness for a particular |
18 | // purpose or non-infringement. Please see the License for the specific terms |
19 | // and conditions governing the rights and limitations under the License. |
20 | |
7fd59977 |
21 | |
22 | #include <gp_Vec.hxx> |
23 | #include <gp_Pnt.hxx> |
24 | #include <gp_Parab.hxx> |
25 | #include <gp_Lin.hxx> |
26 | #include <gp_Elips.hxx> |
27 | #include <gp_Hypr.hxx> |
28 | #include <gp_Circ.hxx> |
29 | #include <Geom_BezierCurve.hxx> |
30 | #include <Geom_BSplineCurve.hxx> |
31 | #include <Adaptor3d_Curve.hxx> |
32 | |
33 | |
34 | //======================================================================= |
35 | //function : FirstParameter |
36 | //purpose : |
37 | //======================================================================= |
38 | |
39 | inline Standard_Real Extrema_CurveTool::FirstParameter(const Adaptor3d_Curve& C) |
40 | { |
41 | return C.FirstParameter(); |
42 | } |
43 | |
44 | //======================================================================= |
45 | //function : LastParameter |
46 | //purpose : |
47 | //======================================================================= |
48 | |
49 | inline Standard_Real Extrema_CurveTool::LastParameter(const Adaptor3d_Curve& C) |
50 | { |
51 | return C.LastParameter(); |
52 | } |
53 | |
54 | //======================================================================= |
55 | //function : Value |
56 | //purpose : |
57 | //======================================================================= |
58 | |
59 | inline gp_Pnt Extrema_CurveTool::Value(const Adaptor3d_Curve& C, |
60 | const Standard_Real U) |
61 | { |
62 | return C.Value(U); |
63 | } |
64 | |
32ca7a51 |
65 | //======================================================================= |
66 | //function : D0 |
67 | //purpose : |
68 | //======================================================================= |
69 | |
70 | inline void Extrema_CurveTool::D0(const Adaptor3d_Curve& C, |
71 | const Standard_Real U, |
72 | gp_Pnt& P) |
73 | { |
74 | C.D0(U, P); |
75 | } |
7fd59977 |
76 | |
77 | //======================================================================= |
78 | //function : D1 |
79 | //purpose : |
80 | //======================================================================= |
81 | |
82 | inline void Extrema_CurveTool::D1(const Adaptor3d_Curve& C, |
83 | const Standard_Real U, |
84 | gp_Pnt& P, |
85 | gp_Vec& V) |
86 | { |
87 | C.D1(U, P, V); |
88 | } |
89 | |
90 | //======================================================================= |
91 | //function : D2 |
92 | //purpose : |
93 | //======================================================================= |
94 | |
95 | inline void Extrema_CurveTool::D2(const Adaptor3d_Curve& C, |
96 | const Standard_Real U, |
97 | gp_Pnt& P, |
98 | gp_Vec& V1, |
99 | gp_Vec& V2) |
100 | { |
101 | C.D2(U, P, V1, V2); |
102 | } |
103 | |
32ca7a51 |
104 | //======================================================================= |
105 | //function : D3 |
106 | //purpose : |
107 | //======================================================================= |
108 | |
109 | inline void Extrema_CurveTool::D3(const Adaptor3d_Curve& C, |
110 | const Standard_Real U, |
111 | gp_Pnt& P, |
112 | gp_Vec& V1, |
113 | gp_Vec& V2, |
114 | gp_Vec& V3) |
115 | { |
116 | C.D3(U, P, V1, V2, V3); |
117 | } |
118 | |
119 | //======================================================================= |
120 | //function : DN |
121 | //purpose : |
122 | //======================================================================= |
123 | inline gp_Vec Extrema_CurveTool::DN(const Adaptor3d_Curve& C, |
124 | const Standard_Real U, |
125 | const Standard_Integer N) |
126 | { |
127 | return C.DN(U, N); |
128 | } |
7fd59977 |
129 | |
130 | |
131 | //======================================================================= |
132 | //function : Continuity |
133 | //purpose : |
134 | //======================================================================= |
135 | |
136 | inline GeomAbs_Shape Extrema_CurveTool::Continuity(const Adaptor3d_Curve& C) |
137 | { |
138 | return C.Continuity(); |
139 | } |
140 | |
141 | //======================================================================= |
142 | //function : NbIntervals |
143 | //purpose : |
144 | //======================================================================= |
145 | |
146 | inline Standard_Integer Extrema_CurveTool::NbIntervals(Adaptor3d_Curve& C, |
147 | const GeomAbs_Shape S) |
148 | { |
149 | return C.NbIntervals(S); |
150 | } |
151 | |
152 | |
153 | //======================================================================= |
154 | //function : Intervals |
155 | //purpose : |
156 | //======================================================================= |
157 | |
158 | inline void Extrema_CurveTool::Intervals(Adaptor3d_Curve& C, |
159 | TColStd_Array1OfReal& T, |
160 | const GeomAbs_Shape S) |
161 | { |
162 | C.Intervals(T, S); |
163 | } |
164 | |
165 | //======================================================================= |
166 | //function : Period |
167 | //purpose : |
168 | //======================================================================= |
169 | |
170 | inline Standard_Real Extrema_CurveTool::Period(const Adaptor3d_Curve& C) |
171 | { |
172 | return C.Period(); |
173 | } |
174 | |
175 | |
176 | //======================================================================= |
177 | //function : GetType |
178 | //purpose : |
179 | //======================================================================= |
180 | |
181 | inline GeomAbs_CurveType Extrema_CurveTool::GetType(const Adaptor3d_Curve& C) |
182 | { |
183 | return C.GetType(); |
184 | } |
185 | |
186 | //======================================================================= |
187 | //function : Line |
188 | //purpose : |
189 | //======================================================================= |
190 | |
191 | inline gp_Lin Extrema_CurveTool::Line(const Adaptor3d_Curve& C) |
192 | { |
193 | return C.Line(); |
194 | } |
195 | |
196 | //======================================================================= |
197 | //function : Circle |
198 | //purpose : |
199 | //======================================================================= |
200 | |
201 | inline gp_Circ Extrema_CurveTool::Circle(const Adaptor3d_Curve& C) |
202 | { |
203 | return C.Circle(); |
204 | } |
205 | |
206 | //======================================================================= |
207 | //function : Ellipse |
208 | //purpose : |
209 | //======================================================================= |
210 | |
211 | inline gp_Elips Extrema_CurveTool::Ellipse(const Adaptor3d_Curve& C) |
212 | { |
213 | return C.Ellipse(); |
214 | } |
215 | |
216 | //======================================================================= |
217 | //function : Hyperbola |
218 | //purpose : |
219 | //======================================================================= |
220 | |
221 | inline gp_Hypr Extrema_CurveTool::Hyperbola(const Adaptor3d_Curve& C) |
222 | { |
223 | return C.Hyperbola(); |
224 | } |
225 | |
226 | //======================================================================= |
227 | //function : Parabola |
228 | //purpose : |
229 | //======================================================================= |
230 | |
231 | inline gp_Parab Extrema_CurveTool::Parabola(const Adaptor3d_Curve& C) |
232 | { |
233 | return C.Parabola(); |
234 | } |
235 | //======================================================================= |
236 | //function : NbPoles |
237 | //purpose : |
238 | //======================================================================= |
239 | |
240 | inline Standard_Integer Extrema_CurveTool::NbPoles(const Adaptor3d_Curve& C) |
241 | { |
242 | return C.NbPoles(); |
243 | } |
244 | |
245 | //======================================================================= |
246 | //function : Degree |
247 | //purpose : |
248 | //======================================================================= |
249 | |
250 | inline Standard_Integer Extrema_CurveTool::Degree(const Adaptor3d_Curve& C) |
251 | { |
252 | return C.Degree(); |
253 | } |
254 | |
255 | //======================================================================= |
256 | //function : IsRational |
257 | //purpose : |
258 | //======================================================================= |
259 | |
260 | inline Standard_Boolean Extrema_CurveTool::IsRational(const Adaptor3d_Curve& C) |
261 | { |
a569e8a0 |
262 | return C.IsRational(); |
7fd59977 |
263 | } |
264 | |
265 | //======================================================================= |
266 | //function : NbKnots |
267 | //purpose : |
268 | //======================================================================= |
269 | |
270 | inline Standard_Integer Extrema_CurveTool::NbKnots(const Adaptor3d_Curve& C) |
271 | { |
272 | return C.NbKnots(); |
273 | } |
274 | |
275 | |
276 | //======================================================================= |
277 | //function : Bezier |
278 | //purpose : |
279 | //======================================================================= |
280 | |
281 | inline Handle(Geom_BezierCurve) Extrema_CurveTool::Bezier(const Adaptor3d_Curve& C) |
282 | { |
283 | return C.Bezier(); |
284 | } |
285 | |
286 | //======================================================================= |
287 | //function : BSpline |
288 | //purpose : |
289 | //======================================================================= |
290 | |
291 | inline Handle(Geom_BSplineCurve) Extrema_CurveTool::BSpline(const Adaptor3d_Curve& C) |
292 | { |
293 | return C.BSpline(); |
294 | } |
295 | |
296 | //======================================================================= |
297 | //function : Resolution |
298 | //purpose : |
299 | //======================================================================= |
300 | |
301 | inline Standard_Real Extrema_CurveTool::Resolution(const Adaptor3d_Curve& C, |
302 | const Standard_Real R3d) |
303 | { |
304 | return C.Resolution(R3d); |
305 | } |