b311480e |
1 | -- Created on: 2001-03-29 |
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 | package BOP |
22 | |
23 | ---Purpose: Contains main and auxiliary classes to provide boolean operations |
24 | -- (BO) Common, Cut, Fuse, Section between a couple BRep shapes. |
25 | |
26 | uses |
27 | Geom2dInt, |
28 | TopoDS, |
29 | TopAbs, |
30 | TopTools, |
31 | TopExp, |
32 | gp, |
33 | TColgp, |
34 | ProjLib, |
35 | Geom2d, |
36 | Geom, |
37 | TColStd, |
38 | TopTools, |
39 | TCollection, |
40 | BRepClass, |
41 | BRep, |
42 | BRepClass3d, |
43 | BooleanOperations, |
44 | IntTools, |
45 | BOPTools, |
46 | BOPTColStd |
47 | |
48 | is |
49 | --- |
50 | --- E n u m e r a t i o n s |
51 | --- |
52 | enumeration Operation is |
53 | COMMON, |
54 | FUSE, |
55 | CUT, |
56 | CUT21, |
57 | SECTION, |
58 | UNKNOWN |
59 | end Operation; |
60 | |
61 | enumeration LoopEnum is |
62 | ANYLOOP, |
63 | BOUNDARY, |
64 | BLOCK |
65 | end LoopEnum; |
66 | |
67 | enumeration CheckStatus is |
68 | CheckUnknown, |
69 | BadType, |
70 | SelfIntersect, |
71 | TooSmallEdge, |
72 | NonRecoverableFace, |
73 | IncompatibilityOfVertex, |
74 | IncompatibilityOfEdge, |
75 | IncompatibilityOfFace |
76 | end CheckStatus; |
77 | --- |
78 | --- T h e C l a s s e s |
79 | --- |
80 | |
81 | deferred class Builder; |
82 | ---Purpose: |
83 | --- Root class for performing a BO |
84 | --- |
85 | class WireWire; |
86 | ---Purpose: |
87 | --- Performs BO (Common,Cut,Fuse) for wires(edges) |
88 | --- |
89 | class WireShell; |
90 | ---Purpose: |
91 | --- Performs BO (Common,Cut,Fuse) for wire(edge)/shell(face) |
92 | --- |
93 | class WireSolid; |
94 | ---Purpose: |
95 | --- Performs BO (Common,Cut,Fuse) for wire(edge)/solid |
96 | --- |
97 | class WireShape; |
98 | ---Purpose: |
99 | --- Root class for Wire/... Biulders |
100 | --- |
101 | |
102 | class SolidSolid; |
103 | ---Purpose: |
104 | --- Performs BO (Common,Cut,Fuse) for solids |
105 | --- |
106 | class ShellShell; |
107 | ---Purpose: |
108 | --- Performs BO (Common,Cut,Fuse) for shell/shell arguments |
109 | --- |
110 | class ShellSolid; |
111 | ---Purpose: |
112 | --- Performs BO (Common,Cut,Fuse) for shell/solid arguments |
113 | --- |
114 | |
115 | class EmptyBuilder; |
116 | ---Purpose: |
117 | --- Performs BO (Common,Cut,Fuse) for shapes |
118 | --- in cases when one of arguments(or both) is(are) empty |
119 | --- |
120 | deferred class HistoryCollector; |
121 | |
122 | class SolidSolidHistoryCollector; |
123 | |
124 | class ShellSolidHistoryCollector; |
125 | |
126 | class WireSolidHistoryCollector; |
127 | |
128 | class SectionHistoryCollector; |
129 | |
130 | class BuilderTools; |
131 | ---Purpose: |
132 | --- Handy tools to help building a result |
133 | --- |
134 | class Section; |
135 | ---Purpose: |
136 | --- Performs the BO (Section) |
137 | --- for the shapes where it is valid one |
138 | --- |
139 | class Refiner; |
140 | ---Purpose: |
141 | --- Refines the result of the BO if necessary |
142 | --- |
143 | class ShapeSet; |
144 | ---Purpose: |
145 | --- Root auxiliary class for set of shapes |
146 | --- to build new faces from wires,new solids from shells |
147 | --- |
148 | class WireEdgeSet; |
149 | ---Purpose: |
150 | --- Class for set of edges and wires to build new faces |
151 | --- |
152 | class ShellFaceSet; |
153 | ---Purpose: |
154 | --- Class for set of faces and shells to build new solids |
155 | --- |
156 | class BlockBuilder; |
157 | ---Purpose: |
158 | --- Auxiliary class to storage and operate with data of |
159 | --- connexity blocks inside |
160 | --- |
161 | class BlockIterator; |
162 | ---Purpose: |
163 | --- Auxiliary class to iterate data inside the given |
164 | --- connexity block |
165 | --- |
166 | class Loop; |
167 | ---Purpose: |
168 | --- Auxiliary class containing data about an existing shape |
169 | --- (Shell,Wire)or a set of shapes (Faces,Edges) which are connex. |
170 | --- |
171 | class LoopSet; |
172 | ---Purpose: |
173 | --- Auxiliary class to storage and iterate on Loop(s) |
174 | --- |
175 | |
176 | deferred class LoopClassifier; |
177 | ---Purpose: |
178 | --- Root class to classify loops in order to build Areas |
179 | --- |
180 | deferred class CompositeClassifier; |
181 | ---Purpose: |
182 | --- Cclassify composite Loops, i.e, loops that can be |
183 | --- either a Shape, or a block of Elements |
184 | --- |
185 | class WireEdgeClassifier; |
186 | ---Purpose: |
187 | --- Classify loops that consist of edges and wires |
188 | --- |
189 | class ShellFaceClassifier; |
190 | ---Purpose: |
191 | --- Classify loops that consist of faces and shells |
192 | --- |
193 | class AreaBuilder; |
194 | ---Purpose: |
195 | --- Root class to provide building valid areas from |
196 | --- corresponding shape sets |
197 | --- |
198 | class Area2dBuilder; |
199 | ---Purpose: |
200 | --- Constructs areas for Faces from a WireEdgeSet |
201 | --- |
202 | class FaceAreaBuilder; |
203 | ---Purpose: |
204 | --- constructs Loops for Faces from a WireEdgeSet |
205 | --- |
206 | class FaceBuilder; |
207 | ---Purpose: |
208 | --- construct Faces from a WireEdgeSet |
209 | --- |
210 | class Area3dBuilder; |
211 | ---Purpose: |
212 | --- Constructs areas for Faces from a WireEdgeSet |
213 | --- |
214 | class SolidAreaBuilder; |
215 | ---Purpose: |
216 | --- Constructs areas for Solids from a ShellFaceSet |
217 | --- |
218 | class SolidBuilder; |
219 | ---Purpose: |
220 | --- Constructs Solids from a ShellFaceSet |
221 | --- |
222 | class EdgeInfo; |
223 | ---Purpose: |
224 | --- Auxiliary class to store data about edges on a face |
225 | --- that have common vertex |
226 | --- |
227 | class FaceInfo; |
228 | ---Purpose: |
229 | --- Auxiliary class to store data about faces on a shell |
230 | --- that have common edge |
231 | --- |
232 | class WireSplitter; |
233 | ---Purpose: |
234 | --- The algorithm to split invalid (multiconnexed) |
235 | --- wires on a face onto valid ones |
236 | --- |
237 | class ShellSplitter; |
238 | ---Purpose: |
239 | --- The algorithm to split invalid (multiconnexed) |
240 | --- shells on a solid onto valid ones |
241 | --- |
242 | class ConnexityBlock; |
243 | ---Purpose: |
244 | --- Auxiliary class to create and store data about a set |
245 | --- of connex shapes |
246 | --- |
247 | class WESCorrector; |
248 | ---Purpose: |
249 | --- The algorithm to change the WES contents |
250 | --- The NewWES will contain only wires instead of |
251 | --- wires and edges. |
252 | --- |
253 | class SFSCorrector; |
254 | ---Purpose: |
255 | --- The algorithm to change the SFS contents. |
256 | --- The NewSFS will contain only shells instead of |
257 | --- shells and faces. |
258 | --- |
259 | |
260 | class CorrectTolerances; |
261 | ---Purpose: |
262 | --- Auxiliary class to provide valid values for result's tolerances' |
263 | --- |
264 | class Draw; |
265 | ---Purpose: |
266 | --- Auxiliary class to display intermediate results in Draw's windows |
267 | --- for the debugging purposes |
268 | --- |
269 | class SDFWESFiller; |
270 | ---Purpose: |
271 | --- Fills a wire edges set for a couple of faces that are same domain |
272 | --- |
273 | |
274 | class CheckResult; |
275 | class ArgumentAnalyzer; |
276 | --- |
277 | --- P o i n t e r s |
278 | --- |
279 | pointer PWireEdgeSet to WireEdgeSet from BOP; |
280 | pointer PShellFaceSet to ShellFaceSet from BOP; |
281 | pointer PBuilder to Builder from BOP; |
282 | |
283 | --- |
284 | --- I n s t a n t i a t i o n s |
285 | --- |
286 | class ListOfConnexityBlock instantiates |
287 | List from TCollection(ConnexityBlock from BOP); |
288 | |
289 | class ListOfLoop instantiates |
290 | List from TCollection(Loop from BOP); |
291 | |
292 | class ListOfListOfLoop instantiates |
293 | List from TCollection(ListOfLoop from BOP); |
294 | |
295 | class ListOfEdgeInfo instantiates |
296 | List from TCollection(EdgeInfo from BOP); |
297 | |
298 | class IndexedDataMapOfVertexListEdgeInfo instantiates |
299 | IndexedDataMap from TCollection(Shape from TopoDS, |
300 | ListOfEdgeInfo from BOP, |
301 | ShapeMapHasher from TopTools); |
302 | class ListOfFaceInfo instantiates |
303 | List from TCollection(FaceInfo from BOP); |
304 | |
305 | class IndexedDataMapOfEdgeListFaceInfo instantiates |
306 | IndexedDataMap from TCollection(Shape from TopoDS, |
307 | ListOfFaceInfo from BOP, |
308 | ShapeMapHasher from TopTools); |
309 | class SeqOfSeqOfShape instantiates |
310 | Sequence from TCollection(SequenceOfShape from TopTools); |
311 | |
312 | |
313 | -- |
314 | class SolidClassifier; |
315 | |
316 | pointer PSoClassif to SolidClassifier from BRepClass3d; |
317 | |
318 | class IndexedDataMapOfSolidClassifier instantiates |
319 | IndexedDataMap from TCollection (Shape from TopoDS, |
320 | PSoClassif from BOP, |
321 | ShapeMapHasher from TopTools); |
322 | |
323 | class ListOfCheckResult instantiates |
324 | List from TCollection(CheckResult from BOP); |
325 | -- |
326 | |
327 | |
328 | end BOP; |
329 | |