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 | |
7fd59977 |
17 | |
42cf5bc1 |
18 | #include <Adaptor3d_HCurve.hxx> |
19 | #include <BiTgte_CurveOnVertex.hxx> |
7fd59977 |
20 | #include <BiTgte_HCurveOnVertex.hxx> |
21 | #include <BRep_Tool.hxx> |
42cf5bc1 |
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> |
7fd59977 |
33 | #include <Standard_NotImplemented.hxx> |
42cf5bc1 |
34 | #include <Standard_OutOfRange.hxx> |
35 | #include <TopoDS_Edge.hxx> |
36 | #include <TopoDS_Vertex.hxx> |
7fd59977 |
37 | |
38 | //======================================================================= |
39 | //function : BiTgte_CurveOnVertex |
40 | //purpose : |
41 | //====================================================================== |
7fd59977 |
42 | BiTgte_CurveOnVertex::BiTgte_CurveOnVertex() |
cbff1e55 |
43 | : myFirst(0.0), myLast(0.0) |
7fd59977 |
44 | { |
45 | } |
46 | |
47 | |
48 | //======================================================================= |
49 | //function : BiTgte_CurveOnVertex |
50 | //purpose : |
51 | //======================================================================= |
52 | |
cbff1e55 |
53 | BiTgte_CurveOnVertex::BiTgte_CurveOnVertex(const TopoDS_Edge& theEonF, |
54 | const TopoDS_Vertex& theVertex) |
55 | : myFirst(0.0), myLast(0.0) |
7fd59977 |
56 | { |
cbff1e55 |
57 | Init(theEonF, theVertex); |
7fd59977 |
58 | } |
59 | |
60 | |
61 | //======================================================================= |
62 | //function : Init |
63 | //purpose : |
64 | //======================================================================= |
65 | |
66 | void BiTgte_CurveOnVertex::Init(const TopoDS_Edge& EonF, |
cbff1e55 |
67 | const TopoDS_Vertex& V) |
7fd59977 |
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 | { |
9775fa61 |
103 | throw Standard_NotImplemented("BiTgte_CurveOnVertex"); |
7fd59977 |
104 | } |
105 | |
106 | |
107 | //======================================================================= |
108 | //function : |
109 | //purpose : |
110 | //======================================================================= |
111 | |
35e08fe8 |
112 | Standard_Integer BiTgte_CurveOnVertex::NbIntervals(const GeomAbs_Shape) const |
7fd59977 |
113 | { |
9775fa61 |
114 | throw Standard_NotImplemented("BiTgte_CurveOnVertex"); |
7fd59977 |
115 | } |
116 | |
117 | |
118 | //======================================================================= |
119 | //function : |
120 | //purpose : |
121 | //======================================================================= |
122 | |
35e08fe8 |
123 | void BiTgte_CurveOnVertex::Intervals(TColStd_Array1OfReal&, |
124 | const GeomAbs_Shape) const |
7fd59977 |
125 | { |
9775fa61 |
126 | throw Standard_NotImplemented("BiTgte_CurveOnVertex"); |
7fd59977 |
127 | } |
128 | |
129 | |
130 | //======================================================================= |
131 | //function : |
132 | //purpose : |
133 | //======================================================================= |
134 | |
35e08fe8 |
135 | Handle(Adaptor3d_HCurve) BiTgte_CurveOnVertex::Trim(const Standard_Real, |
136 | const Standard_Real, |
137 | const Standard_Real) |
7fd59977 |
138 | const |
139 | { |
9775fa61 |
140 | throw Standard_NotImplemented("BiTgte_CurveOnVertex"); |
7fd59977 |
141 | } |
142 | |
143 | |
144 | //======================================================================= |
145 | //function : |
146 | //purpose : |
147 | //======================================================================= |
148 | |
149 | Standard_Boolean BiTgte_CurveOnVertex::IsClosed() const |
150 | { |
9775fa61 |
151 | throw Standard_NotImplemented("BiTgte_CurveOnVertex"); |
7fd59977 |
152 | } |
153 | |
154 | |
155 | //======================================================================= |
156 | //function : |
157 | //purpose : |
158 | //======================================================================= |
159 | |
160 | Standard_Boolean BiTgte_CurveOnVertex::IsPeriodic() const |
161 | { |
9775fa61 |
162 | throw Standard_NotImplemented("BiTgte_CurveOnVertex"); |
7fd59977 |
163 | } |
164 | |
165 | |
166 | //======================================================================= |
167 | //function : |
168 | //purpose : |
169 | //======================================================================= |
170 | |
171 | Standard_Real BiTgte_CurveOnVertex::Period() const |
172 | { |
9775fa61 |
173 | throw Standard_NotImplemented("BiTgte_CurveOnVertex"); |
7fd59977 |
174 | } |
175 | |
176 | |
177 | //======================================================================= |
178 | //function : |
179 | //purpose : |
180 | //======================================================================= |
181 | |
35e08fe8 |
182 | gp_Pnt BiTgte_CurveOnVertex::Value(const Standard_Real) const |
7fd59977 |
183 | { |
184 | return myPnt; |
185 | } |
186 | |
187 | |
188 | //======================================================================= |
189 | //function : |
190 | //purpose : |
191 | //======================================================================= |
192 | |
35e08fe8 |
193 | void BiTgte_CurveOnVertex::D0(const Standard_Real /*U*/,gp_Pnt& P) const |
7fd59977 |
194 | { |
195 | P = myPnt; |
196 | } |
197 | |
198 | |
199 | //======================================================================= |
200 | //function : |
201 | //purpose : |
202 | //======================================================================= |
203 | |
35e08fe8 |
204 | void BiTgte_CurveOnVertex::D1(const Standard_Real ,gp_Pnt& ,gp_Vec&) const |
7fd59977 |
205 | { |
9775fa61 |
206 | throw Standard_NotImplemented("BiTgte_CurveOnVertex"); |
7fd59977 |
207 | } |
208 | |
209 | |
210 | //======================================================================= |
211 | //function : |
212 | //purpose : |
213 | //======================================================================= |
214 | |
35e08fe8 |
215 | void BiTgte_CurveOnVertex::D2(const Standard_Real,gp_Pnt&, |
216 | gp_Vec& ,gp_Vec& ) const |
7fd59977 |
217 | { |
9775fa61 |
218 | throw Standard_NotImplemented("BiTgte_CurveOnVertex"); |
7fd59977 |
219 | } |
220 | |
221 | |
222 | //======================================================================= |
223 | //function : |
224 | //purpose : |
225 | //======================================================================= |
226 | |
35e08fe8 |
227 | void BiTgte_CurveOnVertex::D3(const Standard_Real, |
228 | gp_Pnt& , |
229 | gp_Vec& , |
230 | gp_Vec& , |
231 | gp_Vec& ) const |
7fd59977 |
232 | { |
9775fa61 |
233 | throw Standard_NotImplemented("BiTgte_CurveOnVertex"); |
7fd59977 |
234 | } |
235 | |
236 | |
237 | //======================================================================= |
238 | //function : |
239 | //purpose : |
240 | //======================================================================= |
241 | |
35e08fe8 |
242 | gp_Vec BiTgte_CurveOnVertex::DN(const Standard_Real, |
243 | const Standard_Integer) const |
7fd59977 |
244 | { |
9775fa61 |
245 | throw Standard_NotImplemented("BiTgte_CurveOnVertex"); |
7fd59977 |
246 | } |
247 | |
248 | |
249 | //======================================================================= |
250 | //function : |
251 | //purpose : |
252 | //======================================================================= |
253 | |
35e08fe8 |
254 | Standard_Real BiTgte_CurveOnVertex::Resolution(const Standard_Real) const |
7fd59977 |
255 | { |
9775fa61 |
256 | throw Standard_NotImplemented("BiTgte_CurveOnVertex"); |
7fd59977 |
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 | { |
9775fa61 |
278 | throw Standard_NotImplemented("BiTgte_CurveOnVertex"); |
7fd59977 |
279 | } |
280 | |
281 | |
282 | //======================================================================= |
283 | //function : |
284 | //purpose : |
285 | //======================================================================= |
286 | |
287 | gp_Circ BiTgte_CurveOnVertex::Circle() const |
288 | { |
9775fa61 |
289 | throw Standard_NoSuchObject("BiTgte_CurveOnVertex::Circle"); |
7fd59977 |
290 | } |
291 | |
292 | |
293 | //======================================================================= |
294 | //function : |
295 | //purpose : |
296 | //======================================================================= |
297 | |
298 | gp_Elips BiTgte_CurveOnVertex::Ellipse() const |
299 | { |
9775fa61 |
300 | throw Standard_NotImplemented("BiTgte_CurveOnVertex"); |
7fd59977 |
301 | } |
302 | |
303 | |
304 | //======================================================================= |
305 | //function : |
306 | //purpose : |
307 | //======================================================================= |
308 | |
309 | gp_Hypr BiTgte_CurveOnVertex::Hyperbola() const |
310 | { |
9775fa61 |
311 | throw Standard_NotImplemented("BiTgte_CurveOnVertex"); |
7fd59977 |
312 | } |
313 | |
314 | |
315 | //======================================================================= |
316 | //function : |
317 | //purpose : |
318 | //======================================================================= |
319 | |
320 | gp_Parab BiTgte_CurveOnVertex::Parabola() const |
321 | { |
9775fa61 |
322 | throw Standard_NotImplemented("BiTgte_CurveOnVertex"); |
7fd59977 |
323 | } |
324 | |
325 | |
326 | //======================================================================= |
327 | //function : |
328 | //purpose : |
329 | //======================================================================= |
330 | |
331 | Standard_Integer BiTgte_CurveOnVertex::Degree() const |
332 | { |
9775fa61 |
333 | throw Standard_NotImplemented("BiTgte_CurveOnVertex"); |
7fd59977 |
334 | } |
335 | |
336 | |
337 | //======================================================================= |
338 | //function : |
339 | //purpose : |
340 | //======================================================================= |
341 | |
342 | Standard_Boolean BiTgte_CurveOnVertex::IsRational() const |
343 | { |
9775fa61 |
344 | throw Standard_NotImplemented("BiTgte_CurveOnVertex"); |
7fd59977 |
345 | } |
346 | |
347 | |
348 | //======================================================================= |
349 | //function : |
350 | //purpose : |
351 | //======================================================================= |
352 | |
353 | Standard_Integer BiTgte_CurveOnVertex::NbPoles() const |
354 | { |
9775fa61 |
355 | throw Standard_NotImplemented("BiTgte_CurveOnVertex"); |
7fd59977 |
356 | } |
357 | |
358 | |
359 | //======================================================================= |
360 | //function : |
361 | //purpose : |
362 | //======================================================================= |
363 | |
364 | Standard_Integer BiTgte_CurveOnVertex::NbKnots() const |
365 | { |
9775fa61 |
366 | throw Standard_NotImplemented("BiTgte_CurveOnVertex"); |
7fd59977 |
367 | } |
368 | |
369 | |
370 | //======================================================================= |
371 | //function : |
372 | //purpose : |
373 | //======================================================================= |
374 | |
375 | Handle(Geom_BezierCurve) BiTgte_CurveOnVertex::Bezier() const |
376 | { |
9775fa61 |
377 | throw Standard_NotImplemented("BiTgte_CurveOnVertex"); |
7fd59977 |
378 | } |
379 | |
380 | |
381 | //======================================================================= |
382 | //function : |
383 | //purpose : |
384 | //======================================================================= |
385 | |
386 | Handle(Geom_BSplineCurve) BiTgte_CurveOnVertex::BSpline() const |
387 | { |
9775fa61 |
388 | throw Standard_NotImplemented("BiTgte_CurveOnVertex"); |
7fd59977 |
389 | } |
390 | |
391 | |