7fd59977 |
1 | -- File: BooleanOperations.cdl |
2 | -- Created: Mon Jul 10 10:19:21 2000 |
3 | -- Author: Vincent DELOS |
4 | -- <vds@bulox.paris1.matra-dtv.fr> |
5 | ---Copyright: Matra Datavision 2000 |
6 | |
7 | |
8 | package BooleanOperations |
9 | |
10 | ---Purpose: package to perform Boolean Operations between two |
11 | -- solids called Object and Tool. |
12 | |
13 | uses |
14 | gp, |
15 | Bnd, |
16 | math, |
17 | BRep, |
18 | Geom, |
19 | TopAbs, |
20 | TopExp, |
21 | TopoDS, |
22 | TColStd, |
23 | TopTools, |
24 | Standard, |
25 | TCollection, |
26 | BRepAdaptor, |
27 | GeomAdaptor, |
28 | IntTools, |
29 | BOPTColStd |
30 | is |
31 | |
32 | class AncestorsAndSuccessors; |
33 | ---Purpose: to have a fast access in the class ShapesDataStructure |
34 | -- to the upper and lower shapes of a given shape. |
35 | -- e.g. : ancestors of an edge are the wires that contain |
36 | -- it and its successors are the vertices that it holds. |
37 | |
38 | |
39 | --modified by NIZNHY-PKV Wed Feb 2 14:47:51 2005f |
40 | -- class InterferenceResult; |
41 | --Purpose: to describe a single interference between two shapes |
42 | -- in the class ShapesDataStructure. |
43 | |
44 | -- pointer PInterferenceResult to InterferenceResult from BooleanOperations; |
45 | |
46 | -- class InterferencesList; |
47 | --Purpose: if the considered shape S belongs to the Object this |
48 | -- class will list all the shapes of the Tool whose |
49 | -- bounding boxes intersects with the bounding box of S; |
50 | -- if S belongs to the Tool we store all the shapes of |
51 | -- the Object whose intersection with S is not empty. |
52 | --modified by NIZNHY-PKV Wed Feb 2 14:48:00 2005t |
53 | |
54 | class ShapeAndInterferences; |
55 | ---Purpose: contains a shape S, its bounding box, its state |
56 | -- according to the other solid, its ancestors and |
57 | -- successors, all of its interferences with the other |
58 | -- solid. |
59 | |
60 | pointer PShapeAndInterferences to ShapeAndInterferences from BooleanOperations; |
61 | |
62 | class ShapesDataStructure; |
63 | ---Purpose: contains all the shapes of the Object and Tool, all |
64 | -- the shapes created by intersection, their bounding |
65 | -- boxes, their states, their ancestors and successors, |
66 | -- and all of their interferences. |
67 | |
68 | pointer PShapesDataStructure to ShapesDataStructure from BooleanOperations; |
69 | |
70 | class Explorer; |
71 | ---Purpose: to find subshapes of a given shape of the Data Structure. |
72 | |
73 | class OnceExplorer; |
74 | ---Purpose: the derived class of Explorer to find subshapes only once. |
75 | |
76 | --class BooleanOperations; |
77 | ---Purpose: is to be deferred with inherited classes Cut, Common, |
78 | -- Fuse to perform boolean operations . |
79 | |
80 | |
81 | enumeration StateOfShape is |
82 | ---Purpose: State of a Shape of the 1st solid according to the |
83 | -- 2nd one. State INOROUT is used when we know that |
84 | -- a shape is totally IN or totally OUT. State |
85 | -- INTERSECTED refers to a shape of the 1st solid cut |
86 | -- by the 2nd solid. When a shape has a state |
87 | -- different of INTERSECTED or UNKNOWN all of its |
88 | -- subshapes have the same state. |
89 | IN, |
90 | OUT, |
91 | ON, |
92 | UNKNOWN, |
93 | INOROUT, |
94 | INTERSECTED |
95 | end StateOfShape; |
96 | |
97 | enumeration KindOfInterference is |
98 | ---Purpose: Interferences describe an intersection between two |
99 | -- shapes. They are classified following a hierarchy |
100 | -- from the lower until the upper. |
101 | SurfaceSurface, |
102 | EdgeSurface, |
103 | VertexSurface, |
104 | EdgeEdge, |
105 | VertexEdge, |
106 | VertexVertex, |
107 | UnknownInterference |
108 | end StateOfShape; |
109 | |
110 | enumeration KindOfIntersection is |
111 | ---Purpose: Describes the fact that we can have no |
112 | -- intersection between two shapes, or a true or a |
113 | -- tangent one. |
114 | NoIntersection, |
115 | TrueIntersection, |
116 | SameDomain |
117 | end KindOfIntersection; |
118 | |
119 | |
120 | ------------------------ |
121 | -- For internal needs -- |
122 | ------------------------ |
123 | |
124 | class AncestorsSeqAndSuccessorsSeq; |
125 | |
126 | class IndexedDataMapOfShapeAncestorsSuccessors instantiates IndexedDataMap from TCollection |
127 | (Shape from TopoDS,AncestorsSeqAndSuccessorsSeq from BooleanOperations,ShapeMapHasher from TopTools); |
128 | |
129 | |
130 | |
131 | class IndexedDataMapOfShapeInteger instantiates |
132 | IndexedDataMap from TCollection(Shape from TopoDS, |
133 | Integer from Standard, |
134 | ShapeMapHasher from TopTools); |
135 | |
136 | end BooleanOperations; |
137 | |
138 | |
139 | |