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