summaryrefslogtreecommitdiff
path: root/src/BOPTools/BOPTools.cdl
blob: f554214c51df8f19436e09c321b726abbbda4661 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
-- File:	BOPTools.cdl
-- Created:	Thu Nov 16 16:42:52 2000
-- Author:	Peter KURNEV
--		<pkv@irinox>
---Copyright:	 Matra Datavision 2000

package  BOPTools

    ---Purpose:  
    ---          Contains main and auxiliary classes to fill the   
    ---          Data Structure (DS) to provide  boolean  
    ---          operations between a couple BRep shapes.  
    --- 
     
uses   
    gp,  
    Bnd,
    TopAbs,
    TopoDS, 
    TopTools, 
    TCollection, 
    TColStd,  
    SortTools, 
    Geom, 
    Geom2d, 
    ProjLib,
    BooleanOperations,
    BOPTColStd,
    IntTools 
    
is   
    ---
    ---                     E  n  u  m  e  r  a  t  i  o  n  s            
    ---  
    enumeration IntersectionStatus is
    	INTERSECTED,
	BOUNDINGBOXINTERSECTED,
	BOUNDINGBOXOFSUBSHAPESINTERSECTED,
	NONINTERSECTED,
    	UNKNOWN
    	end IntersectionStatus;
	
    enumeration CheckStatus is
    	CHKUNKNOWN,
        VERTEXVERTEX,
    	VERTEXEDGE,
	VERTEXFACE,
	EDGEEDGE,
    	EDGEEDGECOMBLK,
    	EDGEFACE,
	EDGEFACECOMBLK,
	FACEFACE,
	BADSHRANKRANGE,
	NULLSRANKRANGE
	end CheckStatus;
    ---
    ---                          T  h  e    C  l  a  s  s  e  s  	        
    ---  
     
    ---                                        +==========================+    
    ---                                        !    Fillers and friends   !
    ---                                        +==========================+ 
    class PaveFiller;     
     	---Purpose: 
    	--- Class that provides   
	--- 1. computation of interferences of all types    
	--- 2. storing the interferences in interferences' pool     
	--- 3. building new vertices, edges and storing them in the DS         
	--- 4. preparing the information about PaveBlocks, CommonBlocks         
	---
    class DSFiller;  
    	---Purpose: 
    	--- Class that provides  
        --- 1. creation of the data structure (DS)    	 
        --- 2. creation of the interferences' pool   	 
        --- 3. invokation of PaveFiller->Perform() to fill the DS 
    	---   
	--- 
    class DEProcessor;   
    	---Purpose: 
    	--- Class to compute and store in interferences' pool 
	--- and DS  the following values        
    	--- for degenerated edges 
	--- 1.  Paves/Pave set(s)
	--- 2.  Split parts 
	--- 3.  States (3D) for split parts 
	---  
    class PCurveMaker; 
    	---Purpose: 
    	--- Class to compute  p-curves for the edges and theirs  
        --- split parts
	---

    class SolidStateFiller;  
    	---Purpose: 
    	--- Class to compute states (3D)  for the edges  (and theirs  
	--- split parts), vertices, wires, faces, shells
	---
    class StateFiller; 
	---Purpose: 
    	--- Root class for state fillers
	--- 
    class WireStateFiller; 
	---Purpose: 
    	--- Class to compute states (3D)  for the edges  (and theirs  
	--- split parts), vertices, wires 
        --- 
    ---                                        +================================+    
    ---                                        !    Paves and Blocks of Paves   !
    ---                                        +================================+ 
    class Pave;   
    	---Purpose: 
    	--- Class for storing info about a vertex on an edge  
	---
    class PaveBlock;   
    	---Purpose: 
    	--- Class for storing info about a couple  
    	--- of neighbouring paves on an edge 
	---
    class PaveSet;    
    	---Purpose: 
    	--- Class for storing/sorting paves that  belong to an edge 
	--- 
    
    class PaveBlockIterator; 
    	---Purpose: 
    	--- Class providing iterations for PaveSet to   
        --- have the right order of paves along the edge           	 
	---   
    class ComparePave; 
    	---Purpose: 
    	--- Class providing interface necessary for sorting     
        --- paves along the edge           	 
	--- 
    class CommonBlock; 
    	---Purpose: 
    	--- Class for storing info about a couple  
    	--- of pave blocks that are considered as common 
	---  
    class CommonBlockAPI; 
    	---Purpose: 
    	--- Class that provide useful tools to manage with  
    	--- List Of Common  Block-s
	---  
   
     
    
    ---                                        +==============+    
    ---                                        ! Intrferences !
    ---                                        +==============+ 
    class ShapeShapeInterference;  
    	---Purpose: 
    	--- Root class for storing  an  Interference        
	--- between a couple BRep shapes  
	--- 
    class VVInterference;  
    	---Purpose: 
    	--- Class for storing  an Verex/Vertex 
    	--- interference     
	--- 
    class VSInterference;  
    	---Purpose: 
    	--- Class for storing  an Verex/Face 
    	--- interference     
	--- 
    class VEInterference;  
   	---Purpose: 
    	--- Class for storing  an Verex/Edge 
    	--- interference     
	--- 
    class EEInterference;  
    	---Purpose: 
    	--- Class for storing  an Edge/Edge 
    	--- interference     
	--- 
    class ESInterference;  
    	---Purpose: 
    	--- Class for storing  an Edge/Face 
    	--- interference     
	--- 
    class SSInterference; 
    	---Purpose: 
    	--- Class for storing  an Face/Face 
    	--- interference     
	--- 
    class Interference;  
    	---Purpose: 
    	--- Class for storing information about an  
    	--- interference     
	--- 
    class InterferenceLine; 
	---Purpose: 
    	--- Class for storing information about all  
    	--- interferences for given shape 
        ---	 
    class InterferencePool; 
     	---Purpose: 
    	--- Class for storing information about  
    	--- results of all interferences for all shapes 
    	--- 
    
    ---                                        +=======+    
    ---                                        ! Tools !
    ---                                        +=======+ 
    class Tools;  
    class Tools2D; 
    class Tools3D;  
    ---                                        +=============+    
    ---                                        ! Miscellanea !
    ---                                        +=============+ 
    
    
    class DEInfo; 
    	---Purpose: 
    	--- Class for storing  information about  
    	--- a degenerated edge 
      	--- 
    class PointBetween;  
    	---Purpose: 
    	--- Class for storing geometry information about  
    	--- a point between neighbouring paves along 
	--- an edge 
      	--- 
    class Curve;  
	---Purpose: 
    	--- Class for storing information about  
    	--- intersection curve and set of paves on it     
    	---     
    class CoupleOfInteger;    

    
    class Checker;    
    	---Purpose: 
    	--- Class that provides the algorithm 
    	--- to  check a shape on self-interference.    
    	---       
    
    class CheckResult;
    	---Purpose: provides a container to store faulty
	---         sub - shapes in tested shape with type of
	---         detected faulty
    
    ---
    ---                          P  o  i  n  t  e  r  s  	        
    ---
    pointer PInterferencePool to InterferencePool from BOPTools;
    pointer PPaveFiller to PaveFiller from BOPTools; 
    pointer PDSFiller to DSFiller from BOPTools;   
    pointer PShapeShapeInterference to  ShapeShapeInterference from BOPTools; 
    ---
    ---                 I  n  s  t  a  n  t  i  a  t  i  o  n  s  
    ---   
    class ListOfCoupleOfInteger instantiates 
    	List from TCollection (CoupleOfInteger from BOPTools);  	    	     

    class ListOfInterference instantiates 
    	List from TCollection (Interference from BOPTools);  

    class  CArray1OfInterferenceLine instantiates  
        CArray1 from BOPTColStd(InterferenceLine from BOPTools);
     
    class  CArray1OfSSInterference instantiates  
    	CArray1 from BOPTColStd(SSInterference from BOPTools); 
	 
    class  CArray1OfESInterference instantiates  
    	CArray1 from BOPTColStd(ESInterference from BOPTools);  
	 
    class  CArray1OfVSInterference instantiates  
    	CArray1 from BOPTColStd(VSInterference from BOPTools);  

    class  CArray1OfEEInterference instantiates  
    	CArray1 from BOPTColStd(EEInterference from BOPTools); 

    class  CArray1OfVEInterference instantiates  
    	CArray1 from BOPTColStd(VEInterference from BOPTools);

    class  CArray1OfVVInterference instantiates  
    	CArray1 from BOPTColStd(VVInterference from BOPTools);   
     
    class PavePool instantiates   
        CArray1 from BOPTColStd(PaveSet from BOPTools); 
        
    class ListOfPave instantiates  
    	List from TCollection(Pave);   
	
    class ListOfCommonBlock  instantiates  
    	List    from TCollection(CommonBlock from BOPTools); 
      
    class ListOfPaveBlock  instantiates  
    	List    from TCollection(PaveBlock from BOPTools); 
     
    class CommonBlockPool    instantiates  
    	CArray1 from BOPTColStd (ListOfCommonBlock from BOPTools); 

    class SplitShapesPool instantiates  
    	CArray1 from BOPTColStd (ListOfPaveBlock from  BOPTools); 
     
    class  Array1OfPave instantiates  
    	Array1 from TCollection (Pave from BOPTools); 
      
    class  CArray1OfPave instantiates  
    	CArray1 from BOPTColStd (Pave from BOPTools); 
     
    class QuickSortPave instantiates  
    	QuickSort from SortTools   (Pave from BOPTools, 
	    	    	    	    Array1OfPave from BOPTools, 
	    	    	    	    ComparePave from BOPTools); 

    class IndexedDataMapOfIntegerState instantiates  
    	IndexedDataMap from TCollection  (Integer from Standard, 
	    	    	    	    	  StateOfShape from BooleanOperations,
	    	    	    	    	  MapIntegerHasher from TColStd);	 

    class SequenceOfCurves instantiates  
    	Sequence from TCollection(Curve from BOPTools);

    class IndexedDataMapOfShapeWithState instantiates  
    	IndexedDataMap from TCollection  (Shape          from TopoDS, 
	    	    	    	    	  StateOfShape from BooleanOperations,
	    	    	    	    	  ShapeMapHasher from TopTools);  
    class  ListOfShapeEnum  instantiates 	 
    	List from TCollection(ShapeEnum from TopAbs); 				  

    class IndexedDataMapOfIntegerDEInfo instantiates  
    	IndexedDataMap from TCollection  (Integer from Standard, 
	    	    	    	    	  DEInfo from BOPTools,
	    	    	    	    	  MapIntegerHasher from TColStd);	
    
    class Array2OfIntersectionStatus instantiates 
	Array2 from TCollection (IntersectionStatus from BOPTools);
	
    class HArray2OfIntersectionStatus instantiates 
    	HArray2 from TCollection (IntersectionStatus from BOPTools,
    	    	    	    	  Array2OfIntersectionStatus from BOPTools);
				  
     class ListOfCheckResults instantiates 
    	List from TCollection (CheckResult from BOPTools);

    class RoughShapeIntersector; 
    class IteratorOfCoupleOfShape; 
    class SSIntersectionAttribute;

-- 
--  additions 
--
    class CoupleOfIntegerMapHasher; 
    class PaveBlockMapHasher;
     
    class IndexedMapOfCoupleOfInteger instantiates
    	IndexedMap from TCollection(CoupleOfInteger from BOPTools,
                                    CoupleOfIntegerMapHasher from BOPTools); 
				    
    class IndexedDataMapOfIntegerPaveSet instantiates  
    	IndexedDataMap from TCollection  (Integer from Standard, 
	    	    	    	    	  PaveSet from BOPTools,
	    	    	    	    	  MapIntegerHasher from TColStd);	
    class IMapOfPaveBlock instantiates  
     	IndexedMap from TCollection(PaveBlock from BOPTools, 
	    	    	    	    PaveBlockMapHasher from BOPTools);
	  
    class IDMapOfPaveBlockIMapOfPaveBlock instantiates  
    	IndexedDataMap from TCollection  (PaveBlock from BOPTools , 
	    	    	    	    	  IMapOfPaveBlock from BOPTools,
	    	    	    	    	  PaveBlockMapHasher from BOPTools); 
	 
    class IDMapOfPaveBlockIMapOfInteger instantiates  
    	IndexedDataMap from TCollection  (PaveBlock from BOPTools , 
	    	    	    	    	  IndexedMapOfInteger from TColStd,
	    	    	    	    	  PaveBlockMapHasher from BOPTools);				   
					  
    class SequenceOfPaveBlock instantiates  
    	Sequence from TCollection(PaveBlock from BOPTools);

end  BOPTools;