0031642: Visualization - crash in Graphic3d_Structure::SetVisual() on redisplaying...
[occt.git] / src / Extrema / Extrema_CurveTool.lxx
CommitLineData
b311480e 1// Created on: 1995-07-18
2// Created by: Modelistation
3// Copyright (c) 1995-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 <gp_Vec.hxx>
18#include <gp_Pnt.hxx>
19#include <gp_Parab.hxx>
20#include <gp_Lin.hxx>
21#include <gp_Elips.hxx>
22#include <gp_Hypr.hxx>
23#include <gp_Circ.hxx>
24#include <Geom_BezierCurve.hxx>
25#include <Geom_BSplineCurve.hxx>
26#include <Adaptor3d_Curve.hxx>
27
28
29//=======================================================================
30//function : FirstParameter
31//purpose :
32//=======================================================================
33
34inline Standard_Real Extrema_CurveTool::FirstParameter(const Adaptor3d_Curve& C)
35{
36 return C.FirstParameter();
37}
38
39//=======================================================================
40//function : LastParameter
41//purpose :
42//=======================================================================
43
44inline Standard_Real Extrema_CurveTool::LastParameter(const Adaptor3d_Curve& C)
45{
46 return C.LastParameter();
47}
48
49//=======================================================================
50//function : Value
51//purpose :
52//=======================================================================
53
54inline gp_Pnt Extrema_CurveTool::Value(const Adaptor3d_Curve& C,
55 const Standard_Real U)
56{
57 return C.Value(U);
58}
59
32ca7a51 60//=======================================================================
61//function : D0
62//purpose :
63//=======================================================================
64
65inline void Extrema_CurveTool::D0(const Adaptor3d_Curve& C,
66 const Standard_Real U,
67 gp_Pnt& P)
68{
69 C.D0(U, P);
70}
7fd59977 71
72//=======================================================================
73//function : D1
74//purpose :
75//=======================================================================
76
77inline void Extrema_CurveTool::D1(const Adaptor3d_Curve& C,
78 const Standard_Real U,
79 gp_Pnt& P,
80 gp_Vec& V)
81{
82 C.D1(U, P, V);
83}
84
85//=======================================================================
86//function : D2
87//purpose :
88//=======================================================================
89
90inline void Extrema_CurveTool::D2(const Adaptor3d_Curve& C,
91 const Standard_Real U,
92 gp_Pnt& P,
93 gp_Vec& V1,
94 gp_Vec& V2)
95{
96 C.D2(U, P, V1, V2);
97}
98
32ca7a51 99//=======================================================================
100//function : D3
101//purpose :
102//=======================================================================
103
104 inline void Extrema_CurveTool::D3(const Adaptor3d_Curve& C,
105 const Standard_Real U,
106 gp_Pnt& P,
107 gp_Vec& V1,
108 gp_Vec& V2,
109 gp_Vec& V3)
110{
111 C.D3(U, P, V1, V2, V3);
112}
113
114//=======================================================================
115//function : DN
116//purpose :
117//=======================================================================
118inline gp_Vec Extrema_CurveTool::DN(const Adaptor3d_Curve& C,
119 const Standard_Real U,
120 const Standard_Integer N)
121{
122 return C.DN(U, N);
123}
7fd59977 124
125
126//=======================================================================
127//function : Continuity
128//purpose :
129//=======================================================================
130
131inline GeomAbs_Shape Extrema_CurveTool::Continuity(const Adaptor3d_Curve& C)
132{
133 return C.Continuity();
134}
135
136//=======================================================================
137//function : NbIntervals
138//purpose :
139//=======================================================================
140
141inline Standard_Integer Extrema_CurveTool::NbIntervals(Adaptor3d_Curve& C,
142 const GeomAbs_Shape S)
143{
144 return C.NbIntervals(S);
145}
146
147
148//=======================================================================
149//function : Intervals
150//purpose :
151//=======================================================================
152
153inline void Extrema_CurveTool::Intervals(Adaptor3d_Curve& C,
154 TColStd_Array1OfReal& T,
155 const GeomAbs_Shape S)
156{
157 C.Intervals(T, S);
158}
159
160//=======================================================================
161//function : Period
162//purpose :
163//=======================================================================
164
165inline Standard_Real Extrema_CurveTool::Period(const Adaptor3d_Curve& C)
166{
167 return C.Period();
168}
169
170
171//=======================================================================
172//function : GetType
173//purpose :
174//=======================================================================
175
176inline GeomAbs_CurveType Extrema_CurveTool::GetType(const Adaptor3d_Curve& C)
177{
178 return C.GetType();
179}
180
181//=======================================================================
182//function : Line
183//purpose :
184//=======================================================================
185
186inline gp_Lin Extrema_CurveTool::Line(const Adaptor3d_Curve& C)
187{
188 return C.Line();
189}
190
191//=======================================================================
192//function : Circle
193//purpose :
194//=======================================================================
195
196inline gp_Circ Extrema_CurveTool::Circle(const Adaptor3d_Curve& C)
197{
198 return C.Circle();
199}
200
201//=======================================================================
202//function : Ellipse
203//purpose :
204//=======================================================================
205
206inline gp_Elips Extrema_CurveTool::Ellipse(const Adaptor3d_Curve& C)
207{
208 return C.Ellipse();
209}
210
211//=======================================================================
212//function : Hyperbola
213//purpose :
214//=======================================================================
215
216inline gp_Hypr Extrema_CurveTool::Hyperbola(const Adaptor3d_Curve& C)
217{
218 return C.Hyperbola();
219}
220
221//=======================================================================
222//function : Parabola
223//purpose :
224//=======================================================================
225
226inline gp_Parab Extrema_CurveTool::Parabola(const Adaptor3d_Curve& C)
227{
228 return C.Parabola();
229}
230//=======================================================================
231//function : NbPoles
232//purpose :
233//=======================================================================
234
235 inline Standard_Integer Extrema_CurveTool::NbPoles(const Adaptor3d_Curve& C)
236{
237 return C.NbPoles();
238}
239
240//=======================================================================
241//function : Degree
242//purpose :
243//=======================================================================
244
245 inline Standard_Integer Extrema_CurveTool::Degree(const Adaptor3d_Curve& C)
246{
247 return C.Degree();
248}
249
250//=======================================================================
251//function : IsRational
252//purpose :
253//=======================================================================
254
255 inline Standard_Boolean Extrema_CurveTool::IsRational(const Adaptor3d_Curve& C)
256{
a569e8a0 257 return C.IsRational();
7fd59977 258}
259
260//=======================================================================
261//function : NbKnots
262//purpose :
263//=======================================================================
264
265 inline Standard_Integer Extrema_CurveTool::NbKnots(const Adaptor3d_Curve& C)
266{
267 return C.NbKnots();
268}
269
270
271//=======================================================================
272//function : Bezier
273//purpose :
274//=======================================================================
275
276inline Handle(Geom_BezierCurve) Extrema_CurveTool::Bezier(const Adaptor3d_Curve& C)
277{
278 return C.Bezier();
279}
280
281//=======================================================================
282//function : BSpline
283//purpose :
284//=======================================================================
285
286inline Handle(Geom_BSplineCurve) Extrema_CurveTool::BSpline(const Adaptor3d_Curve& C)
287{
288 return C.BSpline();
289}
290
291//=======================================================================
292//function : Resolution
293//purpose :
294//=======================================================================
295
296inline Standard_Real Extrema_CurveTool::Resolution(const Adaptor3d_Curve& C,
297 const Standard_Real R3d)
298{
299 return C.Resolution(R3d);
300}