0024023: Revamp the OCCT Handle -- ambiguity
[occt.git] / src / BRepAdaptor / BRepAdaptor_Surface.cdl
CommitLineData
b311480e 1-- Created on: 1993-02-22
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 Surface from BRepAdaptor inherits Surface from Adaptor3d
18
19 ---Purpose: The Surface from BRepAdaptor allows to use a Face
20 -- of the BRep topology look like a 3D surface.
21 --
22 -- It has the methods of the class Surface from
23 -- Adaptor3d.
24 --
25 -- It is created or initialized with a Face. It takes
26 -- into account the local coordinates system.
27 --
28 -- The u,v parameter range is the minmax value for
29 -- the restriction, unless the flag restriction is
30 -- set to false.
31
32uses
33 Face from TopoDS,
34 SurfaceType from GeomAbs,
35 HSurface from Adaptor3d,
36 HCurve from Adaptor3d,
37 Surface from GeomAdaptor,
38 Shape from GeomAbs,
39 BezierSurface from Geom,
40 BSplineSurface from Geom,
41 Trsf from gp,
42 Pnt from gp,
43 Vec from gp,
44 Dir from gp,
45 Pln from gp,
46 Cylinder from gp,
47 Sphere from gp,
48 Torus from gp,
49 Cone from gp,
50 Ax1 from gp,
51 Array1OfReal from TColStd
52
53
54raises
55
56 OutOfRange from Standard,
57 DomainError from Standard,
58 NoSuchObject from Standard
59
60is
61
62 Create returns Surface from BRepAdaptor;
63 ---Purpose: Creates an undefined surface with no face loaded.
64
65 Create(F : Face from TopoDS;
66 R : Boolean = Standard_True)
67 returns Surface from BRepAdaptor;
68 ---Purpose: Creates a surface to access the geometry of <F>.
69 -- If <Restriction> is true the parameter range is
70 -- the parameter range in the UV space of the
71 -- restriction.
72
73 Initialize(me : in out; F : Face from TopoDS;
74 Restriction : Boolean = Standard_True)
75 ---Purpose: Sets the surface to the geometry of <F>.
76 is static;
77
78 Surface(me) returns Surface from GeomAdaptor
79 ---Purpose: Returns the surface.
80 --
81 ---C++: return const &
82 is static;
83
84 ChangeSurface(me : in out) returns Surface from GeomAdaptor
85 ---Purpose: Returns the surface.
86 --
87 ---C++: return &
88 is static;
89
90 Trsf(me) returns Trsf from gp
91 ---Purpose: Returns the surface coordinate system.
92 --
93 ---C++: return const &
94 is static;
95
96 Face(me) returns Face from TopoDS
97 ---Purpose: Returns the face.
98 --
99 ---C++: return const &
100 is static;
101
102 Tolerance(me) returns Real
103 ---Purpose: Returns the face tolerance.
104 --
105 is static;
106
107 --
108 -- Methods of Surface from GeomAdaptor
109 --
110
111 FirstUParameter(me) returns Real
112 ---C++:inline
113 is redefined static;
114
115 LastUParameter(me) returns Real
116 ---C++:inline
117 is redefined static;
118
119 FirstVParameter(me) returns Real
120 ---C++:inline
121 is redefined static;
122
123 LastVParameter(me) returns Real
124 ---C++:inline
125 is redefined static;
126
127 UContinuity(me) returns Shape from GeomAbs
128 ---C++:inline
129 is redefined static;
130
131 VContinuity(me) returns Shape from GeomAbs
132 ---C++:inline
133 is redefined static;
134
135 NbUIntervals(me; S : Shape from GeomAbs) returns Integer
136 ---Purpose: If necessary, breaks the surface in U intervals of
137 -- continuity <S>. And returns the number of
138 -- intervals.
139 ---C++:inline
140 is redefined static;
141
142 NbVIntervals(me; S : Shape from GeomAbs) returns Integer
143 ---Purpose: If necessary, breaks the surface in V intervals of
144 -- continuity <S>. And returns the number of
145 -- intervals.
146 ---C++:inline
147 is redefined static;
148
149 UIntervals(me; T : in out Array1OfReal from TColStd;
150 S : Shape from GeomAbs )
151 ---Purpose: Returns the intervals with the requested continuity
152 -- in the U direction.
153 raises
154 OutOfRange from Standard -- if the Length of the array does
155 -- have enought slots to accomodate
156 -- the result.
157 is redefined static;
158
159 VIntervals(me; T : in out Array1OfReal from TColStd;
160 S : Shape from GeomAbs )
161 ---Purpose: Returns the intervals with the requested continuity
162 -- in the V direction.
163 raises
164 OutOfRange from Standard -- if the Length of the array does
165 -- have enought slots to accomodate
166 -- the result.
167 is redefined static;
168
169 UTrim(me; First, Last, Tol : Real) returns HSurface from Adaptor3d
170 ---Purpose: Returns a surface trimmed in the U direction
171 -- equivalent of <me> between
172 -- parameters <First> and <Last>. <Tol> is used to
173 -- test for 3d points confusion.
174 raises
175 OutOfRange from Standard
176 ---Purpose: If <First> >= <Last>
177 is redefined static ;
178
179 VTrim(me; First, Last, Tol : Real) returns HSurface from Adaptor3d
180 ---Purpose: Returns a surface trimmed in the V direction between
181 -- parameters <First> and <Last>. <Tol> is used to
182 -- test for 3d points confusion.
183 raises
184 OutOfRange from Standard
185 ---Purpose: If <First> >= <Last>
186 is redefined static ;
187
188 IsUClosed(me) returns Boolean
189 ---C++:inline
190 is redefined static;
191
192 IsVClosed(me) returns Boolean
193 ---C++:inline
194 is redefined static;
195
196 IsUPeriodic(me) returns Boolean
197 ---C++:inline
198 is redefined static;
199
200 UPeriod(me) returns Real
201 raises
202 DomainError from Standard -- if the curve is not periodic
203 ---C++:inline
204 is redefined static;
205
206 IsVPeriodic(me) returns Boolean
207 ---C++:inline
208 is redefined static;
209
210 VPeriod(me) returns Real
211 ---C++:inline
212 raises
213 DomainError from Standard -- if the curve is not periodic
214 is redefined static;
215
216 Value (me; U, V : Real) returns Pnt from gp
217 --- Purpose : Computes the point of parameters U,V on the surface.
218 is redefined static;
219
220 D0 (me; U, V : Real; P : out Pnt from gp)
221 --- Purpose : Computes the point of parameters U,V on the surface.
222 is redefined static;
223
224 D1 (me; U, V : Real;
225 P : out Pnt from gp;
226 D1U, D1V : out Vec from gp)
227 --- Purpose : Computes the point and the first derivatives on
228 -- the surface.
229 raises
230 DomainError from Standard
231 --- Purpose : Raised if the continuity of the current
232 -- intervals is not C1.
233 is redefined static;
234
235 D2 (me; U, V : Real;
236 P : out Pnt from gp;
237 D1U, D1V, D2U, D2V, D2UV : out Vec from gp)
238 --- Purpose : Computes the point, the first and second
239 -- derivatives on the surface.
240 raises
241 DomainError from Standard
242 --- Purpose : Raised if the continuity of the current
243 -- intervals is not C2.
244 is redefined static;
245
246 D3 (me; U, V : Real; P : out Pnt from gp;
247 D1U, D1V, D2U, D2V, D2UV, D3U, D3V, D3UUV, D3UVV : out Vec from gp)
248 --- Purpose : Computes the point, the first, second and third
249 -- derivatives on the surface.
250 raises
251 DomainError from Standard
252 --- Purpose : Raised if the continuity of the current
253 -- intervals is not C3.
254 is redefined static;
255
256 DN (me; U, V : Real; Nu, Nv : Integer) returns Vec from gp
257 --- Purpose : Computes the derivative of order Nu in the direction
258 -- U and Nv in the direction V at the point P(U, V).
259 raises
260 DomainError from Standard,
261 --- Purpose : Raised if the current U interval is not not CNu
262 -- and the current V interval is not CNv.
263 OutOfRange from Standard
264 --- Purpose : Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0.
265 is redefined static;
266
267 UResolution(me; R3d : Real ) returns Real
268 ---Purpose : Returns the parametric U resolution corresponding
269 -- to the real space resolution <R3d>.
270 --
271 ---C++:inline
272 is redefined static;
273
274 VResolution(me; R3d : Real ) returns Real
275 ---Purpose : Returns the parametric V resolution corresponding
276 -- to the real space resolution <R3d>.
277 --
278 ---C++:inline
279 is redefined static;
280
281 GetType(me) returns SurfaceType from GeomAbs
282 ---Purpose: Returns the type of the surface : Plane, Cylinder,
283 -- Cone, Sphere, Torus, BezierSurface,
284 -- BSplineSurface, SurfaceOfRevolution,
285 -- SurfaceOfExtrusion, OtherSurface
286 ---C++:inline
287 is redefined static;
288
289 Plane(me) returns Pln from gp
290 raises NoSuchObject from Standard
291
292 is redefined static;
293
294 Cylinder(me) returns Cylinder from gp
295 raises NoSuchObject from Standard
296 is redefined static;
297
298 Cone(me) returns Cone from gp
299 raises NoSuchObject from Standard
300 is redefined static;
301
302 Sphere(me) returns Sphere from gp
303 raises NoSuchObject from Standard
304 is redefined static;
305
306 Torus(me) returns Torus from gp
307 raises NoSuchObject from Standard
308 is redefined static;
309
310
311 UDegree(me) returns Integer
312 raises NoSuchObject from Standard
313 ---C++:inline
314 is redefined static;
315
316 NbUPoles(me) returns Integer
317 raises NoSuchObject from Standard
318 ---C++:inline
319 is redefined static;
320
321 VDegree(me) returns Integer
322 raises NoSuchObject from Standard
323 ---C++:inline
324 is redefined static;
325
326 NbVPoles(me) returns Integer
327 raises NoSuchObject from Standard
328 ---C++:inline
329 is redefined static;
330
331
332 NbUKnots(me) returns Integer
333 raises
334 NoSuchObject from Standard
335 ---C++:inline
336 is redefined static;
337
338
339 NbVKnots(me) returns Integer
340 raises
341 NoSuchObject from Standard
342 ---C++:inline
343 is redefined static;
344
345
346 IsURational(me) returns Boolean
347 raises
348 NoSuchObject from Standard
349 ---C++:inline
350 is redefined static;
351
352 IsVRational(me) returns Boolean
353 raises
354 NoSuchObject from Standard
355 ---C++:inline
356 is redefined static;
357
358
359 Bezier(me) returns BezierSurface from Geom
360 ---Purpose:
361--Warning : this will make a copy of the
362 -- Bezier Surface since it applies
363 -- to it the myTsrf transformation
364 -- Be Carefull when using this method
365
366 raises
367 NoSuchObject from Standard
368 is redefined static;
369
370 BSpline(me) returns BSplineSurface from Geom
371 ---Purpose:
372-- Warning : this will make a copy of the
373 -- BSpline Surface since it applies
374 -- to it the myTsrf transformation
375 -- Be Carefull when using this method
376
377 raises
378 NoSuchObject from Standard
379 is redefined static;
380
381 AxeOfRevolution(me) returns Ax1 from gp
382 raises
383 NoSuchObject from Standard -- only for SurfaceOfRevolution
384 is redefined static;
385
386 Direction(me) returns Dir from gp
387 raises
388 NoSuchObject from Standard -- only for SurfaceOfExtrusion
389 is redefined static;
390
391 BasisCurve(me) returns HCurve from Adaptor3d
392 raises
393 NoSuchObject from Standard
394 ---Purpose: only for SurfaceOfExtrusion and SurfaceOfRevolution
395 -- Warning: this will make a copy of the underlying curve
396 -- since it applies to it the transformation
397 -- myTrsf. Be carefull when using this method.
398 is redefined static;
399
400 BasisSurface(me) returns HSurface from Adaptor3d
401 raises
402 NoSuchObject from Standard -- only for Offset Surface
403 is redefined static;
404
405 OffsetValue(me) returns Real from Standard
406 raises
407 NoSuchObject from Standard -- only for Offset Surface
408 is redefined static;
409
410fields
411
412 mySurf : Surface from GeomAdaptor;
413 myTrsf : Trsf from gp;
414 myFace : Face from TopoDS;
415
416end Surface;