0023024: Update headers of OCCT files
[occt.git] / src / BOPTools / BOPTools_PaveFiller.cdl
CommitLineData
b311480e 1-- Created on: 2001-02-08
2-- Created by: Peter KURNEV
3-- Copyright (c) 2001-2012 OPEN CASCADE SAS
4--
5-- The content of this file is subject to the Open CASCADE Technology Public
6-- License Version 6.5 (the "License"). You may not use the content of this file
7-- except in compliance with the License. Please obtain a copy of the License
8-- at http://www.opencascade.org and read it completely before using this file.
9--
10-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12--
13-- The Original Code and all software distributed under the License is
14-- distributed on an "AS IS" basis, without warranty of any kind, and the
15-- Initial Developer hereby disclaims all such warranties, including without
16-- limitation, any warranties of merchantability, fitness for a particular
17-- purpose or non-infringement. Please see the License for the specific terms
18-- and conditions governing the rights and limitations under the License.
19
7fd59977 20
21
22class PaveFiller from BOPTools
23
24 ---Purpose: The algorithm that provides
25 --- 1. creation of the data structure (DS)
26 --- 2. creation of the interferences' pool
27 --- 3. invocation of Perform() to fill the DS
28 ---
29 ---
30uses
31
32 PShapesDataStructure from BooleanOperations,
33
34 InterferencePool from BOPTools,
35 PInterferencePool from BOPTools,
36 PavePool from BOPTools,
37 CommonBlockPool from BOPTools,
38 SplitShapesPool from BOPTools,
39
40 Pave from BOPTools,
41 PaveBlock from BOPTools,
42 PaveSet from BOPTools,
43 Curve from BOPTools,
44 SSInterference from BOPTools,
45 ListOfPaveBlock from BOPTools,
46 IteratorOfCoupleOfShape from BOPTools,
47 SSInterference from BOPTools,
48 SSIntersectionAttribute from BOPTools,
49 ShrunkRange from IntTools,
50 Context from IntTools,
51
52 ShapeEnum from TopAbs,
53 ListOfInteger from TColStd,
54 IndexedMapOfInteger from TColStd,
55
56 Pnt from gp,
57 Vertex from TopoDS,
58 SetOfInteger from TColStd
59
60
61is
62
63 Create
64 returns PaveFiller from BOPTools;
65 ---Purpose:
66 --- Empty Contructor
67 ---
68 Create (aIP: InterferencePool from BOPTools)
69 returns PaveFiller from BOPTools;
70 ---Purpose:
71 --- Constructor
72 ---
73 Create (theIP : InterferencePool from BOPTools;
74 theSectionAttribute: SSIntersectionAttribute from BOPTools)
75 returns PaveFiller from BOPTools;
76 ---Purpose:
77 --- Constructor
78 ---
79 Destroy (me: in out)
80 is virtual;
81 ---C++: alias "Standard_EXPORT virtual ~BOPTools_PaveFiller(){Destroy();}"
82 ---Purpose:
83 --- Destructor
84 ---
85 Perform (me:out)
86 is virtual;
87 ---Purpose:
88 --- Fills the DS
89 ---
90
91 PartialPerform(me:out; anObjSubSet, aToolSubSet: SetOfInteger from TColStd)
92 is virtual;
93
94 ToCompletePerform(me:out)
95 is virtual;
96
97 PerformVV (me:out)
98 is virtual protected;
99 ---Purpose:
100 --- Computes Vertex/Vertex interferences
101 ---
102 PerformVE (me:out)
103 is virtual protected;
104 ---Purpose:
105 --- Computes Vertex/Edge interferences
106 ---
107 PerformVF (me:out)
108 is virtual protected;
109 ---Purpose:
110 --- Computes Vertex/Face interferences
111 ---
112 PerformEE (me:out)
113 is virtual protected;
114 ---Purpose:
115 --- Computes Edge/Edge interferences
116 ---
117 PerformEF (me:out)
118 is virtual protected;
119 ---Purpose:
120 --- Computes Edge/Face interferences
121 ---
122 PerformFF (me:out)
123 is virtual protected;
124 ---Purpose:
125 --- Computes Face/Face interferences
126 ---
127
128 --------------------------------------------------------------
129 ---
130 --- Selectors
131 ---
4f189102
P
132 ---
133 SetContext(me:out;
134 aContext: Context from IntTools);
135 ---Purpose:
136 --- Sets the intersecton context
137 ---
7fd59977 138 Context(me)
139 returns Context from IntTools;
140 ---C++:return const &
141 ---Purpose:
142 --- Selector
143 ---
4f189102
P
144-- ChangeContext(me:out)
145-- returns Context from IntTools;
146 -- C++:return &
7fd59977 147 ---Purpose:
148 --- Selector
149 ---
150 SetInterferencePool(me:out;
151 aPool:InterferencePool from BOPTools);
152 ---Purpose:
153 --- Selector
154 ---
155 IsDone(me)
156 returns Boolean from Standard;
157 ---Purpose:
158 --- Selector
159 ---
160 PavePool(me)
161 returns PavePool from BOPTools;
162 ---C++:return const &
163 ---Purpose:
164 --- Selector
165 ---
166 ChangePavePool(me:out)
167 returns PavePool from BOPTools;
168 ---C++:return &
169 ---Purpose:
170 --- Selector
171 ---
172 CommonBlockPool(me)
173 returns CommonBlockPool from BOPTools;
174 ---C++:return const &
175 ---Purpose:
176 --- Selector
177 ---
178 ChangeCommonBlockPool(me:out)
179 returns CommonBlockPool from BOPTools;
180 ---C++:return &
181 ---Purpose:
182 --- Selector
183 ---
184 SplitShapesPool(me)
185 returns SplitShapesPool from BOPTools;
186 ---C++:return const &
187 ---Purpose:
188 --- Selector
189 ---
190
191 ChangeSplitShapesPool(me:out)
192 returns SplitShapesPool from BOPTools;
193 ---C++:return &
194 ---Purpose:
195 --- Selector
196 ---
197 DS(me:out)
198 returns PShapesDataStructure from BooleanOperations;
199 ---Purpose:
200 --- Selector
201 ---
202 InterfPool(me:out)
203 returns PInterferencePool from BOPTools;
204 ---Purpose:
205 --- Selector
206 ---
207
208 IteratorOfCoupleOfShape(me)
209 returns IteratorOfCoupleOfShape from BOPTools;
210 ---C++:return const &
211 ---Purpose:
212 --- Selector
213 ---
214
215 SectionAttribute(me)
216 returns SSIntersectionAttribute from BOPTools;
217 ---C++: return const &
218 ---Purpose:
219 --- Selector
220 ---
221
222 SetSectionAttribute(me:out;
223 anAtt : SSIntersectionAttribute from BOPTools);
224 ---Purpose:
225 --- Selector
226 ---
227 --------------------------------------------------------------
228 ---
229 --- PaveBlocks for Split Parts of Edges.
230 ---
231 ---
232 SortTypes (me;
233 anInd1:in out Integer from Standard;
234 anInd2:in out Integer from Standard)
235 is protected;
236 ---Purpose:
237 --- Sorts the types of shapes with DS-indices
238 --- <anInd1> and <anInd2> in increasing order of
239 --- types of the shapes
240 ---
241 PerformNewVertices (me:out)
242 is protected;
243
244 IsSuccesstorsComputed (me;
245 iF1:Integer from Standard;
246 iF2:Integer from Standard)
247 returns Boolean from Standard
248 is protected;
249
250 PrepareEdges (me:out)
251 is virtual protected;
252 ---Purpose:
253 --- Prepare end paves for each edge
254 ---
255 PreparePaveBlocks (me:out;
256 aType1: ShapeEnum from TopAbs;
257 aType2: ShapeEnum from TopAbs)
258 is virtual protected;
259 ---Purpose:
260 --- Prepare PaveBlocks for each edge (EE-interferences)
261 ---
262 PreparePaveBlocks (me:out;
263 anE:Integer from Standard)
264 is virtual protected;
265 ---Purpose:
266 --- Prepare PaveBlocks for given edge (EE-interferences)
267 ---
268 RefinePavePool(me:out)
269 is protected;
270 ---Purpose:
271 --- Refines myPavePool taking into account new Paves obtained from EE algo
272 ---
273 MakeSplitEdges(me:out)
274 is protected;
275 ---Purpose:
276 --- Makes split edges from source edges
277 ---
278 DoSDEdges(me:out)
279 is protected;
280 ---Purpose:
281 --- Update Lists of PaveBlocks with info about
282 --- indices of split edges that are Same Domain
283 --- with other splits or faces
284 ---
285 CorrectShrunkRanges(me:out;
286 aSide: Integer from Standard;
287 aPave: Pave from BOPTools;
288 aSR : out ShrunkRange from IntTools)
289 is protected;
290 ---Purpose:
291 --- Update Shrunk Range <aSR> for Pave <aPave>
292 ---
293 SplitIndex (me:out; aPB:PaveBlock from BOPTools)
294 returns Integer from Standard
295 is protected;
296 ---Purpose:
297 --- Returns the Index of Split edge for the PaveBlock <aPB>
298 --- in DS.
299 --- If the PaveBlock is not found, returns 0;
300 ---
301 IsBlocksCoinside (me;
302 aPB1:PaveBlock from BOPTools;
303 aPB2:PaveBlock from BOPTools)
304 returns Boolean from Standard
305 is protected;
306 ---Purpose:
307 --- Returns TRUE if the two PaveBlocks have vertices
308 --- that touch each other in terms of Tolerances of
309 --- the vertices
310 ---
311 --------------------------------------------------------------
312 ---
313 --- Some of API FUNCTIONS
314 ---
315 ---
316 SplitsInFace(me:out;
317 aBid:Integer from Standard;
318 nF1 :Integer from Standard;
319 nF2 :Integer from Standard;
320 aLs :out ListOfInteger from TColStd)
321 returns Integer from Standard;
322 ---Purpose:
323 --- For the face <nF1> get all splits that are IN-2D
324 --- to the face <nF2>; The result is in <aLs>
325 --- Returns 0 if OK;
326 ---
327 SplitsInFace(me:out;
328 nE1 :Integer from Standard;
329 nF2 :Integer from Standard;
330 aLs :out ListOfInteger from TColStd)
331 returns Integer from Standard;
332 ---Purpose:
333 --- For the edge <nE1> get all splits that are IN-2D
334 --- to the face <nF1>; The result is in <aLs>
335 --- Returns 0 if OK;
336 ---
337 SplitsOnEdge(me:out;
338 nE1 :Integer from Standard;
339 nE2 :Integer from Standard;
340 aLs :out ListOfInteger from TColStd)
341 returns Integer from Standard;
342 ---Purpose:
343 --- For the edge <nE1> get all splits that are ON-3D
344 --- to the edge <nE2>; The result is in <aLs>
345 --- Returns 0 if OK;
346 ---
347 SplitsOnFace(me:out;
348 nE1 :Integer from Standard;
349 nF2 :Integer from Standard;
350 aLs :out ListOfInteger from TColStd)
351 returns Integer from Standard;
352 ---Purpose:
353 --- For the edge <nE1> get all splits that are ON-3D
354 --- to the face <nF2>; The result is in <aLs>
355 --- Returns 0 if OK;
356 ---
357 SplitsOnFace(me:out;
358 aBid:Integer from Standard;
359 nF1 :Integer from Standard;
360 nF2 :Integer from Standard;
361 aLs :out ListOfInteger from TColStd)
362 returns Integer from Standard;
363 ---Purpose:
364 --- For the face <nF1> get all splits that are ON-3D
365 --- to the face <nF2>; The result is in <aLs>
366 --- Returns 0 if OK;
367 ---
368
369 SplitsInFace(me:out;
370 aBid:Integer from Standard;
371 nF1 :Integer from Standard;
372 nF2 :Integer from Standard;
373 aLs :out ListOfPaveBlock from BOPTools)
374 returns Integer from Standard;
375 ---Purpose:
376 --- For the face <nF1> get all PaveBlocks that are IN-2D
377 --- to the face <nF2>; The result is in <aLs>
378 --- Returns 0 if OK;
379 ---
380
381 SplitsInFace(me:out;
382 nE1 :Integer from Standard;
383 nF2 :Integer from Standard;
384 aLs :out ListOfPaveBlock from BOPTools)
385 returns Integer from Standard;
386 ---Purpose:
387 --- For the edge <nE1> get all PaveBlocks that are IN-2D
388 --- to the face <nF1>; The result is in <aLs>
389 --- Returns 0 if OK;
390 ---
391
392 SplitsOnEdge(me:out;
393 nE1 :Integer from Standard;
394 nE2 :Integer from Standard;
395 aLs :out ListOfPaveBlock from BOPTools)
396 returns Integer from Standard;
397 ---Purpose:
398 --- For the edge <nE1> get all PaveBlocks that are ON-3D
399 --- to the edge <nE2>; The result is in <aLs>
400 --- Returns 0 if OK;
401 ---
402
403 SplitsOnFace(me:out;
404 nE1 :Integer from Standard;
405 nF2 :Integer from Standard;
406 aLs :out ListOfPaveBlock from BOPTools)
407 returns Integer from Standard;
408 ---Purpose:
409 --- For the edge <nE1> get all PaveBlocks that are ON-3D
410 --- to the face <nF2>; The result is in <aLs>
411 --- Returns 0 if OK;
412 ---
413
414 SplitsOnFace(me:out;
415 aBid:Integer from Standard;
416 nF1 :Integer from Standard;
417 nF2 :Integer from Standard;
418 aLs :out ListOfPaveBlock from BOPTools)
419 returns Integer from Standard;
420 ---Purpose:
421 --- For the face <nF1> get all PaveBlocks that are ON-3D
422 --- to the face <nF2>; The result is in <aLs>
423 --- Returns 0 if OK;
424 ---
425 FindSDVertex (me;
426 nV: Integer from Standard)
427 returns Integer from Standard;
428 ---Purpose:
429 --- Find for the vertex <nV> SD-vertex (if possible) and return
430 --- its DS-index. Otherwise it returns 0.
431 ---
432
433 ---------------------------------------------------------------
434 ---
435 --- Section Edges. Protected Block.
436 ---
437 ---
438 MakeBlocks(me:out)
439 is protected;
440 ---Purpose:
441 --- Make Pave Blocks for intersection curves
442 ---
443 MakeAloneVertices(me:out)
444 is protected;
445 ---Purpose:
446 --- Make vertices that are place of intersection
447 --- between faces
448 ---
449 PutPaveOnCurve(me:out;
450 aPaveSet: PaveSet from BOPTools;
451 aTolR3D : Real from Standard;
452 aBCurve :out Curve from BOPTools)
453 is protected;
454 ---Purpose:
455 --- Among Paves from <aPaveSet> find ones that belong
456 --- to intersection curve <aBCurve> with 3D-tolerance
457 --- value <aTolR3D>
458 ---
459 PutPaveOnCurve(me:out;
460 aPave : Pave from BOPTools;
461 aTolR3D : Real from Standard;
462 aBCurve :out Curve from BOPTools)
463 is protected;
464 ---Purpose:
465 --- Try to put Pave <aPave> on intersection curve <aBCurve>
466 --- with 3D-tolerance value <aTolR3D>
467 ---
468
469 PutPavesOnCurves(me:out)
470 is protected;
471
472 PrepareSetForFace(me:out;
473 nF1 :Integer from Standard;
474 nF2 :Integer from Standard;
475 aPaveSet:out PaveSet from BOPTools);
476 ---Purpose:
477 --- For couple of faces <nF1>, <nF2> prepare set of all paves
478 --- of all edges <aPaveSet>
479 ---
480 MakeSectionEdges(me:out)
481 is protected;
482 ---Purpose:
483 --- For all inrefered faces make section edges from
484 --- intersection curves and corresp. Paves on them
485 ---
486 PutBoundPaveOnCurve (me:out;
487 aBC :out Curve from BOPTools;
488 aFF :out SSInterference from BOPTools)
489 is protected;
490 ---Purpose:
491 --- Try to put own bounds of the curve on the curve <aBC>
492 ---
493 PutBoundPaveOnCurve (me:out;
494 aP : Pnt from gp;
495 aT : Real from Standard;
496 aBC :out Curve from BOPTools;
497 aFF :out SSInterference from BOPTools)
498 is protected;
499 ---Purpose:
500 --- Try to put 3D-point <aP> (parameter aT) on the curve <aBC>
501 ---
502 PutBoundPaveOnCurveSpec (me:out;
503 aBC :out Curve from BOPTools;
504 aFF :out SSInterference from BOPTools)
505 is protected;
506 ---Purpose:
507 --- Try to put own bounds of the curve on the curve <aBC>
508 ---
509 PutBoundPaveOnCurveSpec (me:out;
510 aP : Pnt from gp;
511 aT : Real from Standard;
512 aBC :out Curve from BOPTools;
513 aFF :out SSInterference from BOPTools)
514 is protected;
515 ---Purpose:
516 --- Try to put 3D-point <aP> (parameter aT) on the curve <aBC>
3928aec6
P
517 ---
518
519--modified by NIZNHY-PKV Thu Oct 20 07:17:11 2011f
520 PutClosingPaveOnCurve (me:out;
521 aBC :out Curve from BOPTools;
522 aFF :out SSInterference from BOPTools)
523 is protected;
524 ---Purpose:
525 --- Put paves on the curve <aBC> in case when <aBC>
526 -- is closed 3D-curve
527 ---
528--modified by NIZNHY-PKV Thu Oct 20 07:17:11 2011t
529
7fd59977 530 FindPave (me:out;
531 aP :Pnt from gp;
532 aTpV: Real from Standard;
533 aPS: PaveSet from BOPTools;
534 aPV:out Pave from BOPTools)
535 returns Boolean from Standard
536 is protected;
537 ---Purpose:
538 --- Returns TRUE if 3D-point <aP> coinsides with some Pave
539 --- from <aPS> (with 3D-tolerance value <aTpV>);
540 --- In TRUE case <aPV> will contain the Pave .
541 ---
542 CheckCoincidence(me:out;
543 aPB: PaveBlock from BOPTools;
544 aFF: SSInterference from BOPTools)
545 returns Boolean from Standard
546 is protected;
547 ---Purpose:
548 --- Returns TRUE if PaveBlock <aPB> lays on the faces
549 --- from FF-interference <aFF>
550 ---
551 CheckIntermediatePoint(me:out;
552 aPB : PaveBlock from BOPTools;
553 aPBR: PaveBlock from BOPTools;
554 aTol: Real from Standard)
555 returns Integer from Standard
556 is protected;
557 ---Purpose:
558 --- Returns 0 if some arbitrary intermediate point from
559 --- PaveBlock <aPB> lays on the PaveBlock <aPBR>
560 --- (with 3D-tolerance value <aTol>)
561 ---
562
563 CheckFacePaves(me:out;
564 aV : Vertex from TopoDS;
565 nF: Integer from Standard)
566 returns Integer from Standard
567 is protected;
568 ---Purpose:
569 --- Internal usage
570 ---
571 StickVertices (me:out;
572 nF1: Integer from Standard;
573 nF2: Integer from Standard;
574 aMV:out IndexedMapOfInteger from TColStd)
575 is protected;
576 ---Purpose:
577 --- Internal usage
578 ---
579 ExpectedPoolLength(me)
580 returns Integer from Standard
581 is protected;
582 ---Purpose:
583 --- Returns the value of expected length of array of interferences
584 ---
585
586 RestrictCurveIn2d(me: in out; nE, nF1, nF2 : Integer from Standard;
587 theTolerance: Real from Standard;
588 theBC : in out Curve from BOPTools)
589 is private;
590
591 RecomputeCommonBlocks(me: in out; nE: Integer from Standard)
592 is private;
593
7fd59977 594 ExtendedTolerance(me:out;
595 nV : Integer from Standard;
596 aTolExt : out Real from Standard)
597 returns Boolean from Standard
598 is protected;
7fd59977 599
600fields
601
602 myIntrPool : PInterferencePool from BOPTools
603 is protected;
604 myDS : PShapesDataStructure from BooleanOperations
605 is protected;
606 myPavePool : PavePool from BOPTools
607 is protected;
608 myPavePoolNew : PavePool from BOPTools
609 is protected;
610 myCommonBlockPool : CommonBlockPool from BOPTools
611 is protected;
612 mySplitShapesPool : SplitShapesPool from BOPTools
613 is protected;
614 mySectionAttribute : SSIntersectionAttribute from BOPTools
615 is protected;
616 myNbSources : Integer from Standard
617 is protected;
618 myNbEdges : Integer from Standard
619 is protected;
620 myIsDone : Boolean from Standard
621 is protected;
622 myDSIt : IteratorOfCoupleOfShape from BOPTools
623 is protected;
624 myContext : Context from IntTools
625 is protected;
626
627end PaveFiller;