summaryrefslogtreecommitdiff
path: root/src/BOP/BOP.cdl
blob: d9f1fac8cd94bb19819dafc80aa42ed8ece6d719 (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
-- File:	BOP.cdl
-- Created:	Thu Mar 29 10:55:43 2001
-- Author:	Peter KURNEV
--		<pkv@irinox>
---Copyright:	 Matra Datavision 2001

package BOP  

    ---Purpose: Contains main and auxiliary classes to provide boolean operations   
    --          (BO)   Common,  Cut,  Fuse, Section between a couple BRep shapes. 

uses   
    Geom2dInt,
    TopoDS, 
    TopAbs, 
    TopTools, 
    TopExp, 
    gp,  
    TColgp,
    ProjLib, 
    Geom2d, 
    Geom,  
    TColStd, 
    TopTools,
    TCollection,  
    BRepClass, 
    BRep, 
    BRepClass3d,
    BooleanOperations,
    IntTools,
    BOPTools, 
    BOPTColStd

is 
    ---
    ---                     E  n  u  m  e  r  a  t  i  o  n  s            
    --- 
    enumeration Operation is  
    	COMMON, 
	FUSE, 
	CUT,  
	CUT21,
	SECTION, 
	UNKNOWN
    	end Operation;  
	
    enumeration LoopEnum is 
    	ANYLOOP, 
    	BOUNDARY, 
    	BLOCK  
    	end LoopEnum; 

    enumeration CheckStatus is
    	CheckUnknown,
	BadType,
	SelfIntersect,
	TooSmallEdge,
	NonRecoverableFace,
	IncompatibilityOfVertex,
	IncompatibilityOfEdge,
	IncompatibilityOfFace
	end CheckStatus;
    ---
    ---                          T  h  e    C  l  a  s  s  e  s  	        
    ---   
    
    deferred class Builder;   
    	---Purpose: 
    	--- Root class for performing a BO      
	---  
    class WireWire;  
	---Purpose: 
    	--- Performs BO (Common,Cut,Fuse) for wires(edges)  
	---   
    class WireShell;  
	---Purpose: 
    	--- Performs BO (Common,Cut,Fuse) for wire(edge)/shell(face)  
	--- 
    class WireSolid; 
    	---Purpose: 
    	--- Performs BO (Common,Cut,Fuse) for wire(edge)/solid  
	---  
    class WireShape; 
    	---Purpose: 
    	--- Root  class  for  Wire/...  Biulders  
	---  
    
    class SolidSolid; 
     	---Purpose: 
    	--- Performs BO (Common,Cut,Fuse) for solids  
	---
    class ShellShell; 
     	---Purpose: 
    	--- Performs BO (Common,Cut,Fuse) for shell/shell arguments  
	--- 
    class ShellSolid; 
     	---Purpose: 
    	--- Performs BO (Common,Cut,Fuse) for shell/solid arguments  
    	---  
     
    class EmptyBuilder; 
     	---Purpose: 
    	--- Performs BO (Common,Cut,Fuse)   for shapes 
	--- in cases when one of arguments(or both) is(are) empty
    	---     	 
    deferred class HistoryCollector;

    class SolidSolidHistoryCollector;

    class ShellSolidHistoryCollector;
    
    class WireSolidHistoryCollector;
    
    class SectionHistoryCollector;

    class BuilderTools; 
    ---Purpose: 
    	--- Handy  tools to help building a result 
        ---     
    class Section;  
    	---Purpose: 
    	--- Performs the BO (Section) 
    	--- for the shapes where it is valid one   
	--- 
    class  Refiner; 
    	---Purpose: 
    	--- Refines the result of the BO if necessary   
	---    	 
    class ShapeSet; 
    	---Purpose: 
    	--- Root auxiliary class for set of shapes
        --- to build new faces from wires,new solids from shells 
	---
    class WireEdgeSet;  
    	---Purpose: 
    	--- Class for set of edges and wires to build new faces
	---          	    	 
    class ShellFaceSet; 
    	---Purpose: 
    	--- Class for set of faces and shells to build new solids
	--- 
    class BlockBuilder; 
    	---Purpose: 
	---  Auxiliary class to storage and operate with data of  
        ---  connexity blocks inside  
	---    	 
    class BlockIterator;
     	---Purpose: 
	---  Auxiliary class to iterate data inside the given  
    	---  connexity block 
	---    	
    class Loop;  
    	---Purpose: 
    	---  Auxiliary class containing data about an existing shape  
    	---  (Shell,Wire)or a set of shapes (Faces,Edges) which are connex.
	---    	
    class LoopSet;  
    	---Purpose: 
    	---  Auxiliary class to storage  and  iterate on  Loop(s) 
	---  

    deferred  class LoopClassifier; 
    	---Purpose: 
    	---  Root class to classify loops in order to build Areas 
	---  
    deferred  class CompositeClassifier;  
    	---Purpose: 
    	---  Cclassify composite Loops, i.e, loops that can be  
    	---  either a Shape, or a block of Elements 
	--- 
    class WireEdgeClassifier;   
    	---Purpose: 
    	---  Classify loops that consist of edges and wires
	--- 
    class ShellFaceClassifier;
     	---Purpose: 
    	---  Classify loops that consist of faces and shells
	--- 
    class AreaBuilder;    
    	---Purpose: 
    	---  Root class to provide building valid areas from        
	---  corresponding shape sets  
	---
    class Area2dBuilder;    
    	---Purpose: 
    	---  Constructs areas for Faces from a WireEdgeSet        
	---
    class FaceAreaBuilder;   
    	---Purpose: 
    	---   constructs Loops for  Faces from a WireEdgeSet        
	---
    class FaceBuilder;   
    	---Purpose: 
    	---   construct Faces from a WireEdgeSet        
	---
    class Area3dBuilder; 
    	---Purpose: 
    	---  Constructs areas for Faces from a WireEdgeSet    
	---
    class SolidAreaBuilder; 
    	---Purpose: 
    	---  Constructs areas for Solids from a ShellFaceSet        
	--- 
    class SolidBuilder;
    	---Purpose: 
    	---  Constructs Solids from a ShellFaceSet        
	--- 
    class EdgeInfo; 
    	---Purpose: 
    	---  Auxiliary class to store data about edges on  a  face 
    	---  that have common vertex         	 
	--- 
    class FaceInfo;  
     	---Purpose: 
    	---  Auxiliary class to store data about faces on a  shell 
    	---  that have common edge         	 
	--- 
    class WireSplitter;   
    	---Purpose: 
    	---  The algorithm to split invalid (multiconnexed)   
    	---  wires on a face onto valid  ones 
	---
    class ShellSplitter; 
    	---Purpose: 
    	---  The algorithm to split invalid (multiconnexed)   
    	---  shells on a solid onto valid  ones 
	---
    class ConnexityBlock; 
	---Purpose: 
    	---  Auxiliary class to create and  store data about a set  
    	---  of connex shapes 
	---    	     
    class WESCorrector;  
    	---Purpose:   
    	---  The algorithm to change the WES contents      
    	---  The NewWES will contain only wires  instead of   
	---  wires and edges. 
	---
    class SFSCorrector;   
    	---Purpose: 
    	---  The algorithm to change the SFS contents.
    	---  The NewSFS will contain only shells  instead of   
	---  shells and faces.
	---
    	 
    class CorrectTolerances;  
      	---Purpose: 
	---  Auxiliary class to provide valid values  for result's tolerances'     
    	---
    class Draw; 
	---Purpose: 
	---  Auxiliary class to display intermediate results in  Draw's windows     
    	---  for the debugging purposes 
	---    	 
    class SDFWESFiller; 
    	---Purpose: 
	---  Fills a  wire  edges set for a couple of faces that are same domain 
	---   

    class CheckResult;
    class ArgumentAnalyzer;
    ---
    ---                          P  o  i  n  t  e  r  s  	        
    ---
    pointer PWireEdgeSet  to WireEdgeSet  from BOP;
    pointer PShellFaceSet to ShellFaceSet from BOP;
    pointer PBuilder to Builder from BOP;  

    ---
    ---                 I  n  s  t  a  n  t  i  a  t  i  o  n  s  
    ---
    class ListOfConnexityBlock instantiates  
    	List from TCollection(ConnexityBlock from BOP);  
	
    class ListOfLoop instantiates  
    	List from TCollection(Loop from BOP); 
     
    class ListOfListOfLoop instantiates  
    	List from TCollection(ListOfLoop from BOP); 
	 
    class ListOfEdgeInfo  instantiates 	 
    	List from TCollection(EdgeInfo from BOP); 	    		 

    class IndexedDataMapOfVertexListEdgeInfo instantiates 
	IndexedDataMap from TCollection(Shape          from TopoDS,
	    	    	    	    	ListOfEdgeInfo from BOP,
                                        ShapeMapHasher from TopTools); 
    class ListOfFaceInfo  instantiates 	 
    	List from TCollection(FaceInfo from BOP);  
     
    class IndexedDataMapOfEdgeListFaceInfo instantiates 
	IndexedDataMap from TCollection(Shape          from TopoDS,
	    	    	    	    	ListOfFaceInfo from BOP,
                                        ShapeMapHasher from TopTools);  
    class SeqOfSeqOfShape instantiates  
    	Sequence from TCollection(SequenceOfShape from TopTools); 

    
-- 
    class SolidClassifier; 

    pointer PSoClassif to SolidClassifier from BRepClass3d; 
     
    class IndexedDataMapOfSolidClassifier instantiates  
    	IndexedDataMap from TCollection (Shape from TopoDS,
     	                                 PSoClassif from BOP,
     	                                 ShapeMapHasher from TopTools);
					 
    class ListOfCheckResult instantiates  
    	List from TCollection(CheckResult from BOP);
--
					   
					  
end BOP;