0024624: Lost word in license statement in source files
[occt.git] / src / BOPDS / BOPDS_DS.cdl
CommitLineData
4e57c75e 1-- Created by: Peter KURNEV
973c2be1 2-- Copyright (c) 1999-2014 OPEN CASCADE SAS
4e57c75e 3--
973c2be1 4-- This file is part of Open CASCADE Technology software library.
4e57c75e 5--
d5f74e42 6-- This library is free software; you can redistribute it and/or modify it under
7-- the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 8-- by the Free Software Foundation, with special exception defined in the file
9-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10-- distribution for complete text of the license and disclaimer of any warranty.
4e57c75e 11--
973c2be1 12-- Alternatively, this file may be used under the terms of Open CASCADE
13-- commercial license or contractual agreement.
4e57c75e 14
15class DS from BOPDS
16
17 ---Purpose:
18 -- The class BOPDS_DS provides the control
19 -- the data structure for
20 -- partition and boolean operation algorithms
21 --
22 -- The data structure has the following contents:
23 -- 1. the arguments of an operation [myArguments];
24 -- 2 the information about arguments/new shapes
25 -- and their sub-shapes (type of the shape,
26 -- bounding box, etc) [myLines];
27 -- 3. each argument shape(and its subshapes)
28 -- has/have own range of indices (rank)
29 -- 4. pave blocks on source edges [myPaveBlocksPool];
30 -- 5. the state of source faces [myFaceInfoPool]
31 -- 6 the collection of same domain shapes [myShapesSD]
32 -- 7 the collection of interferences [myInterfTB,
33 -- myInterfVV,..myInterfFF]
34
35uses
30ecd5f8 36 ShapeEnum from TopAbs,
37 Box from Bnd,
4e57c75e 38 Shape from TopoDS,
39 --
40 ListOfShape from BOPCol,
41 DataMapOfIntegerInteger from BOPCol,
42 DataMapOfShapeInteger from BOPCol,
43 ListOfInteger from BOPCol,
44 MapOfInteger from BOPCol,
45 BaseAllocator from BOPCol,
46 --
47 ShapeInfo from BOPDS,
48 IndexRange from BOPDS,
49 VectorOfIndexRange from BOPDS,
50 VectorOfShapeInfo from BOPDS,
51 VectorOfListOfPaveBlock from BOPDS,
52 ListOfPaveBlock from BOPDS,
53 ListOfPave from BOPDS,
54 PaveBlock from BOPDS,
55 CommonBlock from BOPDS,
56 MapOfPaveBlock from BOPDS,
57 IndexedMapOfPaveBlock from BOPDS,
58 VectorOfFaceInfo from BOPDS,
59 FaceInfo from BOPDS,
60 --
5a77460e 61 MapOfPassKey from BOPDS,
62 DataMapOfPaveBlockCommonBlock from BOPDS,
4e57c75e 63 --
64 VectorOfInterfVV from BOPDS,
65 VectorOfInterfVE from BOPDS,
66 VectorOfInterfVF from BOPDS,
67 VectorOfInterfEE from BOPDS,
68 VectorOfInterfEF from BOPDS,
ceaa5e27 69 VectorOfInterfFF from BOPDS,
70 VectorOfInterfVZ from BOPDS,
71 VectorOfInterfEZ from BOPDS,
72 VectorOfInterfFZ from BOPDS,
73 VectorOfInterfZZ from BOPDS
74
4e57c75e 75--raises
76
77is
78 Create
79 returns DS from BOPDS;
80 ---C++: alias "Standard_EXPORT virtual ~BOPDS_DS();"
81 ---Purpose:
82 --- Empty contructor
83 ---
84 Create (theAllocator: BaseAllocator from BOPCol)
85 returns DS from BOPDS;
86 ---Purpose:
87 --- Contructor
88 --- theAllocator - the allocator to manage the memory
89 ---
90
91 Clear(me:out);
92 ---Purpose:
93 -- Clears the contents
94
95 Allocator(me)
96 returns BaseAllocator from BOPCol;
97 ---C++: return const &
98 ---Purpose:
99 --- Selector
100 ---
101
102 SetArguments(me:out;
103 theLS:ListOfShape from BOPCol);
104 ---Purpose:
105 --- Modifier
106 --- Sets the arguments [theLS] of an operation
107
108 Arguments(me)
109 returns ListOfShape from BOPCol;
110 ---C++: return const &
111 ---Purpose:
112 --- Selector
113 --- Returns the arguments of an operation
114
115 Init(me:out);
116 ---Purpose:
117 --- Initializes the data structure for
118 -- the arguments
119
120 NbShapes(me)
121 returns Integer from Standard;
122 ---Purpose:
123 --- Selector
124 --- Returns the total number of shapes stored
125
126 NbSourceShapes(me)
127 returns Integer from Standard;
128 ---Purpose:
129 --- Selector
130 --- Returns the total number of source shapes stored
131
132 NbRanges(me)
133 returns Integer from Standard;
134 ---Purpose:
135 --- Selector
136 --- Returns the number of index ranges
137
138 Range(me;
139 theIndex:Integer from Standard)
140 returns IndexRange from BOPDS;
141 ---C++: return const &
142 ---Purpose:
143 --- Selector
144 --- Returns the index range "i"
145
146 Rank (me;
147 theIndex:Integer from Standard)
148 returns Integer from Standard;
149 ---Purpose:
150 --- Selector
151 --- Returns the rank of the shape of index "i"
152
153 IsNewShape(me;
154 theIndex:Integer from Standard)
155 returns Boolean from Standard;
156 ---Purpose:
157 --- Returns true if the shape of index "i" is not
158 --- the source shape/sub-shape
159
160 --
161 -- shapes and auxiliary info
162 --
163 Append(me:out;
164 theSI:ShapeInfo from BOPDS)
165 returns Integer from Standard;
166 ---Purpose:
167 --- Modifier
168 --- Appends the information about the shape [theSI]
169 --- to the data structure
170 --- Returns the index of theSI in the data structure
171
172 Append(me:out;
173 theS:Shape from TopoDS)
174 returns Integer from Standard;
175 ---Purpose:
176 --- Modifier
177 --- Appends the default information about the shape [theS]
178 --- to the data structure
179 --- Returns the index of theS in the data structure
180
181 ShapeInfo(me;
182 theIndex:Integer from Standard)
183 returns ShapeInfo from BOPDS;
184 ---C++: return const &
185 ---Purpose:
186 --- Selector
187 --- Returns the information about the shape
188 --- with index theIndex
189
190 ChangeShapeInfo(me:out;
191 theIndex:Integer from Standard)
192 returns ShapeInfo from BOPDS;
193 ---C++: return &
194 ---Purpose:
195 --- Selector/Modifier
196 --- Returns the information about the shape
197 --- with index theIndex
198
199 Shape(me;
200 theIndex:Integer from Standard)
201 returns Shape from TopoDS;
202 ---C++: return const &
203 ---Purpose:
204 --- Selector
205 --- Returns the shape
206 -- with index theIndex
207
208 Index(me;
209 theS:Shape from TopoDS)
210 returns Integer from Standard;
211 ---Purpose:
212 --- Selector
213 --- Returns the index of the shape theS
214
215 --
216 -- pave blocks
217 --
218 PaveBlocksPool(me)
219 returns VectorOfListOfPaveBlock from BOPDS;
220 ---C++: return const &
221 ---Purpose:
222 --- Selector
223 --- Returns the information about pave blocks on source edges
224
225 ChangePaveBlocksPool(me:out)
226 returns VectorOfListOfPaveBlock from BOPDS;
227 ---C++: return &
228 ---Purpose:
229 --- Selector/Modifier
230 --- Returns the information about pave blocks on source edges
231
232 HasPaveBlocks(me;
233 theIndex:Integer from Standard)
234 returns Boolean from Standard;
235 ---Purpose:
236 --- Query
237 --- Returns true if the shape with index theIndex has the
238 --- information about pave blocks
239
240 PaveBlocks (me;
241 theIndex:Integer from Standard)
242 returns ListOfPaveBlock from BOPDS;
243 ---C++: return const &
244 ---Purpose:
245 --- Selector
246 --- Returns the pave blocks for the shape with index theIndex
247
248 ChangePaveBlocks (me:out;
249 theIndex:Integer from Standard)
250 returns ListOfPaveBlock from BOPDS;
251 ---C++: return &
252 ---Purpose:
253 --- Selector/Modifier
254 --- Returns the pave blocks for the shape with index theIndex
255
256 InitPaveBlocks(me:out;
257 theIndex:Integer from Standard)
258 is protected;
259 ---Purpose:
260 --- Initializes the pave blocks for the shape with index theIndex
261
262 UpdatePaveBlocks(me:out);
263 ---Purpose:
264 --- Update the pave blocks for the all shapes in data structure
265
266 UpdatePaveBlock(me:out;
267 thePB:PaveBlock from BOPDS);
268 ---Purpose:
269 --- Update the pave block thePB
270
271 UpdateCommonBlock(me:out;
272 theCB:CommonBlock from BOPDS);
273 ---Purpose:
5a77460e 274 --- Update the common block theCB
275
276 IsCommonBlock(me;
277 thePB:PaveBlock from BOPDS)
278 returns Boolean from Standard;
279 ---Purpose:
280 --- Query
281 --- Returns true if the pave block is common block
282
283 CommonBlock(me;
284 thePB:PaveBlock from BOPDS)
285 returns CommonBlock from BOPDS;
286 ---C++: return const &
287 ---Purpose:
288 --- Selector
289 --- Returns the common block
290
291 SetCommonBlock(me:out;
292 thePB:PaveBlock from BOPDS;
293 theCB:CommonBlock from BOPDS);
294 ---Purpose:
295 --- Modifier
296 --- Sets the common block <theCB>
297
298 RealPaveBlock(me;
299 thePB:PaveBlock from BOPDS)
300 returns PaveBlock from BOPDS;
301 ---Purpose:
302 --- Selector
303 --- Returns the real first pave block
304
305 IsCommonBlockOnEdge(me;
306 thePB:PaveBlock from BOPDS)
307 returns Boolean from Standard;
308 ---Purpose:
309 --- Query
310 --- Returns true if common block contains more then one pave block
311
4e57c75e 312 --
313 -- face info
314 --
315 FaceInfoPool(me)
316 returns VectorOfFaceInfo from BOPDS;
317 ---C++: return const &
318 ---Purpose:
319 --- Selector
320 --- Returns the information about state of faces
321
322 HasFaceInfo(me;
323 theIndex:Integer from Standard)
324 returns Boolean from Standard;
325 ---Purpose:
326 --- Query
327 --- Returns true if the shape with index theIndex has the
328 --- information about state of face
329
330 FaceInfo(me;
331 theIndex:Integer from Standard)
332 returns FaceInfo from BOPDS;
333 ---C++: return const &
334 ---Purpose:
335 --- Selector
336 --- Returns the state of face with index theIndex
337
338 ChangeFaceInfo(me:out;
339 theIndex:Integer from Standard)
340 returns FaceInfo from BOPDS;
341 ---C++: return &
342 ---Purpose:
343 --- Selector/Modifier
344 --- Returns the state of face with index theIndex
345
346 InitFaceInfo(me:out;
347 theIndex:Integer from Standard)
348 is protected;
349 ---Purpose:
350 --- Initializes the state of face with index theIndex
351
352 UpdateFaceInfoIn(me:out;
353 theIndex:Integer from Standard);
354 ---Purpose:
355 --- Update the state In of face with index theIndex
356
357 UpdateFaceInfoOn(me:out;
358 theIndex:Integer from Standard);
359 ---Purpose:
360 --- Update the state On of face with index theIndex
361
362 FaceInfoOn(me:out;
363 theIndex:Integer from Standard;
364 theMPB:out IndexedMapOfPaveBlock from BOPDS;
365 theMVP:out MapOfInteger from BOPCol);
366 ---Purpose:
367 --- Selector
368 --- Returns the state On
369 --- [theMPB,theMVP] of face with index theIndex
370
371 FaceInfoIn(me:out;
372 theIndex:Integer from Standard;
373 theMPB:out IndexedMapOfPaveBlock from BOPDS;
374 theMVP:out MapOfInteger from BOPCol);
375 ---Purpose:
376 --- Selector
377 --- Returns the state In
378 --- [theMPB,theMVP] of face with index theIndex
379
380 AloneVertices(me;
381 theF:Integer from Standard;
382 theLI:out ListOfInteger from BOPCol);
383 ---Purpose:
384 --- Selector
385 --- Returns the indices of alone vertices
386 --- for the face with index theIndex
387
388 RefineFaceInfoOn(me:out);
389 ---Purpose:
390 --- Refine the state On for the all faces having
391 --- state information
392 --
393 -- ++
394 --
395 VerticesOnIn(me;
396 theF1:Integer from Standard;
397 theF2:Integer from Standard;
398 theMI:out MapOfInteger from BOPCol;
399 aMPB: out MapOfPaveBlock from BOPDS);
400 ---Purpose:
401 --- Returns the indices of vertices and pave blocks
402 --- that are On/In for the faces with indices theF1, theF2
403
404 SharedEdges(me:out;
405 theF1:Integer from Standard;
406 theF2:Integer from Standard;
407 theLI:out ListOfInteger from BOPCol;
408 theAllocator:BaseAllocator from BOPCol);
409 ---Purpose:
410 --- Returns the indices of edges that are shared
411 --- for the faces with indices theF1, theF2
412 --
413 -- same domain shapes
414 --
415 ShapesSD (me:out)
416 returns DataMapOfIntegerInteger from BOPCol;
417 ---C++: return &
418 ---Purpose:
419 --- Selector
420 --- Returns the collection same domain shapes
421
422 AddShapeSD(me:out;
423 theIndex:Integer from Standard;
424 theIndexSD:Integer from Standard);
425 ---Purpose:
426 --- Modifier
427 --- Adds the information about same domain shapes
428 --- with indices theIndex, theIndexSD
429
430 HasShapeSD(me;
431 theIndex:Integer from Standard;
432 theIndexSD:out Integer from Standard)
433 returns Boolean from Standard;
434 ---Purpose:
435 --- Query
436 --- Returns true if the shape with index theIndex has the
437 --- same domain shape. In this case theIndexSD will contain
438 -- the index of same domain shape found
439 --
440 -- interferences
441 --
442 InterfVV(me:out)
443 returns VectorOfInterfVV from BOPDS;
444 ---C++: return &
445 ---C++: inline
446 ---Purpose:
447 --- Selector/Modifier
448 --- Returns the collection of interferences Vertex/Vertex
449
450 InterfVE(me:out)
451 returns VectorOfInterfVE from BOPDS;
452 ---C++: return &
453 ---C++: inline
454 ---Purpose:
455 --- Selector/Modifier
456 --- Returns the collection of interferences Vertex/Edge
457
458 InterfVF(me:out)
459 returns VectorOfInterfVF from BOPDS;
460 ---C++: return &
461 ---C++: inline
462 ---Purpose:
463 --- Selector/Modifier
464 --- Returns the collection of interferences Vertex/Face
465
466 InterfEE(me:out)
467 returns VectorOfInterfEE from BOPDS;
468 ---C++: return &
469 ---C++: inline
470 ---Purpose:
471 --- Selector/Modifier
472 --- Returns the collection of interferences Edge/Edge
473
474 InterfEF(me:out)
475 returns VectorOfInterfEF from BOPDS;
476 ---C++: return &
477 ---C++: inline
478 ---Purpose:
479 --- Selector/Modifier
480 --- Returns the collection of interferences Edge/Face
481
482 InterfFF(me:out)
483 returns VectorOfInterfFF from BOPDS;
484 ---C++: return &
485 ---C++: inline
486 ---Purpose:
487 --- Selector/Modifier
488 --- Returns the collection of interferences Face/Face
ceaa5e27 489
490 InterfVZ(me:out)
491 returns VectorOfInterfVZ from BOPDS;
492 ---C++: return &
493 ---C++: inline
494 ---Purpose:
495 --- Selector/Modifier
496 --- Returns the collection of interferences Vertex/Solid
497
498 InterfEZ(me:out)
499 returns VectorOfInterfEZ from BOPDS;
500 ---C++: return &
501 ---C++: inline
502 ---Purpose:
503 --- Selector/Modifier
504 --- Returns the collection of interferences Edge/Solid
505
506 InterfFZ(me:out)
507 returns VectorOfInterfFZ from BOPDS;
508 ---C++: return &
509 ---C++: inline
510 ---Purpose:
511 --- Selector/Modifier
512 --- Returns the collection of interferences Face/Solid
513
514 InterfZZ(me:out)
515 returns VectorOfInterfZZ from BOPDS;
516 ---C++: return &
517 ---C++: inline
518 ---Purpose:
519 --- Selector/Modifier
520 --- Returns the collection of interferences Solid/Solid
521
522 NbInterfTypes(myclass)
523 returns Integer from Standard;
524 ---C++: inline
525 ---Purpose:
526 -- Returns the number of types of the interferences
527 --
528
4e57c75e 529 AddInterf(me:out;
530 theI1:Integer from Standard;
531 theI2:Integer from Standard);
532 ---C++: inline
533 ---Purpose:
534 --- Modifier
535 --- Adds the information about an interference between
536 --- shapes with indices theI1, theI2 to the summary
537 --- table of interferences
538
539 HasInterf(me;
540 theI:Integer from Standard)
541 returns Boolean from Standard;
542 ---Purpose:
543 --- Query
544 --- Returns true if the shape with index theI
545 --- is interferred
546
547 HasInterf(me;
548 theI1:Integer from Standard;
549 theI2:Integer from Standard)
550 returns Boolean from Standard;
551 ---C++: inline
552 ---Purpose:
553 --- Query
554 --- Returns true if the shapes with indices theI1, theI2
555 --- are interferred
556
557 HasInterfShapeSubShapes(me;
558 theI1:Integer from Standard;
ceaa5e27 559 theI2:Integer from Standard;
560 theFlag: Boolean from Standard=Standard_True)
561 returns Boolean from Standard;
4e57c75e 562 ---Purpose:
563 --- Query
564 --- Returns true if the shape with index theI1 is interfered
ceaa5e27 565 --- with
566 -- any sub-shape of the shape with index theI2 (theFlag=true)
567 -- all sub-shapes of the shape with index theI2 (theFlag=false)
568
4e57c75e 569 HasInterfSubShapes(me;
570 theI1:Integer from Standard;
571 theI2:Integer from Standard)
572 returns Boolean from Standard;
573 ---Purpose:
574 --- Query
575 --- Returns true if the shapes with indices theI1, theI2
576 --- have interferred sub-shapes
577
578 Interferences(me)
579 returns MapOfPassKey from BOPDS;
580 ---C++: return const &
581 ---C++: inline
582 ---Purpose:
583 --- Selector
584 --- Returns the table of interferences
585 --
586 -- debug
587 --
588 Dump(me);
589 --
590 -- protected methods
591 --
592 InitShape(me:out;
593 theIndex:Integer from Standard;
594 theS:Shape from TopoDS;
595 theAllocator:out BaseAllocator from BOPCol;
596 theMSI:out DataMapOfShapeInteger from BOPCol)
597 is protected;
598
599 CheckCoincidence(me:out;
600 thePB1:PaveBlock from BOPDS;
601 thePB2:PaveBlock from BOPDS)
602 returns Boolean from Standard
603 is protected;
604
605 SortPaveBlocks(me:out;
606 theCB:CommonBlock from BOPDS);
607
608 IsToSort(me:out;
609 theCB:CommonBlock from BOPDS;
610 theI:out Integer from Standard)
611 returns Boolean from Standard;
612
613 IsSubShape(me:out;
614 theI1:Integer from Standard;
615 theI2:Integer from Standard)
616 returns Boolean from Standard;
617
618 Paves(me:out;
619 theIndex:Integer from Standard;
620 theLP:out ListOfPave from BOPDS);
621 ---Purpose: Fills theLP with sorted paves
622 -- of the shape with index theIndex
623
624 UpdateEdgeTolerance(me:out;
625 theIndex:Integer from Standard;
626 theTolerance:Real from Standard);
627 ---Purpose:
628 --- Updates tolerance of the sub-shapes of the shape with index <theIndex>.
629 ---
30ecd5f8 630
631 BuildBndBoxSolid (me:out;
632 theIndex:Integer from Standard;
633 theBox:out Box from Bnd)
634 is protected;
635 ---Purpose:
636 --- Computes bouding box <theBox> for the solid with DS-index <theIndex>
ceaa5e27 637 ---
638
639
640
4e57c75e 641fields
642 myAllocator : BaseAllocator from BOPCol is protected;
643 myArguments : ListOfShape from BOPCol is protected;
644 --contents
645 myNbShapes : Integer from Standard is protected;
646 myNbSourceShapes : Integer from Standard is protected;
647 myRanges : VectorOfIndexRange from BOPDS is protected;
648 myLines : VectorOfShapeInfo from BOPDS is protected;
649 myMapShapeIndex : DataMapOfShapeInteger from BOPCol is protected;
650 --
5a77460e 651 myPaveBlocksPool : VectorOfListOfPaveBlock from BOPDS is protected;
652 myMapPBCB : DataMapOfPaveBlockCommonBlock from BOPDS is protected;
4e57c75e 653 myFaceInfoPool : VectorOfFaceInfo from BOPDS is protected;
654 --
655 --same domain shapes
656 myShapesSD : DataMapOfIntegerInteger from BOPCol is protected;
657 --
658 --interferences
659 myInterfTB : MapOfPassKey from BOPDS is protected;
660 myInterfVV : VectorOfInterfVV from BOPDS is protected;
661 myInterfVE : VectorOfInterfVE from BOPDS is protected;
662 myInterfVF : VectorOfInterfVF from BOPDS is protected;
663 myInterfEE : VectorOfInterfEE from BOPDS is protected;
664 myInterfEF : VectorOfInterfEF from BOPDS is protected;
665 myInterfFF : VectorOfInterfFF from BOPDS is protected;
ceaa5e27 666 myInterfVZ : VectorOfInterfVZ from BOPDS is protected;
667 myInterfEZ : VectorOfInterfEZ from BOPDS is protected;
668 myInterfFZ : VectorOfInterfFZ from BOPDS is protected;
669 myInterfZZ : VectorOfInterfZZ from BOPDS is protected;
4e57c75e 670end DS;