0031642: Visualization - crash in Graphic3d_Structure::SetVisual() on redisplaying...
[occt.git] / src / BiTgte / BiTgte_CurveOnVertex.cxx
... / ...
CommitLineData
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//======================================================================
42BiTgte_CurveOnVertex::BiTgte_CurveOnVertex()
43: myFirst(0.0), myLast(0.0)
44{
45}
46
47
48//=======================================================================
49//function : BiTgte_CurveOnVertex
50//purpose :
51//=======================================================================
52
53BiTgte_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
66void 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
79Standard_Real BiTgte_CurveOnVertex::FirstParameter() const
80{
81 return myFirst;
82}
83
84
85//=======================================================================
86//function : LastParameter
87//purpose :
88//=======================================================================
89
90Standard_Real BiTgte_CurveOnVertex::LastParameter() const
91{
92 return myLast;
93}
94
95
96//=======================================================================
97//function :
98//purpose :
99//=======================================================================
100
101GeomAbs_Shape BiTgte_CurveOnVertex::Continuity() const
102{
103 throw Standard_NotImplemented("BiTgte_CurveOnVertex");
104}
105
106
107//=======================================================================
108//function :
109//purpose :
110//=======================================================================
111
112Standard_Integer BiTgte_CurveOnVertex::NbIntervals(const GeomAbs_Shape) const
113{
114 throw Standard_NotImplemented("BiTgte_CurveOnVertex");
115}
116
117
118//=======================================================================
119//function :
120//purpose :
121//=======================================================================
122
123void BiTgte_CurveOnVertex::Intervals(TColStd_Array1OfReal&,
124 const GeomAbs_Shape) const
125{
126 throw Standard_NotImplemented("BiTgte_CurveOnVertex");
127}
128
129
130//=======================================================================
131//function :
132//purpose :
133//=======================================================================
134
135Handle(Adaptor3d_HCurve) BiTgte_CurveOnVertex::Trim(const Standard_Real,
136 const Standard_Real,
137 const Standard_Real)
138const
139{
140 throw Standard_NotImplemented("BiTgte_CurveOnVertex");
141}
142
143
144//=======================================================================
145//function :
146//purpose :
147//=======================================================================
148
149Standard_Boolean BiTgte_CurveOnVertex::IsClosed() const
150{
151 throw Standard_NotImplemented("BiTgte_CurveOnVertex");
152}
153
154
155//=======================================================================
156//function :
157//purpose :
158//=======================================================================
159
160Standard_Boolean BiTgte_CurveOnVertex::IsPeriodic() const
161{
162 throw Standard_NotImplemented("BiTgte_CurveOnVertex");
163}
164
165
166//=======================================================================
167//function :
168//purpose :
169//=======================================================================
170
171Standard_Real BiTgte_CurveOnVertex::Period() const
172{
173 throw Standard_NotImplemented("BiTgte_CurveOnVertex");
174}
175
176
177//=======================================================================
178//function :
179//purpose :
180//=======================================================================
181
182gp_Pnt BiTgte_CurveOnVertex::Value(const Standard_Real) const
183{
184 return myPnt;
185}
186
187
188//=======================================================================
189//function :
190//purpose :
191//=======================================================================
192
193void BiTgte_CurveOnVertex::D0(const Standard_Real /*U*/,gp_Pnt& P) const
194{
195 P = myPnt;
196}
197
198
199//=======================================================================
200//function :
201//purpose :
202//=======================================================================
203
204void BiTgte_CurveOnVertex::D1(const Standard_Real ,gp_Pnt& ,gp_Vec&) const
205{
206 throw Standard_NotImplemented("BiTgte_CurveOnVertex");
207}
208
209
210//=======================================================================
211//function :
212//purpose :
213//=======================================================================
214
215void BiTgte_CurveOnVertex::D2(const Standard_Real,gp_Pnt&,
216 gp_Vec& ,gp_Vec& ) const
217{
218 throw Standard_NotImplemented("BiTgte_CurveOnVertex");
219}
220
221
222//=======================================================================
223//function :
224//purpose :
225//=======================================================================
226
227void BiTgte_CurveOnVertex::D3(const Standard_Real,
228 gp_Pnt& ,
229 gp_Vec& ,
230 gp_Vec& ,
231 gp_Vec& ) const
232{
233 throw Standard_NotImplemented("BiTgte_CurveOnVertex");
234}
235
236
237//=======================================================================
238//function :
239//purpose :
240//=======================================================================
241
242gp_Vec BiTgte_CurveOnVertex::DN(const Standard_Real,
243 const Standard_Integer) const
244{
245 throw Standard_NotImplemented("BiTgte_CurveOnVertex");
246}
247
248
249//=======================================================================
250//function :
251//purpose :
252//=======================================================================
253
254Standard_Real BiTgte_CurveOnVertex::Resolution(const Standard_Real) const
255{
256 throw Standard_NotImplemented("BiTgte_CurveOnVertex");
257}
258
259
260//=======================================================================
261//function :
262//purpose :
263//=======================================================================
264
265GeomAbs_CurveType BiTgte_CurveOnVertex::GetType() const
266{
267 return GeomAbs_OtherCurve;
268}
269
270
271//=======================================================================
272//function :
273//purpose :
274//=======================================================================
275
276gp_Lin BiTgte_CurveOnVertex::Line() const
277{
278 throw Standard_NotImplemented("BiTgte_CurveOnVertex");
279}
280
281
282//=======================================================================
283//function :
284//purpose :
285//=======================================================================
286
287gp_Circ BiTgte_CurveOnVertex::Circle() const
288{
289 throw Standard_NoSuchObject("BiTgte_CurveOnVertex::Circle");
290}
291
292
293//=======================================================================
294//function :
295//purpose :
296//=======================================================================
297
298gp_Elips BiTgte_CurveOnVertex::Ellipse() const
299{
300 throw Standard_NotImplemented("BiTgte_CurveOnVertex");
301}
302
303
304//=======================================================================
305//function :
306//purpose :
307//=======================================================================
308
309gp_Hypr BiTgte_CurveOnVertex::Hyperbola() const
310{
311 throw Standard_NotImplemented("BiTgte_CurveOnVertex");
312}
313
314
315//=======================================================================
316//function :
317//purpose :
318//=======================================================================
319
320gp_Parab BiTgte_CurveOnVertex::Parabola() const
321{
322 throw Standard_NotImplemented("BiTgte_CurveOnVertex");
323}
324
325
326//=======================================================================
327//function :
328//purpose :
329//=======================================================================
330
331Standard_Integer BiTgte_CurveOnVertex::Degree() const
332{
333 throw Standard_NotImplemented("BiTgte_CurveOnVertex");
334}
335
336
337//=======================================================================
338//function :
339//purpose :
340//=======================================================================
341
342Standard_Boolean BiTgte_CurveOnVertex::IsRational() const
343{
344 throw Standard_NotImplemented("BiTgte_CurveOnVertex");
345}
346
347
348//=======================================================================
349//function :
350//purpose :
351//=======================================================================
352
353Standard_Integer BiTgte_CurveOnVertex::NbPoles() const
354{
355 throw Standard_NotImplemented("BiTgte_CurveOnVertex");
356}
357
358
359//=======================================================================
360//function :
361//purpose :
362//=======================================================================
363
364Standard_Integer BiTgte_CurveOnVertex::NbKnots() const
365{
366 throw Standard_NotImplemented("BiTgte_CurveOnVertex");
367}
368
369
370//=======================================================================
371//function :
372//purpose :
373//=======================================================================
374
375Handle(Geom_BezierCurve) BiTgte_CurveOnVertex::Bezier() const
376{
377 throw Standard_NotImplemented("BiTgte_CurveOnVertex");
378}
379
380
381//=======================================================================
382//function :
383//purpose :
384//=======================================================================
385
386Handle(Geom_BSplineCurve) BiTgte_CurveOnVertex::BSpline() const
387{
388 throw Standard_NotImplemented("BiTgte_CurveOnVertex");
389}
390
391