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