0024816: Tool for upgrading OCCT and dependent code
[occt.git] / src / Adaptor2d / Adaptor2d_Curve2d.cxx
1 // Created on: 1993-07-01
2 // Created by: Bruno DUMORTIER
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17
18 #include <Adaptor2d_Curve2d.hxx>
19 #include <Adaptor2d_HCurve2d.hxx>
20 #include <Geom2d_BezierCurve.hxx>
21 #include <Geom2d_BSplineCurve.hxx>
22 #include <gp_Circ2d.hxx>
23 #include <gp_Elips2d.hxx>
24 #include <gp_Hypr2d.hxx>
25 #include <gp_Lin2d.hxx>
26 #include <gp_Parab2d.hxx>
27 #include <gp_Pnt2d.hxx>
28 #include <gp_Vec2d.hxx>
29 #include <Standard_DomainError.hxx>
30 #include <Standard_NoSuchObject.hxx>
31 #include <Standard_NotImplemented.hxx>
32 #include <Standard_OutOfRange.hxx>
33
34 //=======================================================================
35 //function : ~Adaptor2d_Curve2d
36 //purpose  : Destructor
37 //=======================================================================
38 Adaptor2d_Curve2d::~Adaptor2d_Curve2d()
39 {
40 }
41
42 //=======================================================================
43 //function : FirstParameter
44 //purpose  : 
45 //=======================================================================
46
47 Standard_Real Adaptor2d_Curve2d::FirstParameter() const 
48 {  
49   Standard_NotImplemented::Raise("Adaptor2d_Curve2d::FirstParameter");
50   return 0.;
51 }
52
53
54 //=======================================================================
55 //function : LastParameter
56 //purpose  : 
57 //=======================================================================
58
59 Standard_Real Adaptor2d_Curve2d::LastParameter() const 
60 {
61   Standard_NotImplemented::Raise("Adaptor2d_Curve2d::LastParameter");
62   return 0.;
63 }
64
65
66 //=======================================================================
67 //function : Continuity
68 //purpose  : 
69 //=======================================================================
70
71 GeomAbs_Shape Adaptor2d_Curve2d::Continuity() const 
72 {
73   Standard_NotImplemented::Raise("Adaptor2d_Curve2d::Continuity");
74   return GeomAbs_C0;
75 }
76
77
78 //=======================================================================
79 //function : NbIntervals
80 //purpose  : 
81 //=======================================================================
82
83 //Standard_Integer Adaptor2d_Curve2d::NbIntervals(const GeomAbs_Shape S) const 
84 Standard_Integer Adaptor2d_Curve2d::NbIntervals(const GeomAbs_Shape ) const 
85 {
86   Standard_NotImplemented::Raise("Adaptor2d_Curve2d::NbIntervals");
87   return 0;
88 }
89
90
91 //=======================================================================
92 //function : Intervals
93 //purpose  : 
94 //=======================================================================
95
96 //void Adaptor2d_Curve2d::Intervals(TColStd_Array1OfReal& T, 
97 //                              const GeomAbs_Shape S) const 
98 void Adaptor2d_Curve2d::Intervals(TColStd_Array1OfReal& , 
99                                 const GeomAbs_Shape ) const 
100 {
101   Standard_NotImplemented::Raise("Adaptor2d_Curve2d::Intervals");
102 }
103
104
105 //=======================================================================
106 //function : Trim
107 //purpose  : 
108 //=======================================================================
109
110 //Handle(Adaptor2d_HCurve2d) Adaptor2d_Curve2d::Trim(const Standard_Real First,
111 //                                             const Standard_Real Last ,
112 //                                             const Standard_Real Tol) const 
113 Handle(Adaptor2d_HCurve2d) Adaptor2d_Curve2d::Trim(const Standard_Real ,
114                                                const Standard_Real ,
115                                                const Standard_Real ) const 
116 {
117   Standard_NotImplemented::Raise("Adaptor2d_Curve2d::Trim");
118   return Handle(Adaptor2d_HCurve2d)();
119 }
120
121 //=======================================================================
122 //function : IsClosed
123 //purpose  : 
124 //=======================================================================
125
126 Standard_Boolean Adaptor2d_Curve2d::IsClosed() const 
127 {
128   Standard_NotImplemented::Raise("Adaptor2d_Curve2d::IsClosed");
129   return 0;
130 }
131
132
133 //=======================================================================
134 //function : IsPeriodic
135 //purpose  : 
136 //=======================================================================
137
138 Standard_Boolean Adaptor2d_Curve2d::IsPeriodic() const 
139 {
140   Standard_NotImplemented::Raise("Adaptor2d_Curve2d::IsPeriodic");
141   return 0;
142 }
143
144
145 //=======================================================================
146 //function : Period
147 //purpose  : 
148 //=======================================================================
149
150 Standard_Real Adaptor2d_Curve2d::Period() const 
151 {
152   Standard_NotImplemented::Raise("Adaptor2d_Curve2d::Period");
153   return 0.;
154 }
155
156
157 //=======================================================================
158 //function : Value
159 //purpose  : 
160 //=======================================================================
161
162 //gp_Pnt2d Adaptor2d_Curve2d::Value(const Standard_Real U) const 
163 gp_Pnt2d Adaptor2d_Curve2d::Value(const Standard_Real ) const 
164 {
165   Standard_NotImplemented::Raise("Adaptor2d_Curve2d::Value");
166   return gp_Pnt2d();
167 }
168
169
170 //=======================================================================
171 //function : D0
172 //purpose  : 
173 //=======================================================================
174
175 //void Adaptor2d_Curve2d::D0(const Standard_Real U, gp_Pnt2d& P) const 
176 void Adaptor2d_Curve2d::D0(const Standard_Real , gp_Pnt2d& ) const 
177 {
178   Standard_NotImplemented::Raise("Adaptor2d_Curve2d::D0");
179 }
180
181
182 //=======================================================================
183 //function : D1
184 //purpose  : 
185 //=======================================================================
186
187 //void Adaptor2d_Curve2d::D1(const Standard_Real U, 
188 //                       gp_Pnt2d& P, gp_Vec2d& V) const 
189 void Adaptor2d_Curve2d::D1(const Standard_Real , 
190                          gp_Pnt2d& , gp_Vec2d& ) const 
191 {
192   Standard_NotImplemented::Raise("Adaptor2d_Curve2d::D1");
193 }
194
195
196 //=======================================================================
197 //function : D2
198 //purpose  : 
199 //=======================================================================
200
201 //void Adaptor2d_Curve2d::D2(const Standard_Real U, 
202 //                       gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const 
203 void Adaptor2d_Curve2d::D2(const Standard_Real , 
204                          gp_Pnt2d& , gp_Vec2d& , gp_Vec2d& ) const 
205 {
206   Standard_NotImplemented::Raise("Adaptor2d_Curve2d::D2");
207 }
208
209
210 //=======================================================================
211 //function : D3
212 //purpose  : 
213 //=======================================================================
214
215 //void Adaptor2d_Curve2d::D3(const Standard_Real U, 
216 //                       gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3)
217 void Adaptor2d_Curve2d::D3(const Standard_Real , 
218                          gp_Pnt2d& , gp_Vec2d& , gp_Vec2d& , gp_Vec2d& ) const 
219 {
220   Standard_NotImplemented::Raise("Adaptor2d_Curve2d::D3");
221 }
222
223
224 //=======================================================================
225 //function : DN
226 //purpose  : 
227 //=======================================================================
228
229 //gp_Vec2d Adaptor2d_Curve2d::DN(const Standard_Real U, 
230 //                           const Standard_Integer N) const 
231 gp_Vec2d Adaptor2d_Curve2d::DN(const Standard_Real , 
232                              const Standard_Integer ) const 
233 {
234   Standard_NotImplemented::Raise("Adaptor2d_Curve2d::DN");
235   return gp_Vec2d();
236 }
237
238
239 //=======================================================================
240 //function : Resolution
241 //purpose  : 
242 //=======================================================================
243
244 //Standard_Real Adaptor2d_Curve2d::Resolution(const Standard_Real R3d) const 
245 Standard_Real Adaptor2d_Curve2d::Resolution(const Standard_Real ) const 
246 {
247   Standard_NotImplemented::Raise("Adaptor2d_Curve2d::Resolution");
248   return 0.;
249 }
250
251
252 //=======================================================================
253 //function : GetType
254 //purpose  : 
255 //=======================================================================
256
257 GeomAbs_CurveType Adaptor2d_Curve2d::GetType() const 
258 {
259   Standard_NotImplemented::Raise("Adaptor2d_Curve2d::GetType");
260   return GeomAbs_OtherCurve;
261 }
262
263
264 //=======================================================================
265 //function : Line
266 //purpose  : 
267 //=======================================================================
268
269 gp_Lin2d Adaptor2d_Curve2d::Line() const 
270 {
271   Standard_NotImplemented::Raise("Adaptor2d_Curve2d::Line");
272   return gp_Lin2d();
273 }
274
275
276 //=======================================================================
277 //function : Circle
278 //purpose  : 
279 //=======================================================================
280
281 gp_Circ2d Adaptor2d_Curve2d::Circle() const 
282 {
283   Standard_NotImplemented::Raise("Adaptor2d_Curve2d::Circle");
284   return gp_Circ2d();
285 }
286
287
288 //=======================================================================
289 //function : Ellipse
290 //purpose  : 
291 //=======================================================================
292
293 gp_Elips2d Adaptor2d_Curve2d::Ellipse() const 
294 {
295   Standard_NotImplemented::Raise("Adaptor2d_Curve2d::Ellipse");
296   return gp_Elips2d();
297 }
298
299
300 //=======================================================================
301 //function : Hyperbola
302 //purpose  : 
303 //=======================================================================
304
305 gp_Hypr2d Adaptor2d_Curve2d::Hyperbola() const 
306 {
307   Standard_NotImplemented::Raise("Adaptor2d_Curve2d::Hyperbola");
308   return gp_Hypr2d();
309 }
310
311
312 //=======================================================================
313 //function : Parabola
314 //purpose  : 
315 //=======================================================================
316
317 gp_Parab2d Adaptor2d_Curve2d::Parabola() const 
318 {
319   Standard_NotImplemented::Raise("Adaptor2d_Curve2d::Parabola");
320   return gp_Parab2d();
321 }
322
323
324 //=======================================================================
325 //function : Degree
326 //purpose  : 
327 //=======================================================================
328
329 Standard_Integer Adaptor2d_Curve2d::Degree() const 
330 {
331   Standard_NotImplemented::Raise("Adaptor2d_Curve2d::Degree");
332   return 0;
333 }
334
335
336 //=======================================================================
337 //function : IsRational
338 //purpose  : 
339 //=======================================================================
340
341 Standard_Boolean Adaptor2d_Curve2d::IsRational() const 
342 {
343   Standard_NotImplemented::Raise("Adaptor2d_Curve2d::IsRational");
344   return 0;
345 }
346
347
348 //=======================================================================
349 //function : NbPoles
350 //purpose  : 
351 //=======================================================================
352
353 Standard_Integer Adaptor2d_Curve2d::NbPoles() const 
354 {
355   Standard_NotImplemented::Raise("Adaptor2d_Curve2d::NbPole");
356   return 0;
357 }
358
359
360 //=======================================================================
361 //function : NbKnots
362 //purpose  : 
363 //=======================================================================
364
365 Standard_Integer Adaptor2d_Curve2d::NbKnots() const 
366 {
367   Standard_NotImplemented::Raise("Adaptor2d_Curve2d::NbKnots");
368   return 0;
369 }
370
371
372 //=======================================================================
373 //function : Bezier
374 //purpose  : 
375 //=======================================================================
376
377 Handle(Geom2d_BezierCurve) Adaptor2d_Curve2d::Bezier() const 
378 {
379   Standard_NotImplemented::Raise("Adaptor2d_Curve2d::Bezier");
380   return Handle(Geom2d_BezierCurve)();
381 }
382
383
384 //=======================================================================
385 //function : BSpline
386 //purpose  : 
387 //=======================================================================
388
389 Handle(Geom2d_BSplineCurve) Adaptor2d_Curve2d::BSpline() const 
390 {
391   Standard_NotImplemented::Raise("Adaptor2d_Curve2d::BSpline");
392   return Handle(Geom2d_BSplineCurve)();
393 }
394
395 //=======================================================================
396 //function : NbSamples
397 //purpose  : 
398 //=======================================================================
399 Standard_Integer Adaptor2d_Curve2d::NbSamples() const
400 {
401   return 20;  
402 }
403