0024023: Revamp the OCCT Handle -- ambiguity
[occt.git] / src / BOPTools / BOPTools_AlgoTools.cdl
CommitLineData
4e57c75e 1-- Created by: Peter KURNEV
973c2be1 2-- Copyright (c) 2010-2014 OPEN CASCADE SAS
4e57c75e 3-- Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
4-- Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
5-- EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6--
973c2be1 7-- This file is part of Open CASCADE Technology software library.
4e57c75e 8--
d5f74e42 9-- This library is free software; you can redistribute it and/or modify it under
10-- the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 11-- by the Free Software Foundation, with special exception defined in the file
12-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
13-- distribution for complete text of the license and disclaimer of any warranty.
4e57c75e 14--
973c2be1 15-- Alternatively, this file may be used under the terms of Open CASCADE
16-- commercial license or contractual agreement.
4e57c75e 17
18class AlgoTools from BOPTools
19 ---Purpose:
20
21uses
22 Pnt from gp,
23 Pnt2d from gp,
24 Dir from gp,
25 Plane from Geom,
26 State from TopAbs,
27 ShapeEnum from TopAbs,
28 Curve from IntTools,
29 Shape from TopoDS,
30 Vertex from TopoDS,
31 Edge from TopoDS,
32 Face from TopoDS,
30ecd5f8 33 Wire from TopoDS,
34 Shell from TopoDS,
4e57c75e 35 Solid from TopoDS,
e98e3990 36 Curve from Geom,
37 Curve from Geom2d,
38 Surface from Geom,
4e57c75e 39 --
40 BaseAllocator from BOPCol,
41 ListOfShape from BOPCol,
42 IndexedMapOfShape from BOPCol,
43 IndexedDataMapOfShapeListOfShape from BOPCol,
1e143abb 44 Context from IntTools,
4e57c75e 45 ListOfCoupleOfShape from BOPTools,
46 Range from IntTools
47
48--raises
49
50is
51 ComputeVV(myclass;
c26b5a34 52 aV1:Vertex from TopoDS;
53 aP2:Pnt from gp;
54 aTolP2:Real from Standard)
55 returns Integer from Standard;
4e57c75e 56
57 ComputeVV(myclass;
c26b5a34 58 aV1:Vertex from TopoDS;
59 aV2:Vertex from TopoDS)
60 returns Integer from Standard;
4e57c75e 61
62 MakeVertex (myclass;
c26b5a34 63 aLV: out ListOfShape from BOPCol;
64 aV : out Vertex from TopoDS);
4e57c75e 65
66 MakeEdge(myclass;
c26b5a34 67 theCurve:Curve from IntTools;
68 theV1: Vertex from TopoDS;
69 theT1: Real from Standard;
70 theV2: Vertex from TopoDS;
71 theT2: Real from Standard;
72 theTolR3D: Real from Standard;
73 theE :out Edge from TopoDS);
4e57c75e 74
75 MakePCurve(myclass;
c26b5a34 76 theE : Edge from TopoDS;
77 theF1: Face from TopoDS;
78 theF2: Face from TopoDS;
79 theCurve:Curve from IntTools;
80 thePC1:Boolean from Standard;
81 thePC2:Boolean from Standard);
4e57c75e 82
83 MakeContainer(myclass;
c26b5a34 84 theType:ShapeEnum from TopAbs;
85 theShape:out Shape from TopoDS);
4e57c75e 86
87
88 IsHole(myclass;
c26b5a34 89 aW: Shape from TopoDS;
90 aF: Shape from TopoDS)
91 returns Boolean from Standard;
4e57c75e 92
93 IsSplitToReverse(myclass;
c26b5a34 94 theSplit : Shape from TopoDS;
95 theShape : Shape from TopoDS;
1e143abb 96 theContext:out Context from IntTools)
4e57c75e 97 ---Purpose: Returns True if the shape theSplit has opposite
98 -- direction than theShape
99 -- theContext - cashed geometrical tools
100 returns Boolean from Standard;
101
102 IsSplitToReverse(myclass;
c26b5a34 103 theSplit : Face from TopoDS;
104 theShape : Face from TopoDS;
1e143abb 105 theContext:out Context from IntTools)
4e57c75e 106 ---Purpose: Returns True if normal direction of the face
107 -- theShape is not the same as for the face
108 -- theSplit
109 -- theContext - cashed geometrical tools
110 returns Boolean from Standard;
111
112 IsSplitToReverse (myclass;
c26b5a34 113 aE1: Edge from TopoDS;
114 aE2: Edge from TopoDS;
1e143abb 115 aContext:out Context from IntTools)
c26b5a34 116 returns Boolean from Standard;
4e57c75e 117
118
119 AreFacesSameDomain(myclass;
c26b5a34 120 theF1: Face from TopoDS;
121 theF2: Face from TopoDS;
1e143abb 122 theContext:out Context from IntTools)
c26b5a34 123 returns Boolean from Standard;
4e57c75e 124
125 CheckSameGeom (myclass;
c26b5a34 126 theF1: Face from TopoDS;
127 theF2: Face from TopoDS;
1e143abb 128 theContext:out Context from IntTools)
c26b5a34 129 returns Boolean from Standard;
4e57c75e 130
131 Sense (myclass;
c26b5a34 132 theF1: Face from TopoDS;
133 theF2: Face from TopoDS)
134 returns Integer from Standard;
4e57c75e 135
136 GetEdgeOff (myclass;
c26b5a34 137 theEdge :Edge from TopoDS;
138 theFace :Face from TopoDS;
139 theEdgeOff :out Edge from TopoDS)
4e57c75e 140 ---Purpose: Returns True if the face theFace contains
141 -- the edge theEdge but with opposite orientation.
142 -- If the method returns True theEdgeOff is the
143 -- edge founded
144 returns Boolean from Standard;
145
146 GetFaceOff(myclass;
c26b5a34 147 theEdge :Edge from TopoDS;
148 theFace :Face from TopoDS;
149 theLCEF :out ListOfCoupleOfShape from BOPTools;
150 theFaceOff :out Face from TopoDS;
1e143abb 151 theContext :out Context from IntTools)
c26b5a34 152 returns Boolean from Standard;
744511c8 153
4e57c75e 154 ---Purpose: For the face theFace and its edge theEdge
155 -- finds the face suitable to produce shell.
156 -- theLCEF - set of faces to search. All faces
157 -- from theLCEF must share edge theEdge
158
159 IsInternalFace(myclass;
c26b5a34 160 theFace :Face from TopoDS;
161 theEdge :Edge from TopoDS;
162 theFace1 :Face from TopoDS;
163 theFace2 :Face from TopoDS;
1e143abb 164 theContext:out Context from IntTools)
4e57c75e 165 ---Purpose: Returns True if the face theFace is inside of the
166 -- couple of faces theFace1, theFace2.
167 -- The faces theFace, theFace1, theFace2 must
168 -- share the edge theEdge
744511c8 169 returns Integer from Standard;
4e57c75e 170
171 IsInternalFace(myclass;
c26b5a34 172 theFace :Face from TopoDS;
173 theEdge :Edge from TopoDS;
174 theLF :out ListOfShape from BOPCol;
1e143abb 175 theContext:out Context from IntTools)
4e57c75e 176 ---Purpose: Returns True if the face theFace is inside of the
177 -- appropriate couple of faces (from the set theLF) .
178 -- The faces of the set theLF and theFace must
179 -- share the edge theEdge
744511c8 180 returns Integer from Standard;
4e57c75e 181
182 IsInternalFace(myclass;
c26b5a34 183 theFace :Face from TopoDS;
184 theSolid :Solid from TopoDS;
185 theMEF :out IndexedDataMapOfShapeListOfShape from BOPCol;
186 theTol :Real from Standard;
1e143abb 187 theContext:out Context from IntTools)
4e57c75e 188 ---Purpose: Returns True if the face theFace is inside the
189 -- solid theSolid.
190 -- theMEF - Map Edge/Faces for theSolid
191 -- theTol - value of precision of computation
192 -- theContext- cahed geometrical tools
744511c8 193 returns Integer from Standard;
4e57c75e 194
195
196 GetEdgeOnFace (myclass;
c26b5a34 197 theEdge :Edge from TopoDS;
198 theFace :Face from TopoDS;
199 theEdgeOnF :out Edge from TopoDS)
4e57c75e 200 ---Purpose: For the face theFace gets the edge theEdgeOnF
201 -- that is the same as theEdge
202 -- Returns True if such edge exists
203 -- Returns False if there is no such edge
204 returns Boolean from Standard;
205
206 ComputeState(myclass;
c26b5a34 207 thePoint :Pnt from gp;
208 theSolid :Solid from TopoDS;
209 theTol :Real from Standard;
1e143abb 210 theContext:out Context from IntTools)
4e57c75e 211 ---Purpose: Computes the 3-D state of the point thePoint
212 -- toward solid theSolid.
213 -- theTol - value of precision of computation
214 -- theContext- cahed geometrical tools
215 -- Returns 3-D state.
216 returns State from TopAbs;
217
218 ComputeState(myclass;
c26b5a34 219 theVertex:Vertex from TopoDS;
220 theSolid :Solid from TopoDS;
221 theTol :Real from Standard;
1e143abb 222 theContext:out Context from IntTools)
4e57c75e 223 ---Purpose: Computes the 3-D state of the vertex theVertex
224 -- toward solid theSolid.
225 -- theTol - value of precision of computation
226 -- theContext- cahed geometrical tools
227 -- Returns 3-D state.
228 returns State from TopAbs;
229
230 ComputeState(myclass;
c26b5a34 231 theEdge :Edge from TopoDS;
232 theSolid :Solid from TopoDS;
233 theTol :Real from Standard;
1e143abb 234 theContext:out Context from IntTools)
4e57c75e 235 ---Purpose: Computes the 3-D state of the edge theEdge
236 -- toward solid theSolid.
237 -- theTol - value of precision of computation
238 -- theContext- cahed geometrical tools
239 -- Returns 3-D state.
240 returns State from TopAbs;
241
242 ComputeState(myclass;
c26b5a34 243 theFace :Face from TopoDS;
244 theSolid :Solid from TopoDS;
245 theTol :Real from Standard;
246 theBounds:out IndexedMapOfShape from BOPCol;
1e143abb 247 theContext:out Context from IntTools)
4e57c75e 248 ---Purpose: Computes the 3-D state of the face theFace
249 -- toward solid theSolid.
250 -- theTol - value of precision of computation
251 -- theBounds - set of edges of theFace to avoid
252 -- theContext- cahed geometrical tools
253 -- Returns 3-D state.
254 returns State from TopAbs;
255
256 ComputeStateByOnePoint(myclass;
c26b5a34 257 theShape :Shape from TopoDS;
258 theSolid :Solid from TopoDS;
259 theTol :Real from Standard;
1e143abb 260 theContext:out Context from IntTools)
4e57c75e 261 ---Purpose: Computes the 3-D state of the shape theShape
262 -- toward solid theSolid.
263 -- theTol - value of precision of computation
264 -- theContext- cahed geometrical tools
265 -- Returns 3-D state.
266 returns State from TopAbs;
267
268 MakeConnexityBlock(myclass;
c26b5a34 269 theLS :out ListOfShape from BOPCol;
270 theMapAvoid:out IndexedMapOfShape from BOPCol;
271 theLSCB :out ListOfShape from BOPCol;
272 theAllocator:BaseAllocator from BOPCol);
4e57c75e 273 ---Purpose: For the list of faces theLS build block
274 -- theLSCB in terms of connexity by edges
275 -- theMapAvoid - set of edges to avoid for
276 -- the treatment
277
278 MakeConnexityBlocks(myclass;
c26b5a34 279 theS :Shape from TopoDS;
280 theType1 :ShapeEnum from TopAbs;
281 theType2 :ShapeEnum from TopAbs;
282 theLCB :out ListOfShape from BOPCol);
4e57c75e 283 ---Purpose: For the compound theS build the blocks
284 -- theLCB (as list of compounds)
285 -- in terms of connexity by the shapes of theType
286
287 OrientFacesOnShell (myclass;
c26b5a34 288 theS :out Shape from TopoDS);
4e57c75e 289
290 CorrectTolerances (myclass;
c26b5a34 291 theS: Shape from TopoDS;
292 theTolMax: Real from Standard =0.0001;
293 theRunParallel: Boolean from Standard=Standard_False);
294
4e57c75e 295 ---Purpose:
e98e3990 296 -- Provides valid values of tolerances for the shape <theS>
297 -- <theTolMax> is max value of the tolerance that can be
298 -- accepted for correction. If real value of the tolerance
299 -- will be greater than <aTolMax>, the correction does not
300 -- perform.
301
4e57c75e 302 CorrectCurveOnSurface (myclass;
c26b5a34 303 theS: Shape from TopoDS;
304 theTolMax: Real from Standard =0.0001;
305 theRunParallel: Boolean from Standard=Standard_False);
4e57c75e 306 ---Purpose:
e98e3990 307 -- Provides valid values of tolerances for the shape <theS>
308 -- in terms of BRepCheck_InvalidCurveOnSurface.
309
4e57c75e 310 CorrectPointOnCurve (myclass;
c26b5a34 311 theS: Shape from TopoDS;
312 theTolMax: Real from Standard =0.0001;
313 theRunParallel: Boolean from Standard=Standard_False);
4e57c75e 314 ---Purpose:
e98e3990 315 -- Provides valid values of tolerances for the shape <theS>
316 -- in terms of BRepCheck_InvalidPointOnCurve.
df017cc9 317
4e57c75e 318 MakeNewVertex (myclass;
c26b5a34 319 aP1 : Pnt from gp;
320 aTol: Real from Standard;
321 aNewVertex:out Vertex from TopoDS);
4e57c75e 322 ---Purpose:
e98e3990 323 -- Make a vertex using 3D-point <aP1> and 3D-tolerance value <aTol>
324
4e57c75e 325 MakeNewVertex (myclass;
326 aV1,aV2: Vertex from TopoDS;
327 aNewVertex:out Vertex from TopoDS);
328 ---Purpose:
e98e3990 329 -- Make a vertex using couple of vertices <aV1, aV2>
330
4e57c75e 331 MakeNewVertex (myclass;
c26b5a34 332 aE1: Edge from TopoDS;
333 aP1: Real from Standard;
334 aE2: Edge from TopoDS;
335 aP2: Real from Standard;
336 aNewVertex:out Vertex from TopoDS);
4e57c75e 337 ---Purpose:
e98e3990 338 -- Make a vertex in place of intersection between two edges
339 -- <aE1, aE2> with parameters <aP1, aP2>
340
4e57c75e 341 MakeNewVertex (myclass;
c26b5a34 342 aE1: Edge from TopoDS;
343 aP1: Real from Standard;
344 aF2: Face from TopoDS;
345 aNewVertex:out Vertex from TopoDS);
4e57c75e 346 ---Purpose:
e98e3990 347 -- Make a vertex in place of intersection between the edge <aE1>
348 -- with parameter <aP1> and the face <aF2>
349
4e57c75e 350 PointOnEdge (myclass;
c26b5a34 351 aEdge: Edge from TopoDS;
352 aPrm: Real from Standard;
353 aP:out Pnt from gp);
4e57c75e 354 ---Purpose:
e98e3990 355 -- Compute a 3D-point on the edge <aEdge> at parameter <aPrm>
356
4e57c75e 357 MakeSplitEdge (myclass;
c26b5a34 358 aE1: Edge from TopoDS;
359 aV1: Vertex from TopoDS;
360 aP1: Real from Standard;
361 aV2: Vertex from TopoDS;
362 aP2: Real from Standard;
363 aNewEdge:out Edge from TopoDS);
4e57c75e 364 ---Purpose:
e98e3990 365 -- Make the edge from base edge <aE1> and two vertices <aV1,aV2>
366 -- at parameters <aP1,aP2>
367
4e57c75e 368 MakeSectEdge (myclass;
c26b5a34 369 aIC: Curve from IntTools;
370 aV1: Vertex from TopoDS;
371 aP1: Real from Standard;
372 aV2: Vertex from TopoDS;
373 aP2: Real from Standard;
374 aNewEdge:out Edge from TopoDS);
4e57c75e 375 ---Purpose:
e98e3990 376 -- Make the edge from 3D-Curve <aIC> and two vertices <aV1,aV2>
377 -- at parameters <aP1,aP2>
378
4e57c75e 379 UpdateVertex (myclass;
c26b5a34 380 aIC: Curve from IntTools;
381 aT : Real from Standard;
382 aV : Vertex from TopoDS);
4e57c75e 383 ---Purpose:
e98e3990 384 -- Update the tolerance value for vertex <aV>
385 -- taking into account the fact that <aV> lays on
386 -- the curve <aIC>
387
4e57c75e 388 UpdateVertex (myclass;
c26b5a34 389 aE : Edge from TopoDS;
390 aT : Real from Standard;
391 aV : Vertex from TopoDS);
4e57c75e 392 ---Purpose:
e98e3990 393 -- Update the tolerance value for vertex <aV>
394 -- taking into account the fact that <aV> lays on
395 -- the edge <aE>
396
4e57c75e 397 UpdateVertex (myclass;
c26b5a34 398 aVF : Vertex from TopoDS;
399 aVN : Vertex from TopoDS);
4e57c75e 400 ---Purpose:
e98e3990 401 -- Update the tolerance value for vertex <aVN>
402 -- taking into account the fact that <aVN> should
403 -- cover tolerance zone of <aVF>
4e57c75e 404
405 CorrectRange (myclass;
c26b5a34 406 aE1: Edge from TopoDS;
407 aE2: Edge from TopoDS;
408 aSR: Range from IntTools;
409 aNewSR:out Range from IntTools);
4e57c75e 410 ---Purpose:
e98e3990 411 -- Correct shrunk range <aSR> taking into account 3D-curve
412 -- resolution and corresp. tolerances' values of <aE1>, <aE2>
413
4e57c75e 414 CorrectRange (myclass;
c26b5a34 415 aE: Edge from TopoDS;
416 aF: Face from TopoDS;
417 aSR: Range from IntTools;
418 aNewSR:out Range from IntTools);
4e57c75e 419 ---Purpose:
e98e3990 420 -- Correct shrunk range <aSR> taking into account 3D-curve
421 -- resolution and corresp. tolerances' values of <aE>, <aF>
4e57c75e 422
423 IsBlockInOnFace(myclass;
c26b5a34 424 aShR : Range from IntTools;
425 aF : Face from TopoDS;
426 aE : Edge from TopoDS;
1e143abb 427 aContext:out Context from IntTools)
c26b5a34 428 returns Boolean from Standard;
4e57c75e 429 ---Purpose:
e98e3990 430 -- Returns TRUE if PaveBlock <aPB> lays on the face <aF>, i.e
431 -- the <PB> is IN or ON in 2D of <aF>
4e57c75e 432
4e57c75e 433 IsMicroEdge(myclass;
c26b5a34 434 theEdge : Edge from TopoDS;
1e143abb 435 theContext : Context from IntTools)
c26b5a34 436 returns Boolean from Standard;
4e57c75e 437 ---Purpose:
e98e3990 438 -- Checks if it is possible to compute shrunk range for the edge <aE>.
439 --
4e57c75e 440
441 CorrectShapeTolerances (myclass;
c26b5a34 442 theS: Shape from TopoDS;
443 theRunParallel: Boolean from Standard=Standard_False);
4e57c75e 444 ---Purpose:
e98e3990 445 -- Corrects tolerance values of the sub-shapes of the shape <theS> if needed.
4e57c75e 446
447 Dimension(myclass;
c26b5a34 448 theS:Shape from TopoDS)
449 returns Integer from Standard;
4e57c75e 450 ---Purpose:
e98e3990 451 -- Retutns dimension of the shape <theS>.
30ecd5f8 452
453 IsOpenShell(myclass;
c26b5a34 454 theShell:Shell from TopoDS)
455 returns Boolean from Standard;
456 ---Purpose: Returns true if the shell <theShell> is open
30ecd5f8 457
458 IsInvertedSolid(myclass;
c26b5a34 459 theSolid:Solid from TopoDS)
460 returns Boolean from Standard;
e98e3990 461 ---Purpose: Returns true if the solid <theSolid> is inverted
e98e3990 462
463 ComputeTolerance(myclass;
464 theFace : Face from TopoDS;
465 theEdge : Edge from TopoDS;
466 theMaxDist : out Real from Standard;
467 theMaxPar : out Real from Standard)
468 returns Boolean from Standard;
469 ---Purpose:
470 -- Computes the necessary value of the tolerance for the edge
471
4e57c75e 472end AlgoTools;