1 -- Created on: 1991-07-01
2 -- Created by: Remi LEQUETTE
3 -- Copyright (c) 1991-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and / or modify it
9 -- under the terms of the GNU Lesser General Public version 2.1 as published
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class Builder from BRep inherits Builder from TopoDS
19 ---Purpose: A framework providing advanced tolerance control.
20 -- If tolerance control is required, you are advised to:
21 -- 1. build a default precision for topology, using the
22 -- classes provided in the BRepAPI package
23 -- 2. update the tolerance of the resulting shape.
24 -- Note that only vertices, edges and faces have
25 -- meaningful tolerance control. The tolerance value
26 -- must always comply with the condition that face
27 -- tolerances are more restrictive than edge tolerances
28 -- which are more restrictive than vertex tolerances. In
29 -- other words: Tol(Vertex) >= Tol(Edge) >= Tol(Face).
30 -- Other rules in setting tolerance include:
31 -- - you can open up tolerance but should never restrict it
32 -- - an edge cannot be included within the fusion of the
33 -- tolerance spheres of two vertices
50 Triangulation from Poly,
53 PolygonOnTriangulation from Poly,
55 HArray1OfInteger from TColStd,
56 HArray1OfReal from TColStd,
62 NullObject from Standard,
63 DomainError from Standard
67 -----------------------------------------------------------
68 -----------------------------------------------------------
70 -----------------------------------------------------------
71 -----------------------------------------------------------
75 -------------------------------------------------------
77 -------------------------------------------------------
80 MakeFace(me; F : out Face from TopoDS);
83 ---Purpose: Makes an undefined Face.
85 MakeFace(me; F : out Face from TopoDS;
86 S : Surface from Geom;
89 ---Purpose: Makes a Face with a surface.
91 NullObject from Standard; -- If <S> is null.
94 MakeFace(me; F : out Face from TopoDS;
95 S : Surface from Geom;
96 L : Location from TopLoc;
99 ---Purpose: Makes a Face with a surface and a location.
101 NullObject from Standard; -- If <S> is null.
103 MakeFace(me; F : out Face from TopoDS;
104 T : Triangulation from Poly)
106 ---Purpose: Makes a Face with a triangulation. The triangulation
107 -- is in the same reference system than the TFace.
110 NullObject from Standard; -- If <S> is null.
113 UpdateFace(me; F : Face from TopoDS;
114 S : Surface from Geom;
115 L : Location from TopLoc;
118 ---Purpose: Updates the face F using the tolerance value Tol,
119 -- surface S and location Location.
121 NullObject from Standard; -- If <S> is null.
123 UpdateFace(me; F : Face from TopoDS;
124 T : Triangulation from Poly)
125 ---Purpose: Changes a face triangulation.
127 -- A null Triangulation removes the triangulation.
131 NullObject from Standard; -- If <S> is null.
134 UpdateFace(me; F : Face from TopoDS;
136 ---Purpose: Updates the face Tolerance.
138 -------------------------------------------------------
140 -------------------------------------------------------
143 NaturalRestriction(me; F : Face from TopoDS;
145 ---Purpose: Sets the NaturalRestriction flag of the face.
147 NullObject from Standard; -- If <F> is null.
151 -----------------------------------------------------------
152 -----------------------------------------------------------
154 -----------------------------------------------------------
155 -----------------------------------------------------------
158 -------------------------------------------------------
160 -------------------------------------------------------
162 MakeEdge(me; E : out Edge from TopoDS);
164 ---Purpose: Makes an undefined Edge (no geometry).
166 MakeEdge(me; E : out Edge from TopoDS;
171 ---Purpose: Makes an Edge with a curve.
173 MakeEdge(me; E : out Edge from TopoDS;
175 L : Location from TopLoc;
179 ---Purpose: Makes an Edge with a curve and a location.
181 MakeEdge(me; E : out Edge from TopoDS;
182 P : Polygon3D from Poly);
185 ---Purpose: Makes an Edge with a polygon 3d.
187 MakeEdge(me; E : out Edge from TopoDS;
188 N : PolygonOnTriangulation from Poly;
189 T : Triangulation from Poly);
192 ---Purpose: makes an Edge polygon on Triangulation.
194 MakeEdge(me; E : out Edge from TopoDS;
195 N : PolygonOnTriangulation from Poly;
196 T : Triangulation from Poly;
197 L : Location from TopLoc);
200 ---Purpose: makes an Edge polygon on Triangulation.
202 -------------------------------------------------------
205 -------------------------------------------------------
207 UpdateEdge(me; E : Edge from TopoDS;
212 ---Purpose: Sets a 3D curve for the edge.
213 -- If <C> is a null handle, remove any existing 3d curve.
215 UpdateEdge(me; E : Edge from TopoDS;
217 L : Location from TopLoc;
220 ---Purpose: Sets a 3D curve for the edge.
221 -- If <C> is a null handle, remove any existing 3d curve.
223 UpdateEdge(me; E : Edge from TopoDS;
224 C : Curve from Geom2d;
225 F : Face from TopoDS;
229 ---Purpose: Sets a pcurve for the edge on the face.
230 -- If <C> is a null handle, remove any existing pcurve.
232 UpdateEdge(me; E : Edge from TopoDS;
233 C1,C2 : Curve from Geom2d;
234 F : Face from TopoDS;
238 ---Purpose: Sets pcurves for the edge on the closed face. If
239 -- <C1> or <C2> is a null handle, remove any existing
242 UpdateEdge(me; E : Edge from TopoDS;
243 C : Curve from Geom2d;
244 S : Surface from Geom;
245 L : Location from TopLoc;
248 ---Purpose: Sets a pcurve for the edge on the face.
249 -- If <C> is a null handle, remove any existing pcurve.
251 UpdateEdge(me; E : Edge from TopoDS;
252 C : Curve from Geom2d;
253 S : Surface from Geom;
254 L : Location from TopLoc;
256 Pf,Pl : Pnt2d from gp);
258 ---Purpose: Sets a pcurve for the edge on the face.
259 -- If <C> is a null handle, remove any existing pcurve.
260 -- Sets UV bounds for curve repsentation
262 UpdateEdge(me; E : Edge from TopoDS;
263 C1,C2 : Curve from Geom2d;
264 S : Surface from Geom;
265 L : Location from TopLoc;
268 ---Purpose: Sets pcurves for the edge on the closed surface.
269 -- <C1> or <C2> is a null handle, remove any existing
272 UpdateEdge(me; E : Edge from TopoDS;
273 C1,C2 : Curve from Geom2d;
274 S : Surface from Geom;
275 L : Location from TopLoc;
277 Pf,Pl : Pnt2d from gp);
279 ---Purpose: Sets pcurves for the edge on the closed surface.
280 -- <C1> or <C2> is a null handle, remove any existing
282 -- Sets UV bounds for curve repsentation
284 UpdateEdge(me; E : Edge from TopoDS;
285 P : Polygon3D from Poly);
288 ---Purpose: Changes an Edge 3D polygon.
289 -- A null Polygon removes the 3d Polygon.
291 UpdateEdge(me; E : Edge from TopoDS;
292 P : Polygon3D from Poly;
293 L : Location from TopLoc);
295 ---Purpose: Changes an Edge 3D polygon.
296 -- A null Polygon removes the 3d Polygon.
298 UpdateEdge(me; E : Edge from TopoDS;
299 N : PolygonOnTriangulation from Poly;
300 T : Triangulation from Poly);
303 ---Purpose: Changes an Edge polygon on Triangulation.
305 UpdateEdge(me; E : Edge from TopoDS;
306 N : PolygonOnTriangulation from Poly;
307 T : Triangulation from Poly;
308 L : Location from TopLoc);
310 ---Purpose: Changes an Edge polygon on Triangulation.
312 UpdateEdge(me; E : Edge from TopoDS;
313 N1, N2 : PolygonOnTriangulation from Poly;
314 T : Triangulation from Poly);
317 ---Purpose: Changes an Edge polygon on Triangulation.
319 UpdateEdge(me; E : Edge from TopoDS;
320 N1, N2 : PolygonOnTriangulation from Poly;
321 T : Triangulation from Poly;
322 L : Location from TopLoc);
324 ---Purpose: Changes an Edge polygon on Triangulation.
326 UpdateEdge(me; E: Edge from TopoDS;
327 P: Polygon2D from Poly;
330 ---Purpose: Changes Edge polygon on a face.
334 NullObject from Standard; -- If <E> is null.
336 UpdateEdge(me; E: Edge from TopoDS;
337 P: Polygon2D from Poly;
338 S: Surface from Geom;
339 T: Location from TopLoc)
341 ---Purpose: Changes Edge polygon on a face.
345 NullObject from Standard; -- If <E> is null.
347 UpdateEdge(me; E : Edge from TopoDS;
348 P1, P2: Polygon2D from Poly;
349 S : Face from TopoDS)
351 ---Purpose: Changes Edge polygons on a face.
353 -- A null Polygon removes the 2d Polygon.
356 NullObject from Standard; -- If <E> is null.
358 UpdateEdge(me; E : Edge from TopoDS;
359 P1, P2: Polygon2D from Poly;
360 S : Surface from Geom;
361 L : Location from TopLoc)
363 ---Purpose: Changes Edge polygons on a face.
365 -- A null Polygon removes the 2d Polygon.
368 NullObject from Standard; -- If <E> is null.
370 UpdateEdge(me; E : Edge from TopoDS;
373 ---Purpose: Updates the edge tolerance.
375 -------------------------------------------------------
377 -------------------------------------------------------
380 Continuity(me; E : Edge from TopoDS;
381 F1,F2 : Face from TopoDS;
382 C : Shape from GeomAbs)
383 ---Purpose: Sets the geometric continuity on the edge.
385 NullObject from Standard; -- If <E>, <F1> or <F2> is Null
388 Continuity(me; E : Edge from TopoDS;
389 S1,S2 : Surface from Geom;
390 L1,L2 : Location from TopLoc;
391 C : Shape from GeomAbs)
392 ---Purpose: Sets the geometric continuity on the edge.
394 NullObject from Standard; -- If <E>, <F1> or <F2> is Null
397 -------------------------------------------------------
399 -------------------------------------------------------
402 SameParameter(me; E : Edge from TopoDS;
404 ---Purpose: Sets the same parameter flag for the edge <E>.
406 NullObject from Standard; -- If <E> is Null
409 SameRange(me; E : Edge from TopoDS;
411 ---Purpose: Sets the same range flag for the edge <E>.
413 NullObject from Standard; -- If <E> is Null
416 Degenerated(me; E : Edge from TopoDS;
418 ---Purpose: Sets the degenerated flag for the edge <E>.
420 NullObject from Standard; -- If <E> is Null
422 -------------------------------------------------------
423 -- Edge parameter range
424 -------------------------------------------------------
426 Range(me; E : Edge from TopoDS;
428 Only3d : Boolean from Standard = Standard_False)
429 ---Purpose: Sets the range of the 3d curve if Only3d=TRUE,
430 -- otherwise sets the range to all the representations
432 NullObject from Standard; -- If <E> is Null
435 Range(me; E : Edge from TopoDS;
436 S : Surface from Geom;
437 L : Location from TopLoc;
439 ---Purpose: Sets the range of the edge on the pcurve on the
442 NullObject from Standard; -- If <E> is Null
445 Range(me; E : Edge from TopoDS;
446 F : Face from TopoDS;
449 ---Purpose: Sets the range of the edge on the pcurve on the face.
452 -------------------------------------------------------
453 -- Edge transfer of geometry
454 -------------------------------------------------------
456 Transfert(me; Ein, Eout : Edge from TopoDS)
457 ---Purpose: Add to <Eout> the geometric representations of
460 NullObject from Standard; -- If <Ein,Eout> is Null
463 -----------------------------------------------------------
464 -----------------------------------------------------------
466 -----------------------------------------------------------
467 -----------------------------------------------------------
470 -------------------------------------------------------
471 -- Vertex construction from geometry
472 -------------------------------------------------------
474 MakeVertex(me; V : out Vertex from TopoDS);
477 ---Purpose: Makes an udefined vertex without geometry.
480 MakeVertex(me; V : out Vertex from TopoDS;
485 ---Purpose: Makes a vertex from a 3D point.
488 -------------------------------------------------------
490 -------------------------------------------------------
492 UpdateVertex(me; V : Vertex from TopoDS;
496 ---Purpose: Sets a 3D point on the vertex.
498 NullObject from Standard; -- If <V> is Null
502 UpdateVertex(me; V : Vertex from TopoDS;
504 E : Edge from TopoDS;
507 ---Purpose: Sets the parameter for the vertex on the edge
510 NullObject from Standard, -- If <V> or <E> is Null
511 DomainError from Standard; -- If <V> is not the first or last vertex.
515 UpdateVertex(me; V : Vertex from TopoDS;
517 E : Edge from TopoDS;
518 F : Face from TopoDS;
522 ---Purpose: Sets the parameter for the vertex on the edge
523 -- pcurve on the face.
526 UpdateVertex(me; V : Vertex from TopoDS;
528 E : Edge from TopoDS;
529 S : Surface from Geom;
530 L : Location from TopLoc;
533 ---Purpose: Sets the parameter for the vertex on the edge
534 -- pcurve on the surface.
536 DomainError from Standard; -- If <V> is not the first or last vertex.
539 UpdateVertex(me; Ve : Vertex from TopoDS;
541 F : Face from TopoDS;
544 ---Purpose: Sets the parameters for the vertex on the face.
546 NullObject from Standard, -- If <Ve> or <F> is Null
547 DomainError from Standard; -- If <Ve> is not the first or last vertex.
549 UpdateVertex(me; V : Vertex from TopoDS;
551 ---Purpose: Updates the vertex tolerance.
553 -------------------------------------------------------
554 -- Vertex transfer of parameters
555 -------------------------------------------------------
557 Transfert(me; Ein, Eout : Edge from TopoDS;
558 Vin, Vout : Vertex from TopoDS)
559 ---Purpose: Transfert the parameters of Vin on Ein as the
560 -- parameter of Vout on Eout.
562 NullObject from Standard;