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