0024002: Overall code and build procedure refactoring -- automatic
[occt.git] / src / BiTgte / BiTgte_CurveOnVertex.cxx
1 // Created on: 1997-03-21
2 // Created by: Bruno DUMORTIER
3 // Copyright (c) 1997-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 <Adaptor3d_HCurve.hxx>
19 #include <BiTgte_CurveOnVertex.hxx>
20 #include <BiTgte_HCurveOnVertex.hxx>
21 #include <BRep_Tool.hxx>
22 #include <Geom_BezierCurve.hxx>
23 #include <Geom_BSplineCurve.hxx>
24 #include <gp_Circ.hxx>
25 #include <gp_Elips.hxx>
26 #include <gp_Hypr.hxx>
27 #include <gp_Lin.hxx>
28 #include <gp_Parab.hxx>
29 #include <gp_Pnt.hxx>
30 #include <gp_Vec.hxx>
31 #include <Standard_DomainError.hxx>
32 #include <Standard_NoSuchObject.hxx>
33 #include <Standard_NotImplemented.hxx>
34 #include <Standard_OutOfRange.hxx>
35 #include <TopoDS_Edge.hxx>
36 #include <TopoDS_Vertex.hxx>
37
38 //=======================================================================
39 //function : BiTgte_CurveOnVertex
40 //purpose  : 
41 //======================================================================
42 BiTgte_CurveOnVertex::BiTgte_CurveOnVertex()
43 : myFirst(0.0), myLast(0.0)
44 {
45 }
46
47
48 //=======================================================================
49 //function : BiTgte_CurveOnVertex
50 //purpose  : 
51 //=======================================================================
52
53 BiTgte_CurveOnVertex::BiTgte_CurveOnVertex(const TopoDS_Edge&   theEonF,
54                                            const TopoDS_Vertex& theVertex)
55 : myFirst(0.0), myLast(0.0)
56 {
57   Init(theEonF, theVertex);
58 }
59
60
61 //=======================================================================
62 //function : Init
63 //purpose  : 
64 //=======================================================================
65
66 void BiTgte_CurveOnVertex::Init(const TopoDS_Edge&   EonF,
67                                 const TopoDS_Vertex& V)
68 {
69   BRep_Tool::Range(EonF,myFirst,myLast);
70   myPnt = BRep_Tool::Pnt(V);
71 }
72
73
74 //=======================================================================
75 //function : FirstParameter
76 //purpose  : 
77 //=======================================================================
78
79 Standard_Real BiTgte_CurveOnVertex::FirstParameter() const
80 {
81   return myFirst;
82 }
83
84
85 //=======================================================================
86 //function : LastParameter
87 //purpose  : 
88 //=======================================================================
89
90 Standard_Real BiTgte_CurveOnVertex::LastParameter() const
91 {
92   return myLast;
93 }
94
95
96 //=======================================================================
97 //function : 
98 //purpose  : 
99 //=======================================================================
100
101 GeomAbs_Shape BiTgte_CurveOnVertex::Continuity() const
102 {
103   Standard_NotImplemented::Raise("BiTgte_CurveOnVertex");
104   return GeomAbs_C0;
105 }
106
107
108 //=======================================================================
109 //function : 
110 //purpose  : 
111 //=======================================================================
112
113 Standard_Integer BiTgte_CurveOnVertex::NbIntervals(const GeomAbs_Shape) const
114 {
115   Standard_NotImplemented::Raise("BiTgte_CurveOnVertex");
116   return 0;
117 }
118
119
120 //=======================================================================
121 //function : 
122 //purpose  : 
123 //=======================================================================
124
125 void BiTgte_CurveOnVertex::Intervals(TColStd_Array1OfReal&,
126                                      const GeomAbs_Shape) const
127 {
128   Standard_NotImplemented::Raise("BiTgte_CurveOnVertex");
129 }
130
131
132 //=======================================================================
133 //function : 
134 //purpose  : 
135 //=======================================================================
136
137 Handle(Adaptor3d_HCurve) BiTgte_CurveOnVertex::Trim(const Standard_Real,
138                                                     const Standard_Real,
139                                                     const Standard_Real) 
140 const
141 {
142   Standard_NotImplemented::Raise("BiTgte_CurveOnVertex");
143   Handle(BiTgte_HCurveOnVertex) HC;
144   return HC;
145 }
146
147
148 //=======================================================================
149 //function : 
150 //purpose  : 
151 //=======================================================================
152
153 Standard_Boolean BiTgte_CurveOnVertex::IsClosed() const
154 {
155   Standard_NotImplemented::Raise("BiTgte_CurveOnVertex");
156   return Standard_False;
157 }
158
159
160 //=======================================================================
161 //function : 
162 //purpose  : 
163 //=======================================================================
164
165 Standard_Boolean BiTgte_CurveOnVertex::IsPeriodic() const
166 {
167   Standard_NotImplemented::Raise("BiTgte_CurveOnVertex");
168   return Standard_False;
169 }
170
171
172 //=======================================================================
173 //function : 
174 //purpose  : 
175 //=======================================================================
176
177 Standard_Real BiTgte_CurveOnVertex::Period() const
178 {
179   Standard_NotImplemented::Raise("BiTgte_CurveOnVertex");
180   return 0.;
181 }
182
183
184 //=======================================================================
185 //function : 
186 //purpose  : 
187 //=======================================================================
188
189 gp_Pnt BiTgte_CurveOnVertex::Value(const Standard_Real) const
190 {
191   return myPnt;
192 }
193
194
195 //=======================================================================
196 //function : 
197 //purpose  : 
198 //=======================================================================
199
200 void BiTgte_CurveOnVertex::D0(const Standard_Real /*U*/,gp_Pnt& P) const
201 {
202   P = myPnt;
203 }
204
205
206 //=======================================================================
207 //function : 
208 //purpose  : 
209 //=======================================================================
210
211 void BiTgte_CurveOnVertex::D1(const Standard_Real ,gp_Pnt& ,gp_Vec&) const
212 {
213   Standard_NotImplemented::Raise("BiTgte_CurveOnVertex");
214 }
215
216
217 //=======================================================================
218 //function : 
219 //purpose  : 
220 //=======================================================================
221
222 void BiTgte_CurveOnVertex::D2(const Standard_Real,gp_Pnt&,
223                               gp_Vec& ,gp_Vec& ) const
224 {
225   Standard_NotImplemented::Raise("BiTgte_CurveOnVertex");
226 }
227
228
229 //=======================================================================
230 //function : 
231 //purpose  : 
232 //=======================================================================
233
234 void BiTgte_CurveOnVertex::D3(const Standard_Real,
235                               gp_Pnt& ,
236                               gp_Vec& ,
237                               gp_Vec& ,
238                               gp_Vec& ) const
239 {
240   Standard_NotImplemented::Raise("BiTgte_CurveOnVertex");
241 }
242
243
244 //=======================================================================
245 //function : 
246 //purpose  : 
247 //=======================================================================
248
249 gp_Vec BiTgte_CurveOnVertex::DN(const Standard_Real,
250                                 const Standard_Integer) const
251 {
252   Standard_NotImplemented::Raise("BiTgte_CurveOnVertex");
253   return gp_Vec();
254 }
255
256
257 //=======================================================================
258 //function : 
259 //purpose  : 
260 //=======================================================================
261
262 Standard_Real BiTgte_CurveOnVertex::Resolution(const Standard_Real) const
263 {
264   Standard_NotImplemented::Raise("BiTgte_CurveOnVertex");
265   return 0.;
266 }
267
268
269 //=======================================================================
270 //function : 
271 //purpose  : 
272 //=======================================================================
273
274 GeomAbs_CurveType BiTgte_CurveOnVertex::GetType() const
275 {
276   return GeomAbs_OtherCurve;
277 }
278
279
280 //=======================================================================
281 //function : 
282 //purpose  : 
283 //=======================================================================
284
285 gp_Lin BiTgte_CurveOnVertex::Line() const
286 {
287   Standard_NotImplemented::Raise("BiTgte_CurveOnVertex");
288   return gp_Lin();
289 }
290
291
292 //=======================================================================
293 //function : 
294 //purpose  : 
295 //=======================================================================
296
297 gp_Circ BiTgte_CurveOnVertex::Circle() const
298 {
299   Standard_NoSuchObject::Raise("BiTgte_CurveOnVertex::Circle");
300   return gp_Circ();
301 }
302
303
304 //=======================================================================
305 //function : 
306 //purpose  : 
307 //=======================================================================
308
309 gp_Elips BiTgte_CurveOnVertex::Ellipse() const
310 {
311   Standard_NotImplemented::Raise("BiTgte_CurveOnVertex");
312   return gp_Elips();
313 }
314
315
316 //=======================================================================
317 //function : 
318 //purpose  : 
319 //=======================================================================
320
321 gp_Hypr BiTgte_CurveOnVertex::Hyperbola() const
322 {
323   Standard_NotImplemented::Raise("BiTgte_CurveOnVertex");
324   return gp_Hypr();
325 }
326
327
328 //=======================================================================
329 //function : 
330 //purpose  : 
331 //=======================================================================
332
333 gp_Parab BiTgte_CurveOnVertex::Parabola() const
334 {
335   Standard_NotImplemented::Raise("BiTgte_CurveOnVertex");
336   return gp_Parab();
337 }
338
339
340 //=======================================================================
341 //function : 
342 //purpose  : 
343 //=======================================================================
344
345 Standard_Integer BiTgte_CurveOnVertex::Degree() const
346 {
347   Standard_NotImplemented::Raise("BiTgte_CurveOnVertex");
348   return 0;
349 }
350
351
352 //=======================================================================
353 //function : 
354 //purpose  : 
355 //=======================================================================
356
357 Standard_Boolean BiTgte_CurveOnVertex::IsRational() const
358 {
359   Standard_NotImplemented::Raise("BiTgte_CurveOnVertex");
360   return Standard_False;
361 }
362
363
364 //=======================================================================
365 //function : 
366 //purpose  : 
367 //=======================================================================
368
369 Standard_Integer BiTgte_CurveOnVertex::NbPoles() const
370 {
371   Standard_NotImplemented::Raise("BiTgte_CurveOnVertex");
372   return 0;
373 }
374
375
376 //=======================================================================
377 //function : 
378 //purpose  : 
379 //=======================================================================
380
381 Standard_Integer BiTgte_CurveOnVertex::NbKnots() const
382 {
383   Standard_NotImplemented::Raise("BiTgte_CurveOnVertex");
384   return 0;
385 }
386
387
388 //=======================================================================
389 //function : 
390 //purpose  : 
391 //=======================================================================
392
393 Handle(Geom_BezierCurve) BiTgte_CurveOnVertex::Bezier() const
394 {
395   Standard_NotImplemented::Raise("BiTgte_CurveOnVertex");
396   Handle(Geom_BezierCurve) B;
397   return B;
398 }
399
400
401 //=======================================================================
402 //function : 
403 //purpose  : 
404 //=======================================================================
405
406 Handle(Geom_BSplineCurve) BiTgte_CurveOnVertex::BSpline() const
407 {
408   Standard_NotImplemented::Raise("BiTgte_CurveOnVertex");
409   Handle(Geom_BSplineCurve) B;
410   return B;
411 }
412
413