0024023: Revamp the OCCT Handle -- ambiguity
[occt.git] / src / BRep / BRep_Builder.cdl
CommitLineData
b311480e 1-- Created on: 1991-07-01
2-- Created by: Remi LEQUETTE
3-- Copyright (c) 1991-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 Builder from BRep inherits Builder from TopoDS
18
19 ---Purpose: A framework providing advanced tolerance control.
ff8178ef 20 -- It is used to build Shapes.
7fd59977 21 -- If tolerance control is required, you are advised to:
22 -- 1. build a default precision for topology, using the
23 -- classes provided in the BRepAPI package
24 -- 2. update the tolerance of the resulting shape.
25 -- Note that only vertices, edges and faces have
26 -- meaningful tolerance control. The tolerance value
27 -- must always comply with the condition that face
28 -- tolerances are more restrictive than edge tolerances
29 -- which are more restrictive than vertex tolerances. In
30 -- other words: Tol(Vertex) >= Tol(Edge) >= Tol(Face).
31 -- Other rules in setting tolerance include:
32 -- - you can open up tolerance but should never restrict it
33 -- - an edge cannot be included within the fusion of the
34 -- tolerance spheres of two vertices
35
36uses
37 Location from TopLoc,
38
39 Shape from TopoDS,
40
41 Vertex from TopoDS,
42 Edge from TopoDS,
43 Face from TopoDS,
44
45 Shape from GeomAbs,
46 Surface from Geom,
47 Curve from Geom,
48
49 Curve from Geom2d,
50
51 Triangulation from Poly,
52 Polygon3D from Poly,
53 Polygon2D from Poly,
54 PolygonOnTriangulation from Poly,
55
56 HArray1OfInteger from TColStd,
57 HArray1OfReal from TColStd,
58
59 Pnt from gp,
60 Pnt2d from gp
61
62raises
63 NullObject from Standard,
64 DomainError from Standard
65
66is
67
68 -----------------------------------------------------------
69 -----------------------------------------------------------
70 -- Face --
71 -----------------------------------------------------------
72 -----------------------------------------------------------
73
74
75
76 -------------------------------------------------------
77 -- Construction
78 -------------------------------------------------------
79
80
81 MakeFace(me; F : out Face from TopoDS);
82 ---C++: inline
83
84 ---Purpose: Makes an undefined Face.
85
86 MakeFace(me; F : out Face from TopoDS;
87 S : Surface from Geom;
88 Tol : Real)
89
90 ---Purpose: Makes a Face with a surface.
91 raises
92 NullObject from Standard; -- If <S> is null.
93
94
95 MakeFace(me; F : out Face from TopoDS;
96 S : Surface from Geom;
97 L : Location from TopLoc;
98 Tol : Real)
99
100 ---Purpose: Makes a Face with a surface and a location.
101 raises
102 NullObject from Standard; -- If <S> is null.
103
104 MakeFace(me; F : out Face from TopoDS;
105 T : Triangulation from Poly)
106
107 ---Purpose: Makes a Face with a triangulation. The triangulation
108 -- is in the same reference system than the TFace.
109 --
110 raises
111 NullObject from Standard; -- If <S> is null.
112
113
114 UpdateFace(me; F : Face from TopoDS;
115 S : Surface from Geom;
116 L : Location from TopLoc;
117 Tol : Real)
118
119 ---Purpose: Updates the face F using the tolerance value Tol,
120 -- surface S and location Location.
121 raises
122 NullObject from Standard; -- If <S> is null.
123
124 UpdateFace(me; F : Face from TopoDS;
125 T : Triangulation from Poly)
126 ---Purpose: Changes a face triangulation.
127 --
128 -- A null Triangulation removes the triangulation.
129 --
130
131 raises
132 NullObject from Standard; -- If <S> is null.
133
134
135 UpdateFace(me; F : Face from TopoDS;
136 Tol : Real);
137 ---Purpose: Updates the face Tolerance.
138
139 -------------------------------------------------------
140 -- Face flags
141 -------------------------------------------------------
142
143
144 NaturalRestriction(me; F : Face from TopoDS;
145 N : Boolean)
146 ---Purpose: Sets the NaturalRestriction flag of the face.
147 raises
148 NullObject from Standard; -- If <F> is null.
149
150
151
152 -----------------------------------------------------------
153 -----------------------------------------------------------
154 -- Edge --
155 -----------------------------------------------------------
156 -----------------------------------------------------------
157
158
159 -------------------------------------------------------
160 -- Edge construction
161 -------------------------------------------------------
162
163 MakeEdge(me; E : out Edge from TopoDS);
164
165 ---Purpose: Makes an undefined Edge (no geometry).
166
167 MakeEdge(me; E : out Edge from TopoDS;
168 C : Curve from Geom;
169 Tol : Real);
170 ---C++: inline
171
172 ---Purpose: Makes an Edge with a curve.
173
174 MakeEdge(me; E : out Edge from TopoDS;
175 C : Curve from Geom;
176 L : Location from TopLoc;
177 Tol : Real);
178 ---C++: inline
179
180 ---Purpose: Makes an Edge with a curve and a location.
181
182 MakeEdge(me; E : out Edge from TopoDS;
183 P : Polygon3D from Poly);
184 ---C++: inline
185
186 ---Purpose: Makes an Edge with a polygon 3d.
187
188 MakeEdge(me; E : out Edge from TopoDS;
189 N : PolygonOnTriangulation from Poly;
190 T : Triangulation from Poly);
191 ---C++: inline
192
193 ---Purpose: makes an Edge polygon on Triangulation.
194
195 MakeEdge(me; E : out Edge from TopoDS;
196 N : PolygonOnTriangulation from Poly;
197 T : Triangulation from Poly;
198 L : Location from TopLoc);
199 ---C++: inline
200
201 ---Purpose: makes an Edge polygon on Triangulation.
202
203 -------------------------------------------------------
204 -- Edge update
205 --
206 -------------------------------------------------------
207
208 UpdateEdge(me; E : Edge from TopoDS;
209 C : Curve from Geom;
210 Tol : Real);
211 ---C++: inline
212
213 ---Purpose: Sets a 3D curve for the edge.
214 -- If <C> is a null handle, remove any existing 3d curve.
215
216 UpdateEdge(me; E : Edge from TopoDS;
217 C : Curve from Geom;
218 L : Location from TopLoc;
219 Tol : Real);
220
221 ---Purpose: Sets a 3D curve for the edge.
222 -- If <C> is a null handle, remove any existing 3d curve.
223
224 UpdateEdge(me; E : Edge from TopoDS;
225 C : Curve from Geom2d;
226 F : Face from TopoDS;
227 Tol : Real);
228 ---C++: inline
229
230 ---Purpose: Sets a pcurve for the edge on the face.
231 -- If <C> is a null handle, remove any existing pcurve.
232
233 UpdateEdge(me; E : Edge from TopoDS;
234 C1,C2 : Curve from Geom2d;
235 F : Face from TopoDS;
236 Tol : Real);
237 ---C++: inline
238
239 ---Purpose: Sets pcurves for the edge on the closed face. If
240 -- <C1> or <C2> is a null handle, remove any existing
241 -- pcurve.
242
243 UpdateEdge(me; E : Edge from TopoDS;
244 C : Curve from Geom2d;
245 S : Surface from Geom;
246 L : Location from TopLoc;
247 Tol : Real);
248
249 ---Purpose: Sets a pcurve for the edge on the face.
250 -- If <C> is a null handle, remove any existing pcurve.
251
252 UpdateEdge(me; E : Edge from TopoDS;
253 C : Curve from Geom2d;
254 S : Surface from Geom;
255 L : Location from TopLoc;
256 Tol : Real;
257 Pf,Pl : Pnt2d from gp);
258
259 ---Purpose: Sets a pcurve for the edge on the face.
260 -- If <C> is a null handle, remove any existing pcurve.
261 -- Sets UV bounds for curve repsentation
262
263 UpdateEdge(me; E : Edge from TopoDS;
264 C1,C2 : Curve from Geom2d;
265 S : Surface from Geom;
266 L : Location from TopLoc;
267 Tol : Real);
268
269 ---Purpose: Sets pcurves for the edge on the closed surface.
270 -- <C1> or <C2> is a null handle, remove any existing
271 -- pcurve.
272
273 UpdateEdge(me; E : Edge from TopoDS;
274 C1,C2 : Curve from Geom2d;
275 S : Surface from Geom;
276 L : Location from TopLoc;
277 Tol : Real;
278 Pf,Pl : Pnt2d from gp);
279
280 ---Purpose: Sets pcurves for the edge on the closed surface.
281 -- <C1> or <C2> is a null handle, remove any existing
282 -- pcurve.
283 -- Sets UV bounds for curve repsentation
284
285 UpdateEdge(me; E : Edge from TopoDS;
286 P : Polygon3D from Poly);
287 ---C++: inline
288
289 ---Purpose: Changes an Edge 3D polygon.
290 -- A null Polygon removes the 3d Polygon.
291
292 UpdateEdge(me; E : Edge from TopoDS;
293 P : Polygon3D from Poly;
294 L : Location from TopLoc);
295
296 ---Purpose: Changes an Edge 3D polygon.
297 -- A null Polygon removes the 3d Polygon.
298
299 UpdateEdge(me; E : Edge from TopoDS;
300 N : PolygonOnTriangulation from Poly;
301 T : Triangulation from Poly);
302 ---C++: inline
303
304 ---Purpose: Changes an Edge polygon on Triangulation.
305
306 UpdateEdge(me; E : Edge from TopoDS;
307 N : PolygonOnTriangulation from Poly;
308 T : Triangulation from Poly;
309 L : Location from TopLoc);
310
311 ---Purpose: Changes an Edge polygon on Triangulation.
312
313 UpdateEdge(me; E : Edge from TopoDS;
314 N1, N2 : PolygonOnTriangulation from Poly;
315 T : Triangulation from Poly);
316 ---C++: inline
317
318 ---Purpose: Changes an Edge polygon on Triangulation.
319
320 UpdateEdge(me; E : Edge from TopoDS;
321 N1, N2 : PolygonOnTriangulation from Poly;
322 T : Triangulation from Poly;
323 L : Location from TopLoc);
324
325 ---Purpose: Changes an Edge polygon on Triangulation.
326
327 UpdateEdge(me; E: Edge from TopoDS;
328 P: Polygon2D from Poly;
329 S: Face from TopoDS)
330
331 ---Purpose: Changes Edge polygon on a face.
332 --
333 --
334 raises
335 NullObject from Standard; -- If <E> is null.
336
337 UpdateEdge(me; E: Edge from TopoDS;
338 P: Polygon2D from Poly;
339 S: Surface from Geom;
340 T: Location from TopLoc)
341
342 ---Purpose: Changes Edge polygon on a face.
343 --
344 --
345 raises
346 NullObject from Standard; -- If <E> is null.
347
348 UpdateEdge(me; E : Edge from TopoDS;
349 P1, P2: Polygon2D from Poly;
350 S : Face from TopoDS)
351
352 ---Purpose: Changes Edge polygons on a face.
353 --
354 -- A null Polygon removes the 2d Polygon.
355 --
356 raises
357 NullObject from Standard; -- If <E> is null.
358
359 UpdateEdge(me; E : Edge from TopoDS;
360 P1, P2: Polygon2D from Poly;
361 S : Surface from Geom;
362 L : Location from TopLoc)
363
364 ---Purpose: Changes Edge polygons on a face.
365 --
366 -- A null Polygon removes the 2d Polygon.
367 --
368 raises
369 NullObject from Standard; -- If <E> is null.
370
371 UpdateEdge(me; E : Edge from TopoDS;
372 Tol : Real);
373
374 ---Purpose: Updates the edge tolerance.
375
376 -------------------------------------------------------
377 -- Edge continuity
378 -------------------------------------------------------
379
380
381 Continuity(me; E : Edge from TopoDS;
382 F1,F2 : Face from TopoDS;
383 C : Shape from GeomAbs)
384 ---Purpose: Sets the geometric continuity on the edge.
385 raises
386 NullObject from Standard; -- If <E>, <F1> or <F2> is Null
387
388
389 Continuity(me; E : Edge from TopoDS;
390 S1,S2 : Surface from Geom;
391 L1,L2 : Location from TopLoc;
392 C : Shape from GeomAbs)
393 ---Purpose: Sets the geometric continuity on the edge.
394 raises
395 NullObject from Standard; -- If <E>, <F1> or <F2> is Null
396
397
398 -------------------------------------------------------
399 -- Edge flags
400 -------------------------------------------------------
401
402
403 SameParameter(me; E : Edge from TopoDS;
404 S : Boolean)
405 ---Purpose: Sets the same parameter flag for the edge <E>.
406 raises
407 NullObject from Standard; -- If <E> is Null
408
409
410 SameRange(me; E : Edge from TopoDS;
411 S : Boolean)
412 ---Purpose: Sets the same range flag for the edge <E>.
413 raises
414 NullObject from Standard; -- If <E> is Null
415
416
417 Degenerated(me; E : Edge from TopoDS;
418 D : Boolean)
419 ---Purpose: Sets the degenerated flag for the edge <E>.
420 raises
421 NullObject from Standard; -- If <E> is Null
422
423 -------------------------------------------------------
424 -- Edge parameter range
425 -------------------------------------------------------
426
427 Range(me; E : Edge from TopoDS;
428 First, Last : Real;
429 Only3d : Boolean from Standard = Standard_False)
430 ---Purpose: Sets the range of the 3d curve if Only3d=TRUE,
431 -- otherwise sets the range to all the representations
432 raises
433 NullObject from Standard; -- If <E> is Null
434
435
436 Range(me; E : Edge from TopoDS;
437 S : Surface from Geom;
438 L : Location from TopLoc;
439 First, Last : Real)
440 ---Purpose: Sets the range of the edge on the pcurve on the
441 -- surface.
442 raises
443 NullObject from Standard; -- If <E> is Null
444
445
446 Range(me; E : Edge from TopoDS;
447 F : Face from TopoDS;
448 First, Last : Real);
449 ---C++: inline
450 ---Purpose: Sets the range of the edge on the pcurve on the face.
451
452
453 -------------------------------------------------------
454 -- Edge transfer of geometry
455 -------------------------------------------------------
456
457 Transfert(me; Ein, Eout : Edge from TopoDS)
458 ---Purpose: Add to <Eout> the geometric representations of
459 -- <Ein>.
460 raises
461 NullObject from Standard; -- If <Ein,Eout> is Null
462
463
464 -----------------------------------------------------------
465 -----------------------------------------------------------
466 -- Vertex --
467 -----------------------------------------------------------
468 -----------------------------------------------------------
469
470
471 -------------------------------------------------------
472 -- Vertex construction from geometry
473 -------------------------------------------------------
474
475 MakeVertex(me; V : out Vertex from TopoDS);
476 ---C++: inline
477
478 ---Purpose: Makes an udefined vertex without geometry.
479
480
481 MakeVertex(me; V : out Vertex from TopoDS;
482 P : Pnt from gp;
483 Tol : Real);
484 ---C++: inline
485
486 ---Purpose: Makes a vertex from a 3D point.
487
488
489 -------------------------------------------------------
490 -- Vertex update
491 -------------------------------------------------------
492
493 UpdateVertex(me; V : Vertex from TopoDS;
494 P : Pnt from gp;
495 Tol : Real)
496
497 ---Purpose: Sets a 3D point on the vertex.
498 raises
499 NullObject from Standard; -- If <V> is Null
500
501
502
503 UpdateVertex(me; V : Vertex from TopoDS;
504 P : Real;
505 E : Edge from TopoDS;
506 Tol : Real)
507
508 ---Purpose: Sets the parameter for the vertex on the edge
509 -- curves.
510 raises
511 NullObject from Standard, -- If <V> or <E> is Null
512 DomainError from Standard; -- If <V> is not the first or last vertex.
513
514
515
516 UpdateVertex(me; V : Vertex from TopoDS;
517 P : Real;
518 E : Edge from TopoDS;
519 F : Face from TopoDS;
520 Tol : Real);
521 ---C++: inline
522
523 ---Purpose: Sets the parameter for the vertex on the edge
524 -- pcurve on the face.
525
526
527 UpdateVertex(me; V : Vertex from TopoDS;
528 P : Real;
529 E : Edge from TopoDS;
530 S : Surface from Geom;
531 L : Location from TopLoc;
532 Tol : Real)
533
534 ---Purpose: Sets the parameter for the vertex on the edge
535 -- pcurve on the surface.
536 raises
537 DomainError from Standard; -- If <V> is not the first or last vertex.
538
539
540 UpdateVertex(me; Ve : Vertex from TopoDS;
541 U,V : Real;
542 F : Face from TopoDS;
543 Tol : Real)
544
545 ---Purpose: Sets the parameters for the vertex on the face.
546 raises
547 NullObject from Standard, -- If <Ve> or <F> is Null
548 DomainError from Standard; -- If <Ve> is not the first or last vertex.
549
550 UpdateVertex(me; V : Vertex from TopoDS;
551 Tol : Real);
552 ---Purpose: Updates the vertex tolerance.
553
554 -------------------------------------------------------
555 -- Vertex transfer of parameters
556 -------------------------------------------------------
557
558 Transfert(me; Ein, Eout : Edge from TopoDS;
559 Vin, Vout : Vertex from TopoDS)
560 ---Purpose: Transfert the parameters of Vin on Ein as the
561 -- parameter of Vout on Eout.
562 raises
563 NullObject from Standard;
564
565end Builder;