0024750: Replace instantiations of TCollection generic classes by NCollection templat...
[occt.git] / src / BRep / BRep_Tool.cdl
CommitLineData
b311480e 1-- Created on: 1993-07-07
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 Tool from BRep
18
19 ---Purpose: Provides class methods to access to the geometry
20 -- of BRep shapes.
21
22uses
23 Vertex from TopoDS,
24 Edge from TopoDS,
25 Face from TopoDS,
26 Shape from TopoDS,
27 Location from TopLoc,
28 Pnt from gp,
29 Pnt2d from gp,
30 Box2d from Bnd,
31 Curve from Geom2d,
32 Curve from Geom,
33 Surface from Geom,
34 Shape from GeomAbs,
35
36 Triangulation from Poly,
37 Polygon3D from Poly,
38 Polygon2D from Poly,
39 PolygonOnTriangulation from Poly,
40 HArray1OfInteger from TColStd,
41 HArray1OfReal from TColStd
42
43raises
44 NullObject from Standard,
45 NoSuchObject from Standard
46
47is
48
49
50 -----------------------------------------------------------
51 -----------------------------------------------------------
da72a17c 52 -- Shape --
7fd59977 53 -----------------------------------------------------------
54 -----------------------------------------------------------
55 IsClosed (myclass; S : Shape from TopoDS) returns Boolean from Standard;
da72a17c 56 ---Purpose: If S is Shell, returns True if it has no free boundaries (edges).
57 -- If S is Wire, returns True if it has no free ends (vertices).
58 -- (Internal and External sub-shepes are ignored in these checks)
59 -- If S is Edge, returns True if its vertices are the same.
60 -- For other shape types returns S.Closed().
7fd59977 61
62 -----------------------------------------------------------
63 -----------------------------------------------------------
64 -- Face --
65 -----------------------------------------------------------
66 -----------------------------------------------------------
67
68
69
70 -----------------------------------------------------------
71 -- Face surface
72 -----------------------------------------------------------
73
74
75 Surface(myclass; F : Face from TopoDS;
76 L : out Location from TopLoc) returns Surface from Geom
77
78 ---Purpose: Returns the geometric surface of the face. Returns
79 -- in <L> the location for the surface.
80 ---C++: return const &
81 raises
82 NullObject from Standard;
83
84 Surface(myclass; F : Face from TopoDS) returns Surface from Geom
85
86 ---Purpose: Returns the geometric surface of the face. It can
87 -- be a copy if there is a Location.
88 --
89 raises
90 NullObject from Standard;
91
92 Triangulation(myclass; F : Face from TopoDS;
93 L : out Location from TopLoc) returns Triangulation from Poly
94
95 ---Purpose: Returns the Triangulation of the face. It is a
96 -- null handle if there is no triangulation.
97 --
98 ---C++: return const &
99 raises
100 NullObject from Standard;
101
102
103
104 -----------------------------------------------------------
105 -- Face tolerance
106 -----------------------------------------------------------
107
108 Tolerance(myclass; F : Face from TopoDS) returns Real
109
110 ---Purpose: Returns the tolerance of the face.
111 raises
112 NullObject from Standard;
113
114 -----------------------------------------------------------
115 -- Face natural restriction flag
116 -----------------------------------------------------------
117
118 NaturalRestriction(myclass; F : Face from TopoDS) returns Boolean
119
120 ---Purpose: Returns the NaturalRestriction flag of the face.
121 raises
122 NullObject from Standard;
123
124
125
126
127 -----------------------------------------------------------
128 -----------------------------------------------------------
129 -- Edge --
130 -----------------------------------------------------------
131 -----------------------------------------------------------
132
133 IsGeometric(myclass; E: Edge from TopoDS)
134 ---Purpose: Returns True if <E> is a 3d curve or a curve on
135 -- surface.
136 returns Boolean;
137
138 -----------------------------------------------------------
139 -- Edge 3d curve
140 -----------------------------------------------------------
141
142 Curve(myclass; E : Edge from TopoDS;
143 L : out Location from TopLoc;
144 First, Last : out Real)
145 returns Curve from Geom
146
147 ---Purpose: Returns the 3D curve of the edge. May be a Null
148 -- handle. Returns in <L> the location for the curve.
149 -- In <First> and <Last> the parameter range.
150 --
151 ---C++: return const &
152 raises
153 NullObject from Standard;
154
155
156 Curve(myclass; E : Edge from TopoDS;
157 First, Last : out Real)
158 returns Curve from Geom
159
160 ---Purpose: Returns the 3D curve of the edge. May be a Null handle.
161 -- In <First> and <Last> the parameter range.
162 -- It can be a copy if there is a Location.
163 raises
164 NullObject from Standard;
165
166 -----------------------------------------------------------
167 -- Edge 3d polygon
168 -----------------------------------------------------------
169
170 Polygon3D(myclass; E : Edge from TopoDS;
171 L : out Location from TopLoc)
172 returns Polygon3D from Poly
173
174 ---Purpose: Returns the 3D polygon of the edge. May be a Null
175 -- handle. Returns in <L> the location for the polygon.
176 --
177 ---C++: return const &
178 raises
179 NullObject from Standard;
180
181
182 -----------------------------------------------------------
183 -- Edge curve on surface
184 -----------------------------------------------------------
185
186 CurveOnSurface(myclass; E : Edge from TopoDS;
187 F : Face from TopoDS;
188 First, Last : out Real)
189 returns Curve from Geom2d
190
191 ---Purpose: Returns the curve associated to the edge in the
192 -- parametric space of the face. Returns a NULL
193 -- handle if this curve does not exist. Returns in
194 -- <First> and <Last> the parameter range.
195 raises
196 NullObject from Standard;
197
198
199 CurveOnSurface(myclass; E : Edge from TopoDS;
200 S : Surface from Geom;
201 L : Location from TopLoc;
202 First, Last : out Real)
203 returns Curve from Geom2d
204
205 ---Purpose: Returns the curve associated to the edge in the
206 -- parametric space of the surface. Returns a NULL
207 -- handle if this curve does not exist. Returns in
208 -- <First> and <Last> the parameter range.
209 raises
210 NullObject from Standard;
211
212
213 CurveOnSurface(myclass; E : Edge from TopoDS;
214 C : out Curve from Geom2d;
215 S : out Surface from Geom;
216 L : out Location from TopLoc;
217 First, Last : out Real)
218
219 ---Purpose: Returns in <C>, <S>, <L> a 2d curve, a surface and
220 -- a location for the edge <E>. <C> and <S> are null
221 -- if the edge has no curve on surface. Returns in
222 -- <First> and <Last> the parameter range.
223 raises
224 NullObject from Standard;
225
226 CurveOnSurface(myclass; E : Edge from TopoDS;
227 C : out Curve from Geom2d;
228 S : out Surface from Geom;
229 L : out Location from TopLoc;
230 First, Last : out Real;
231 Index : Integer)
232
233 ---Purpose: Returns in <C>, <S>, <L> the 2d curve, the surface
234 -- and the location for the edge <E> of rank <Index>.
235 -- <C> and <S> are null if the index is out of range.
236 -- Returns in <First> and <Last> the parameter range.
237 raises
238 NullObject from Standard;
239
240 -----------------------------------------------------------
241 -- Edge polygon on surface
242 -----------------------------------------------------------
243
244 PolygonOnSurface(myclass; E : Edge from TopoDS;
245 F : Face from TopoDS)
246 returns Polygon2D from Poly
247
248 ---Purpose: Returns the polygon associated to the edge in the
249 -- parametric space of the face. Returns a NULL
250 -- handle if this polygon does not exist.
251 raises
252 NullObject from Standard;
253
254 PolygonOnSurface(myclass; E : Edge from TopoDS;
255 S : Surface from Geom;
256 L : Location from TopLoc)
257 returns Polygon2D from Poly
258
259 ---Purpose: Returns the polygon associated to the edge in the
260 -- parametric space of the surface. Returns a NULL
261 -- handle if this polygon does not exist.
262 raises
263 NullObject from Standard;
264
265
266 PolygonOnSurface(myclass; E : Edge from TopoDS;
267 C : out Polygon2D from Poly;
268 S : out Surface from Geom;
269 L : out Location from TopLoc)
270
271 ---Purpose: Returns in <C>, <S>, <L> a 2d curve, a surface and
272 -- a location for the edge <E>. <C> and <S> are null
273 -- if the edge has no polygon on surface.
274 raises
275 NullObject from Standard;
276
277 PolygonOnSurface(myclass; E : Edge from TopoDS;
278 C : out Polygon2D from Poly;
279 S : out Surface from Geom;
280 L : out Location from TopLoc;
281 Index : Integer)
282
283 ---Purpose: Returns in <C>, <S>, <L> the 2d curve, the surface
284 -- and the location for the edge <E> of rank <Index>.
285 -- <C> and <S> are null if the index is out of range.
286 raises
287 NullObject from Standard;
288
289
290
291 -----------------------------------------------------------
292 -- Edge polygon on triangulation
293 -----------------------------------------------------------
294
295 PolygonOnTriangulation(myclass; E : Edge from TopoDS;
296 T : Triangulation from Poly;
297 L : Location from TopLoc)
298 ---C++: return const &
299 returns PolygonOnTriangulation from Poly;
300 --
301 ---Purpose: Returns the polygon associated to the edge in the
302 -- parametric space of the face. Returns a NULL
303 -- handle if this polygon does not exist.
304
305
306 PolygonOnTriangulation(myclass; E : Edge from TopoDS;
307 P : out PolygonOnTriangulation from Poly;
308 T : out Triangulation from Poly;
309 L : out Location from TopLoc)
310
311 ---Purpose: Returns in <P>, <T>, <L> a polygon on triangulation, a
312 -- triangulation and a location for the edge <E>.
313 -- <P> and <T> are null if the edge has no
314 -- polygon on triangulation.
315 raises
316 NullObject from Standard;
317
318 PolygonOnTriangulation(myclass; E : Edge from TopoDS;
319 P : out PolygonOnTriangulation from Poly;
320 T : out Triangulation from Poly;
321 L : out Location from TopLoc;
322 Index : Integer)
323 ---Purpose: Returns in <P>, <T>, <L> a polygon on
324 -- triangulation, a triangulation and a location for
325 -- the edge <E> for the range index. <C> and <S> are
326 -- null if the edge has no polygon on triangulation.
327
328 raises
329 NullObject from Standard;
330
331
332 -----------------------------------------------------------
333 -- Edge closed on surface
334 -----------------------------------------------------------
335
336 IsClosed(myclass; E : Edge from TopoDS;
337 F : Face from TopoDS)
338 returns Boolean
339
340 ---Purpose: Returns True if <E> has two PCurves in the
341 -- parametric space of <F>. i.e. <F> is on a closed
342 -- surface and <E> is on the closing curve.
343 --
344 raises
345 NullObject from Standard;
346
347
348 -----------------------------------------------------------
349 -- Edge closed on surface
350 -----------------------------------------------------------
351
352 IsClosed(myclass; E : Edge from TopoDS;
353 S : Surface from Geom;
354 L : Location from TopLoc)
355 returns Boolean
356
357 ---Purpose: Returns True if <E> has two PCurves in the
358 -- parametric space of <S>. i.e. <S> is a closed
359 -- surface and <E> is on the closing curve.
360 --
361 raises
362 NullObject from Standard;
363
364 -----------------------------------------------------------
365 -- Edge closed on triangulation
366 -----------------------------------------------------------
367
368 IsClosed(myclass; E : Edge from TopoDS;
ff0a70a1 369 T : Triangulation from Poly;
370 L : Location from TopLoc)
7fd59977 371 returns Boolean
372
373 ---Purpose: Returns True if <E> has two arrays of indices in
374 -- the triangulation <T>.
375 raises
376 NullObject from Standard;
377
378 -----------------------------------------------------------
379 -- Edge tolerance
380 -----------------------------------------------------------
381
382 Tolerance(myclass; E : Edge from TopoDS) returns Real
383
384 ---Purpose: Returns the tolerance for <E>.
385 raises
386 NullObject from Standard;
387
388 -----------------------------------------------------------
389 -- Edge flags
390 -----------------------------------------------------------
391
392 SameParameter(myclass; E : Edge from TopoDS) returns Boolean
393
394 ---Purpose: Returns the SameParameter flag for the edge.
395 raises
396 NullObject from Standard;
397
398 SameRange(myclass; E : Edge from TopoDS) returns Boolean
399
400 ---Purpose: Returns the SameRange flag for the edge.
401 raises
402 NullObject from Standard;
403
404 Degenerated(myclass; E : Edge from TopoDS)
405 returns Boolean
406
407 ---Purpose: Returns True if the edge is degenerated.
408 raises
409 NullObject from Standard;
410
411 -------------------------------------------------------
412 -- Edge parameter range
413 -------------------------------------------------------
414
415 Range(myclass; E : Edge from TopoDS;
416 First, Last : out Real)
417 ---Purpose: Gets the range of the 3d curve.
418 raises
419 NullObject from Standard; -- If <E> is Null
420
421
422 Range(myclass; E : Edge from TopoDS;
423 S : Surface from Geom;
424 L : Location from TopLoc;
425 First, Last : out Real)
426 ---Purpose: Gets the range of the edge on the pcurve on the
427 -- surface.
428 raises
429 NullObject from Standard; -- If <E> is Null
430
431
432 Range(myclass; E : Edge from TopoDS;
433 F : Face from TopoDS;
434 First, Last : out Real)
435 ---Purpose: Gets the range of the edge on the pcurve on the face.
436 raises
437 NullObject from Standard; -- If <E> is Null
438
439
440 -------------------------------------------------------
441 -- Edge UV points
442 --
443 -- The data structures records a location in UV for the two
444 -- extremities of an edge.
445 --
446 -- By default these location are computed from the PCurve.
447 --
448 -- They can be updated to ensure their identity on connected edges.
449 -- (See the package BRepTools)
450 --
451 -------------------------------------------------------
452
453 UVPoints(myclass; E : Edge from TopoDS;
454 S : Surface from Geom;
455 L : Location from TopLoc;
456 PFirst, PLast : out Pnt2d from gp)
457 ---Purpose: Gets the UV locations of the extremities of the edge.
458 raises
459 NullObject from Standard; -- If <E> is Null
460
461
462 UVPoints(myclass; E : Edge from TopoDS;
463 F : Face from TopoDS;
464 PFirst, PLast : out Pnt2d from gp)
465 ---Purpose: Gets the UV locations of the extremities of the edge.
466 raises
467 NullObject from Standard; -- If <E> is Null
468
469 SetUVPoints(myclass; E : Edge from TopoDS;
470 S : Surface from Geom;
471 L : Location from TopLoc;
472 PFirst, PLast : Pnt2d from gp)
473 ---Purpose: Sets the UV locations of the extremities of the edge.
474 raises
475 NullObject from Standard; -- If <E> is Null
476
477
478 SetUVPoints(myclass; E : Edge from TopoDS;
479 F : Face from TopoDS;
480 PFirst, PLast : Pnt2d from gp)
481 ---Purpose: Sets the UV locations of the extremities of the edge.
482 raises
483 NullObject from Standard; -- If <E> is Null
484
485 -----------------------------------------------------------
486 -- Edge continuity
487 -----------------------------------------------------------
488
489 HasContinuity(myclass; E : Edge from TopoDS;
490 F1, F2 : Face from TopoDS)
491 returns Boolean
492
493 ---Purpose: Returns True if the edge is on the surfaces of the
494 -- two faces.
495 raises
496 NullObject from Standard; -- If the edge or the faces are null.
497
498
499 Continuity(myclass; E : Edge from TopoDS;
500 F1, F2 : Face from TopoDS)
501 returns Shape from GeomAbs
502
503 ---Purpose: Returns the continuity.
504 raises
505 NullObject from Standard; -- If the edge or the faces are null.
506
507 HasContinuity(myclass; E : Edge from TopoDS;
508 S1, S2 : Surface from Geom;
509 L1, L2 : Location from TopLoc)
510 returns Boolean
511
512 ---Purpose: Returns True if the edge is on the surfaces.
513 raises
514 NullObject from Standard; -- If the edge or the surfaces are null.
515
516
517 Continuity(myclass; E : Edge from TopoDS;
518 S1, S2 : Surface from Geom;
519 L1, L2 : Location from TopLoc)
520 returns Shape from GeomAbs
521
522 ---Purpose: Returns the continuity.
523 raises
524 NullObject from Standard; -- If the edge or the faces are null.
525
bda83605 526 HasContinuity(myclass; E : Edge from TopoDS)
527 returns Boolean
528
529 ---Purpose: Returns True if the edge has regularity on some
530 -- two surfaces
531 raises
532 NullObject from Standard; -- If the edge is null.
7fd59977 533
534 -----------------------------------------------------------
535 -----------------------------------------------------------
536 -- Vertex --
537 -----------------------------------------------------------
538 -----------------------------------------------------------
539
540
541
542 -----------------------------------------------------------
543 -- Vertex point
544 -----------------------------------------------------------
545
546 Pnt(myclass; V : Vertex from TopoDS) returns Pnt from gp
547
548 ---Purpose: Returns the 3d point.
549 raises
550 NullObject from Standard; -- if <V> is Null or has no geometry.
551
552 -----------------------------------------------------------
553 -- Vertex tolerance
554 -----------------------------------------------------------
555
556 Tolerance(myclass; V : Vertex from TopoDS) returns Real
557
558 ---Purpose: Returns the tolerance.
559 raises
560 NullObject from Standard; -- if <V> is Null or has no geometry.
561
562 -----------------------------------------------------------
563 -- Vertex parameter on edge
564 -----------------------------------------------------------
565
566 Parameter(myclass; V : Vertex from TopoDS;
567 E : Edge from TopoDS)
568 returns Real
569
570 ---Purpose: Returns the parameter of <V> on <E>.
571 raises
572 NullObject from Standard;
573
574
575
576 Parameter(myclass; V : Vertex from TopoDS;
577 E : Edge from TopoDS;
578 F : Face from TopoDS)
579 returns Real
580
581 ---Purpose: Returns the parameters of the vertex on the
582 -- pcurve of the edge on the face.
583 raises
584 NullObject from Standard;
585
586
587
588 Parameter(myclass; V : Vertex from TopoDS;
589 E : Edge from TopoDS;
590 S : Surface from Geom;
591 L : Location from TopLoc)
592 returns Real
593
594 ---Purpose: Returns the parameters of the vertex on the
595 -- pcurve of the edge on the surface.
596 raises
597 NullObject from Standard;
598
599
600 Parameters(myclass; V : Vertex from TopoDS;
601 F : Face from TopoDS)
602 returns Pnt2d from gp
603
604 ---Purpose: Returns the parameters of the vertex on the face.
605 raises
606 NullObject from Standard;
607
7fd59977 608end Tool;
609