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