7fd59977 |
1 | -- File: BooleanOperations_ShapesDataStructure.cdl |
2 | -- Created: Thu Aug 10 10:29:38 2000 |
3 | -- Author: Vincent DELOS |
4 | -- <vds@bulox.paris1.matra-dtv.fr> |
5 | ---Copyright: Matra Datavision 2000 |
6 | |
7 | |
8 | class ShapesDataStructure from BooleanOperations |
9 | |
10 | ---Purpose: |
11 | |
12 | uses |
13 | Box from Bnd, |
14 | Shape from TopoDS, |
15 | ShapeEnum from TopAbs, |
16 | Orientation from TopAbs, |
17 | StateOfShape from BooleanOperations, |
18 | --modified by NIZNHY-PKV Wed Feb 2 14:20:09 2005f |
19 | -- InterferencesList from BooleanOperations, |
20 | -- InterferenceResult from BooleanOperations, |
21 | --modified by NIZNHY-PKV Wed Feb 2 14:20:14 2005t |
22 | ShapeAndInterferences from BooleanOperations, |
23 | AncestorsAndSuccessors from BooleanOperations, |
24 | PShapeAndInterferences from BooleanOperations, |
25 | IndexedMapOfInteger from TColStd, |
26 | IndexedMapOfShape from TopTools, |
27 | IndexedMapOfOrientedShape from TopTools, |
28 | AncestorsSeqAndSuccessorsSeq from BooleanOperations, |
29 | IndexedDataMapOfShapeAncestorsSuccessors from BooleanOperations, |
30 | IndexedDataMapOfShapeInteger from BooleanOperations, |
31 | CArray1OfInteger from BOPTColStd |
32 | |
33 | --raises |
34 | |
35 | is |
36 | Create |
37 | returns ShapesDataStructure; |
38 | ---C++: alias "Standard_EXPORT virtual ~BooleanOperations_ShapesDataStructure();" |
39 | --modified by NIZNHY-PKV Wed Feb 2 11:34:40 2005ft |
40 | Create (Object,Tool: Shape from TopoDS) |
41 | returns ShapesDataStructure; |
42 | |
43 | --modified by NIZNHY-PKV Wed Feb 2 11:34:46 2005ft |
44 | Destroy(me: in out) |
45 | is protected; |
46 | -- --C++: alias ~ |
47 | |
48 | ReInit (me:in out) |
49 | is private; |
50 | |
51 | InsertShapeAndAncestorsSuccessors (me:in out; |
52 | S: Shape from TopoDS; |
53 | AncSuc: AncestorsSeqAndSuccessorsSeq; |
54 | shift: Integer=0); |
55 | ---Purpose: fill a line of the data structure, the shift is used |
56 | -- for the numbers of the shapes of the Tool. |
57 | |
58 | |
59 | |
60 | FillIndexedMapOfShapesAncestorsAndSuccessors (me; |
61 | Sha: Shape from TopoDS; |
62 | IndDatMap:out IndexedDataMapOfShapeAncestorsSuccessors); |
63 | ---Purpose: to find the data structure we first decompose the |
64 | -- Object and Tool in the indexed data map of shapes. |
65 | |
66 | FindSubshapes (me; |
67 | Sha: Shape from TopoDS; |
68 | TotalNumberOfShapes:out Integer from Standard; |
69 | IndDatMap:out IndexedDataMapOfShapeAncestorsSuccessors); |
70 | ---Purpose: to find all the subshapes of Sha and store them in |
71 | -- IndDatMap if they had not been already taken into account. |
72 | |
73 | Dump (me; |
74 | S : in out OStream); |
75 | ---Purpose: dump the content of the fields. |
76 | LightDump (me; |
77 | S : in out OStream); |
78 | ---Purpose: dump the types of the shapes. |
79 | |
80 | -------------------- |
81 | -- INLINE METHODS -- |
82 | -------------------- |
83 | GetShape (me; |
84 | index: Integer from Standard) |
85 | returns Shape from TopoDS; |
86 | ---C++: return const & |
87 | |
88 | Shape (me; |
89 | anIndex: Integer from Standard) |
90 | returns Shape from TopoDS; |
91 | ---C++: return const & |
92 | |
93 | |
94 | |
95 | GetShapeType (me; |
96 | index: Integer from Standard) |
97 | returns ShapeEnum from TopAbs; |
98 | |
99 | GetBoundingBox (me; |
100 | index: Integer from Standard) |
101 | returns Box; |
102 | ---C++: return const & |
103 | |
104 | GetState (me; |
105 | index: Integer from Standard) |
106 | returns StateOfShape from BooleanOperations; |
107 | |
108 | SetState (me:in out; |
109 | index: Integer from Standard; |
110 | theState: StateOfShape from BooleanOperations); |
111 | |
112 | GetAncestor(me; |
113 | index: Integer from Standard; |
114 | ancestorNumber: Integer from Standard) |
115 | returns Integer from Standard; |
116 | |
117 | GetSuccessor(me; |
118 | index: Integer from Standard; |
119 | successorNumber: Integer from Standard) |
120 | returns Integer from Standard; |
121 | |
122 | GetAncestors (me; |
123 | index: Integer from Standard; |
124 | theArrayOfAncestors: out Address from Standard; |
125 | AncestorsSize:out Integer from Standard); |
126 | |
127 | GetSuccessors (me; |
128 | index: Integer from Standard; |
129 | theArrayOfSuccessors:out Address from Standard; |
130 | SuccessorsSize:out Integer from Standard); |
131 | |
132 | |
133 | |
134 | NumberOfAncestors (me; |
135 | index: Integer from Standard) |
136 | returns Integer from Standard; |
137 | |
138 | NumberOfSuccessors (me; |
139 | index: Integer from Standard) |
140 | returns Integer from Standard; |
141 | |
142 | |
143 | |
144 | |
145 | NumberOfShapesOfTheTool (me) |
146 | returns Integer from Standard; |
147 | |
148 | NumberOfShapesOfTheObject (me) |
149 | returns Integer from Standard; |
150 | |
151 | -- |
152 | NumberOfSourceShapes (me) |
153 | returns Integer from Standard ; |
154 | |
155 | IsNewShape (me; |
156 | index: Integer from Standard) |
157 | returns Boolean from Standard ; |
158 | |
159 | --NumberOfShapesOfTheTool+NumberOfShapesOfTheObject+NewShapes |
160 | NumberOfInsertedShapes(me) |
161 | returns Integer from Standard ; |
162 | |
163 | NumberOfNewShapes(me) |
164 | returns Integer from Standard ; |
165 | |
166 | Line (me; index: Integer from Standard) |
167 | returns ShapeAndInterferences from BooleanOperations; |
168 | ---C++: return const & |
169 | |
170 | |
171 | ShapeIndexMap (me; |
172 | iRank:Integer from Standard) |
173 | returns IndexedDataMapOfShapeInteger from BooleanOperations; |
174 | ---C++: return const & |
175 | |
176 | ShapeIndex (me; |
177 | aS:Shape from TopoDS; |
178 | iRank:Integer from Standard) |
179 | returns Integer from Standard |
180 | is virtual;--modified by NIZNHY-PKV Thu Feb 5 14:20:31 2004 |
181 | |
182 | Object (me) |
183 | returns Shape from TopoDS; |
184 | ---C++: return const & |
185 | |
186 | Tool (me) |
187 | returns Shape from TopoDS; |
188 | ---C++: return const & |
189 | |
190 | ObjectRange (me; |
191 | iFirst:out Integer from Standard; |
192 | iLast :out Integer from Standard); |
193 | |
194 | ToolRange (me; |
195 | iFirst:out Integer from Standard; |
196 | iLast :out Integer from Standard); |
197 | |
198 | Rank (me; |
199 | anIndex:Integer from Standard) |
200 | returns Integer from Standard -- 1-Object, 2-Tool, 3-New 0-? |
201 | is virtual; --XX |
202 | |
203 | RefEdge(me; |
204 | anIndex:Integer from Standard) |
205 | returns Integer from Standard; |
206 | ---Purpose: for given index "anIndex" of an edge in DS get |
207 | --- reference index of an edge |
208 | |
209 | NbEdges(me) |
210 | returns Integer from Standard; |
211 | ---Purpose: returns number of edges from source shapes |
212 | |
213 | GetOrientation (me; |
214 | index: Integer from Standard; |
215 | successorNumber: Integer from Standard) |
216 | returns Orientation; |
217 | |
218 | GetOrientations (me; |
219 | index: Integer from Standard; |
220 | theArrayOfOrientations:out Address; |
221 | OrientationsSize:out Integer from Standard); |
222 | |
223 | --modified by NIZNHY-PKV Thu Feb 3 11:17:25 2005f |
224 | -- InsertInterference (me:in out; |
225 | -- index: Integer; IR: InterferenceResult); |
226 | -- GetInterference (me; |
227 | -- index: Integer from Standard; |
228 | -- interfNumber: Integer from Standard) |
229 | -- returns InterferenceResult; |
230 | -- --C++: return const & |
231 | -- GetIntersectedShape (me; |
232 | -- index: Integer from Standard; |
233 | -- interfNumber: Integer from Standard) |
234 | -- returns Integer from Standard; |
235 | |
236 | -- GetIntersectionResult (me; |
237 | -- index: Integer from Standard; |
238 | -- interfNumber: Integer from Standard) |
239 | -- returns Integer from Standard; |
240 | |
241 | -- NumberOfInterferences (me; index: Integer) |
242 | -- returns Integer from Standard; |
243 | --modified by NIZNHY-PKV Wed Feb 2 14:18:57 2005t |
244 | |
245 | fields |
246 | |
247 | myListOfShapeAndInterferences : PShapeAndInterferences from BooleanOperations is protected; |
248 | ---Purpose: gives the number of interferences inserted in myListOfInterferences. |
249 | |
250 | myNumberOfShapesOfTheObject : Integer is protected; |
251 | ---Purpose: the total number of the shapes of the Object. |
252 | |
253 | myNumberOfShapesOfTheTool : Integer is protected; |
254 | ---Purpose: the total number of the shapes of the Tool. |
255 | |
256 | myNumberOfInsertedShapes : Integer is protected; |
257 | ---Purpose: the total number of the shapes of the Object, Tool and |
258 | -- also the shapes created by interferences. |
259 | myLength : Integer is protected; |
260 | ---Purpose: the total number of allocated space to store. |
261 | |
262 | -- |
263 | myObject : Shape from TopoDS is protected; |
264 | |
265 | myTool : Shape from TopoDS is protected; |
266 | -- |
267 | myShapeIndexMapObj : IndexedDataMapOfShapeInteger from BooleanOperations is protected; |
268 | |
269 | myShapeIndexMapTool: IndexedDataMapOfShapeInteger from BooleanOperations is protected; |
270 | |
271 | -- |
272 | myRefEdges: CArray1OfInteger from BOPTColStd is protected; |
273 | |
274 | myNbEdges : Integer from Standard is protected; |
275 | -- |
276 | |
277 | friends |
278 | |
279 | class Explorer from BooleanOperations, |
280 | class OnceExplorer from BooleanOperations |
281 | |
282 | end ShapesDataStructure; |