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_Lin2d.hxx> |
23 | #include <gp_Elips2d.hxx> |
24 | #include <gp_Circ2d.hxx> |
25 | #include <gp_Hypr2d.hxx> |
26 | #include <gp_Parab2d.hxx> |
27 | #include <Geom2d_BezierCurve.hxx> |
28 | #include <Geom2d_BSplineCurve.hxx> |
29 | #include <Adaptor2d_Curve2d.hxx> |
30 | |
31 | //======================================================================= |
32 | //function : FirstParameter |
33 | //purpose : |
34 | //======================================================================= |
35 | |
b311480e |
36 | inline Standard_Real Extrema_Curve2dTool::FirstParameter(const Adaptor2d_Curve2d& C) |
7fd59977 |
37 | { |
38 | return C.FirstParameter(); |
39 | } |
40 | |
41 | //======================================================================= |
42 | //function : LastParameter |
43 | //purpose : |
44 | //======================================================================= |
45 | |
46 | inline Standard_Real Extrema_Curve2dTool::LastParameter(const Adaptor2d_Curve2d& C) |
47 | { |
48 | return C.LastParameter(); |
49 | } |
50 | |
51 | //======================================================================= |
52 | //function : Continuity |
53 | //purpose : |
54 | //======================================================================= |
55 | |
56 | inline GeomAbs_Shape Extrema_Curve2dTool::Continuity(const Adaptor2d_Curve2d& C) |
57 | { |
58 | return C.Continuity(); |
59 | } |
60 | |
61 | //======================================================================= |
62 | //function : NbIntervals |
63 | //purpose : |
64 | //======================================================================= |
65 | |
66 | inline Standard_Integer Extrema_Curve2dTool::NbIntervals(const Adaptor2d_Curve2d& C, |
67 | const GeomAbs_Shape S) |
68 | { |
69 | return C.NbIntervals(S); |
70 | } |
71 | |
72 | //======================================================================= |
73 | //function : Intervals |
74 | //purpose : |
75 | //======================================================================= |
76 | |
77 | inline void Extrema_Curve2dTool::Intervals(const Adaptor2d_Curve2d& C, |
78 | TColStd_Array1OfReal& T, |
79 | const GeomAbs_Shape S) |
80 | { |
81 | C.Intervals(T, S); |
82 | } |
83 | |
84 | //======================================================================= |
85 | //function : IsClosed |
86 | //purpose : |
87 | //======================================================================= |
88 | |
89 | inline Standard_Boolean Extrema_Curve2dTool::IsClosed(const Adaptor2d_Curve2d& C) |
90 | { |
91 | return C.IsClosed(); |
92 | } |
93 | |
94 | //======================================================================= |
95 | //function : IsPeriodic |
96 | //purpose : |
97 | //======================================================================= |
98 | |
99 | inline Standard_Boolean Extrema_Curve2dTool::IsPeriodic(const Adaptor2d_Curve2d& C) |
100 | { |
101 | return C.IsPeriodic(); |
102 | } |
103 | |
104 | //======================================================================= |
105 | //function : Period |
106 | //purpose : |
107 | //======================================================================= |
108 | |
109 | inline Standard_Real Extrema_Curve2dTool::Period(const Adaptor2d_Curve2d& C) |
110 | { |
111 | return C.Period(); |
112 | } |
113 | |
114 | //======================================================================= |
115 | //function : Value |
116 | //purpose : |
117 | //======================================================================= |
118 | |
119 | inline gp_Pnt2d Extrema_Curve2dTool::Value(const Adaptor2d_Curve2d& C, |
120 | const Standard_Real U) |
121 | { |
122 | return C.Value(U); |
123 | } |
124 | |
125 | //======================================================================= |
126 | //function : D0 |
127 | //purpose : |
128 | //======================================================================= |
129 | |
130 | inline void Extrema_Curve2dTool::D0(const Adaptor2d_Curve2d& C, |
131 | const Standard_Real U, |
132 | gp_Pnt2d& P) |
133 | { |
134 | C.D0(U, P); |
135 | } |
136 | |
137 | //======================================================================= |
138 | //function : D1 |
139 | //purpose : |
140 | //======================================================================= |
141 | |
142 | inline void Extrema_Curve2dTool::D1(const Adaptor2d_Curve2d& C, |
143 | const Standard_Real U, |
144 | gp_Pnt2d& P, |
145 | gp_Vec2d& V) |
146 | { |
147 | C.D1(U, P, V); |
148 | } |
149 | |
150 | //======================================================================= |
151 | //function : D2 |
152 | //purpose : |
153 | //======================================================================= |
154 | |
155 | inline void Extrema_Curve2dTool::D2(const Adaptor2d_Curve2d& C, |
156 | const Standard_Real U, |
157 | gp_Pnt2d& P, |
158 | gp_Vec2d& V1, |
159 | gp_Vec2d& V2) |
160 | { |
161 | C.D2(U, P, V1, V2); |
162 | } |
163 | |
164 | //======================================================================= |
165 | //function : D3 |
166 | //purpose : |
167 | //======================================================================= |
168 | |
169 | inline void Extrema_Curve2dTool::D3(const Adaptor2d_Curve2d& C, |
170 | const Standard_Real U, |
171 | gp_Pnt2d& P, |
172 | gp_Vec2d& V1, |
173 | gp_Vec2d& V2, |
174 | gp_Vec2d& V3) |
175 | { |
176 | C.D3(U, P, V1, V2, V3); |
177 | } |
178 | |
179 | //======================================================================= |
180 | //function : DN |
181 | //purpose : |
182 | //======================================================================= |
183 | |
184 | inline gp_Vec2d Extrema_Curve2dTool::DN(const Adaptor2d_Curve2d& C, |
185 | const Standard_Real U, |
186 | const Standard_Integer N) |
187 | { |
188 | return C.DN(U, N); |
189 | } |
190 | |
191 | //======================================================================= |
192 | //function : Resolution |
193 | //purpose : |
194 | //======================================================================= |
195 | |
196 | inline Standard_Real Extrema_Curve2dTool::Resolution(const Adaptor2d_Curve2d& C, |
197 | const Standard_Real R3d) |
198 | { |
199 | return C.Resolution(R3d); |
200 | } |
201 | |
202 | //======================================================================= |
203 | //function : GetType |
204 | //purpose : |
205 | //======================================================================= |
206 | |
207 | inline GeomAbs_CurveType Extrema_Curve2dTool::GetType(const Adaptor2d_Curve2d& C) |
208 | { |
209 | return C.GetType(); |
210 | } |
211 | |
212 | //======================================================================= |
213 | //function : Line |
214 | //purpose : |
215 | //======================================================================= |
216 | |
217 | inline gp_Lin2d Extrema_Curve2dTool::Line(const Adaptor2d_Curve2d& C) |
218 | { |
219 | return C.Line(); |
220 | } |
221 | |
222 | //======================================================================= |
223 | //function : Circle |
224 | //purpose : |
225 | //======================================================================= |
226 | |
227 | inline gp_Circ2d Extrema_Curve2dTool::Circle(const Adaptor2d_Curve2d& C) |
228 | { |
229 | return C.Circle(); |
230 | } |
231 | |
232 | //======================================================================= |
233 | //function : Ellipse |
234 | //purpose : |
235 | //======================================================================= |
236 | |
237 | inline gp_Elips2d Extrema_Curve2dTool::Ellipse(const Adaptor2d_Curve2d& C) |
238 | { |
239 | return C.Ellipse(); |
240 | } |
241 | |
242 | //======================================================================= |
243 | //function : Hyperbola |
244 | //purpose : |
245 | //======================================================================= |
246 | |
247 | inline gp_Hypr2d Extrema_Curve2dTool::Hyperbola(const Adaptor2d_Curve2d& C) |
248 | { |
249 | return C.Hyperbola(); |
250 | } |
251 | |
252 | //======================================================================= |
253 | //function : Parabola |
254 | //purpose : |
255 | //======================================================================= |
256 | |
257 | inline gp_Parab2d Extrema_Curve2dTool::Parabola(const Adaptor2d_Curve2d& C) |
258 | { |
259 | return C.Parabola(); |
260 | } |
261 | |
262 | //======================================================================= |
263 | //function : NbPoles |
264 | //purpose : |
265 | //======================================================================= |
266 | |
267 | inline Standard_Integer Extrema_Curve2dTool::NbPoles(const Adaptor2d_Curve2d& C) |
268 | { |
269 | return C.NbPoles(); |
270 | } |
271 | |
272 | //======================================================================= |
273 | //function : Degree |
274 | //purpose : |
275 | //======================================================================= |
276 | |
277 | inline Standard_Integer Extrema_Curve2dTool::Degree(const Adaptor2d_Curve2d& C) |
278 | { |
279 | return C.Degree(); |
280 | } |
281 | |
282 | //======================================================================= |
283 | //function : IsRational |
284 | //purpose : |
285 | //======================================================================= |
286 | |
287 | inline Standard_Boolean Extrema_Curve2dTool::IsRational(const Adaptor2d_Curve2d& C) |
288 | { |
289 | return C.Degree(); |
290 | } |
291 | |
292 | |
293 | //======================================================================= |
294 | //function : NbKnots |
295 | //purpose : |
296 | //======================================================================= |
297 | |
298 | inline Standard_Integer Extrema_Curve2dTool::NbKnots(const Adaptor2d_Curve2d& C) |
299 | { |
300 | return C.NbKnots(); |
301 | } |
302 | |
303 | //======================================================================= |
304 | //function : Bezier |
305 | //purpose : |
306 | //======================================================================= |
307 | |
308 | inline Handle(Geom2d_BezierCurve) Extrema_Curve2dTool::Bezier(const Adaptor2d_Curve2d& C) |
309 | { |
310 | return C.Bezier(); |
311 | } |
312 | |
313 | //======================================================================= |
314 | //function : BSpline |
315 | //purpose : |
316 | //======================================================================= |
317 | |
318 | inline Handle(Geom2d_BSplineCurve) Extrema_Curve2dTool::BSpline(const Adaptor2d_Curve2d& C) |
319 | { |
320 | return C.BSpline(); |
321 | } |
322 | |