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