0025246: Make methods Intervals and NbIntervals const in Adaptor3d_Curve and it desce...
[occt.git] / src / BRepAdaptor / BRepAdaptor_Curve.cdl
CommitLineData
b311480e 1-- Created on: 1993-02-19
2-- Created by: Remi LEQUETTE
3-- Copyright (c) 1993-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
17class Curve from BRepAdaptor inherits Curve from Adaptor3d
18
19 ---Purpose: The Curve from BRepAdaptor allows to use an Edge
20 -- of the BRep topology like a 3D curve.
21 --
22 -- It has the methods the class Curve from Adaptor3d.
23 --
24 -- It is created or Initialized with an Edge. It
25 -- takes into account local coordinate systems. If
26 -- the Edge has a 3D curve it is use with priority.
27 -- If the edge has no 3D curve one of the curves on
28 -- surface is used. It is possible to enforce using a
29 -- curve on surface by creating or initialising with
30 -- an Edge and a Face.
31
32uses
33 Edge from TopoDS,
34 Face from TopoDS,
35 CurveType from GeomAbs,
36 Shape from GeomAbs,
37 HCurve from Adaptor3d,
38 Curve from GeomAdaptor,
39 CurveOnSurface from Adaptor3d,
40 HCurveOnSurface from Adaptor3d,
41 BezierCurve from Geom,
42 BSplineCurve from Geom,
43 Array1OfReal from TColStd,
44 Trsf from gp,
45 Pnt from gp,
46 Vec from gp,
47 Circ from gp,
48 Elips from gp,
49 Hypr from gp,
50 Parab from gp,
51 Lin from gp
52
53raises
54 NullObject from Standard,
55 DomainError from Standard,
56 OutOfRange from Standard,
57 NoSuchObject from Standard
58
59is
60 Create returns Curve from BRepAdaptor;
61 ---Purpose: Creates an undefined Curve with no Edge loaded.
62
63 Create(E : Edge from TopoDS) returns Curve from BRepAdaptor;
64 ---Purpose: Creates a Curve to acces to the geometry of edge
65 -- <E>.
66
67 Create(E : Edge from TopoDS; F : Face from TopoDS)
68 returns Curve from BRepAdaptor;
69 ---Purpose: Creates a Curve to acces to the geometry of edge
70 -- <E>. The geometry will be computed using the
71 -- parametric curve of <E> on the face <F>. An Error
72 -- is raised if the edge does not have a pcurve on
73 -- the face.
74
75 Initialize(me : in out; E : Edge from TopoDS)
76 ---Purpose: Sets the Curve <me> to acces to the geometry of
77 -- edge <E>.
78 is static;
79
80 Initialize(me : in out; E : Edge from TopoDS; F : Face from TopoDS)
81 ---Purpose: Sets the Curve <me> to acces to the geometry of
82 -- edge <E>. The geometry will be computed using the
83 -- parametric curve of <E> on the face <F>. An Error
84 -- is raised if the edge does not have a pcurve on
85 -- the face.
86 raises DomainError from Standard
87 is static;
88
89 Trsf(me) returns Trsf from gp
90 ---Purpose: Returns the coordinate system of the curve.
91 ---C++: return const &
92 is static;
93
94 Is3DCurve(me) returns Boolean
95 ---Purpose: Returns True if the edge geometry is computed from
96 -- a 3D curve.
97 is static;
98
99 IsCurveOnSurface(me) returns Boolean
100 ---Purpose: Returns True if the edge geometry is computed from
101 -- a pcurve on a surface.
102 is static;
103
104 Curve(me) returns Curve from GeomAdaptor
105 ---Purpose: Returns the Curve of the edge.
106 ---C++: return const &
107 is static;
108
109 CurveOnSurface(me) returns CurveOnSurface from Adaptor3d
110 ---Purpose: Returns the CurveOnSurface of the edge.
111 ---C++: return const &
112 is static;
113
114 Edge(me) returns Edge from TopoDS
115 ---Purpose: Returns the edge.
116 --
117 ---C++: return const &
118 is static;
119
120 Tolerance(me) returns Real
121 ---Purpose: Returns the edge tolerance.
122 --
123 is static;
124
125 --
126 -- Methods of Curve from GeomAdaptor.
127 --
128
129 FirstParameter(me) returns Real
130 is redefined static;
131
132 LastParameter(me) returns Real
133 is redefined static;
134
135 Continuity(me) returns Shape from GeomAbs
136 is redefined static;
137
31b1749c 138 NbIntervals(me; S : Shape from GeomAbs) returns Integer
7fd59977 139 ---Purpose: Returns the number of intervals for continuity
140 -- <S>. May be one if Continuity(me) >= <S>
141 is redefined static;
142
31b1749c 143 Intervals(me; T : in out Array1OfReal from TColStd;
7fd59977 144 S : Shape from GeomAbs)
145 ---Purpose: Stores in <T> the parameters bounding the intervals
146 -- of continuity <S>.
147 --
148 -- The array must provide enough room to accomodate
149 -- for the parameters. i.e. T.Length() > NbIntervals()
150 raises
151 OutOfRange from Standard
152 is redefined static;
153
154 Trim(me; First, Last, Tol : Real) returns HCurve from Adaptor3d
155 ---Purpose: Returns a curve equivalent of <me> between
156 -- parameters <First> and <Last>. <Tol> is used to
157 -- test for 3d points confusion.
158 raises
159 OutOfRange from Standard
160 ---Purpose: If <First> >= <Last>
161 is redefined static;
162
163 IsClosed(me) returns Boolean
164 is redefined static;
165
166 IsPeriodic(me) returns Boolean
167 is redefined static;
168
169 Period(me) returns Real
170 raises
171 DomainError from Standard -- if the curve is not periodic
172 is redefined static;
173
174
175 Value(me; U : Real) returns Pnt from gp
176 --- Purpose : Computes the point of parameter U on the curve
177 is redefined static;
178
179 D0 (me; U : Real; P : out Pnt from gp)
180 --- Purpose : Computes the point of parameter U.
181 is redefined static;
182
183 D1 (me; U : Real; P : out Pnt from gp ; V : out Vec from gp)
184 --- Purpose : Computes the point of parameter U on the curve
185 -- with its first derivative.
186
187 raises
188 DomainError from Standard
189 --- Purpose : Raised if the continuity of the current interval
190 -- is not C1.
191 is redefined static;
192
193 D2 (me; U : Real; P : out Pnt from gp; V1, V2 : out Vec from gp)
194 --- Purpose :
195 -- Returns the point P of parameter U, the first and second
196 -- derivatives V1 and V2.
197 raises
198 DomainError from Standard
199 --- Purpose : Raised if the continuity of the current interval
200 -- is not C2.
201 is redefined static;
202
203 D3 (me; U : Real; P : out Pnt from gp; V1, V2, V3 : out Vec from gp)
204 --- Purpose :
205 -- Returns the point P of parameter U, the first, the second
206 -- and the third derivative.
207 raises
208 DomainError from Standard
209 --- Purpose : Raised if the continuity of the current interval
210 -- is not C3.
211 is redefined static;
212
213 DN (me; U : Real; N : Integer) returns Vec from gp
214 --- Purpose :
215 -- The returned vector gives the value of the derivative for the
216 -- order of derivation N.
217 raises
218 DomainError from Standard,
219 --- Purpose : Raised if the continuity of the current interval
220 -- is not CN.
221 OutOfRange from Standard
222 --- Purpose : Raised if N < 1.
223 is redefined static;
224
225
226 Resolution(me; R3d :Real) returns Real
227 ---Purpose : returns the parametric resolution
228 is redefined static;
229
230
231 GetType(me) returns CurveType from GeomAbs
232 is redefined static;
233
234 Line(me) returns Lin from gp
235 raises NoSuchObject from Standard
236 is redefined static;
237
238 Circle(me) returns Circ from gp
239 raises NoSuchObject from Standard
240 is redefined static;
241
242 Ellipse(me) returns Elips from gp
243 raises NoSuchObject from Standard
244 is redefined static;
245
246 Hyperbola(me) returns Hypr from gp
247 raises NoSuchObject from Standard
248 is redefined static;
249
250 Parabola(me) returns Parab from gp
251 raises NoSuchObject from Standard
252 is redefined static;
253
254
255 Degree(me) returns Integer
256 raises NoSuchObject from Standard
257 is redefined static;
258
259 IsRational(me) returns Boolean
260 raises
261 NoSuchObject from Standard
262 is redefined static;
263
264 NbPoles(me) returns Integer
265 raises NoSuchObject from Standard
266 is redefined static;
267
268 NbKnots(me) returns Integer
269 raises
270 NoSuchObject from Standard
271 is redefined static;
272
273
274 Bezier(me) returns BezierCurve from Geom
275 ---Purpose:
276 -- Warning :
277 -- This will make a copy of the Bezier Curve
278 -- since it applies to it myTsrf . Be carefull when
279 -- using this method
280 raises
281 NoSuchObject from Standard
282 is redefined static;
283
284 BSpline(me) returns BSplineCurve from Geom
285 ---Purpose:
286 -- Warning :
287 -- This will make a copy of the BSpline Curve
288 -- since it applies to it myTsrf . Be carefull when
289 -- using this method
290
291 raises
292 NoSuchObject from Standard
293 is redefined static;
294
295fields
296
297 myTrsf : Trsf from gp;
298 myCurve : Curve from GeomAdaptor;
299 myConSurf : HCurveOnSurface from Adaptor3d;
300 myEdge : Edge from TopoDS;
301
302end Curve;