1 -- Created on: 2000-08-10
2 -- Created by: Vincent DELOS
3 -- Copyright (c) 2000-2012 OPEN CASCADE SAS
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.
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.
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.
22 class ShapesDataStructure from BooleanOperations
29 ShapeEnum from TopAbs,
30 Orientation from TopAbs,
31 StateOfShape from BooleanOperations,
32 --modified by NIZNHY-PKV Wed Feb 2 14:20:09 2005f
33 -- InterferencesList from BooleanOperations,
34 -- InterferenceResult from BooleanOperations,
35 --modified by NIZNHY-PKV Wed Feb 2 14:20:14 2005t
36 ShapeAndInterferences from BooleanOperations,
37 AncestorsAndSuccessors from BooleanOperations,
38 PShapeAndInterferences from BooleanOperations,
39 IndexedMapOfInteger from TColStd,
40 IndexedMapOfShape from TopTools,
41 IndexedMapOfOrientedShape from TopTools,
42 AncestorsSeqAndSuccessorsSeq from BooleanOperations,
43 IndexedDataMapOfShapeAncestorsSuccessors from BooleanOperations,
44 IndexedDataMapOfShapeInteger from BooleanOperations,
45 CArray1OfInteger from BOPTColStd
51 returns ShapesDataStructure;
52 ---C++: alias "Standard_EXPORT virtual ~BooleanOperations_ShapesDataStructure();"
53 --modified by NIZNHY-PKV Wed Feb 2 11:34:40 2005ft
54 Create (Object,Tool: Shape from TopoDS)
55 returns ShapesDataStructure;
57 --modified by NIZNHY-PKV Wed Feb 2 11:34:46 2005ft
65 InsertShapeAndAncestorsSuccessors (me:in out;
67 AncSuc: AncestorsSeqAndSuccessorsSeq;
69 ---Purpose: fill a line of the data structure, the shift is used
70 -- for the numbers of the shapes of the Tool.
74 FillIndexedMapOfShapesAncestorsAndSuccessors (me;
75 Sha: Shape from TopoDS;
76 IndDatMap:out IndexedDataMapOfShapeAncestorsSuccessors);
77 ---Purpose: to find the data structure we first decompose the
78 -- Object and Tool in the indexed data map of shapes.
81 Sha: Shape from TopoDS;
82 TotalNumberOfShapes:out Integer from Standard;
83 IndDatMap:out IndexedDataMapOfShapeAncestorsSuccessors);
84 ---Purpose: to find all the subshapes of Sha and store them in
85 -- IndDatMap if they had not been already taken into account.
89 ---Purpose: dump the content of the fields.
92 ---Purpose: dump the types of the shapes.
98 index: Integer from Standard)
99 returns Shape from TopoDS;
100 ---C++: return const &
103 anIndex: Integer from Standard)
104 returns Shape from TopoDS;
105 ---C++: return const &
110 index: Integer from Standard)
111 returns ShapeEnum from TopAbs;
114 index: Integer from Standard)
116 ---C++: return const &
119 index: Integer from Standard)
120 returns StateOfShape from BooleanOperations;
123 index: Integer from Standard;
124 theState: StateOfShape from BooleanOperations);
127 index: Integer from Standard;
128 ancestorNumber: Integer from Standard)
129 returns Integer from Standard;
132 index: Integer from Standard;
133 successorNumber: Integer from Standard)
134 returns Integer from Standard;
137 index: Integer from Standard;
138 theArrayOfAncestors: out Address from Standard;
139 AncestorsSize:out Integer from Standard);
142 index: Integer from Standard;
143 theArrayOfSuccessors:out Address from Standard;
144 SuccessorsSize:out Integer from Standard);
148 NumberOfAncestors (me;
149 index: Integer from Standard)
150 returns Integer from Standard;
152 NumberOfSuccessors (me;
153 index: Integer from Standard)
154 returns Integer from Standard;
159 NumberOfShapesOfTheTool (me)
160 returns Integer from Standard;
162 NumberOfShapesOfTheObject (me)
163 returns Integer from Standard;
166 NumberOfSourceShapes (me)
167 returns Integer from Standard ;
170 index: Integer from Standard)
171 returns Boolean from Standard ;
173 --NumberOfShapesOfTheTool+NumberOfShapesOfTheObject+NewShapes
174 NumberOfInsertedShapes(me)
175 returns Integer from Standard ;
177 NumberOfNewShapes(me)
178 returns Integer from Standard ;
180 Line (me; index: Integer from Standard)
181 returns ShapeAndInterferences from BooleanOperations;
182 ---C++: return const &
186 iRank:Integer from Standard)
187 returns IndexedDataMapOfShapeInteger from BooleanOperations;
188 ---C++: return const &
191 aS:Shape from TopoDS;
192 iRank:Integer from Standard)
193 returns Integer from Standard
194 is virtual;--modified by NIZNHY-PKV Thu Feb 5 14:20:31 2004
197 returns Shape from TopoDS;
198 ---C++: return const &
201 returns Shape from TopoDS;
202 ---C++: return const &
205 iFirst:out Integer from Standard;
206 iLast :out Integer from Standard);
209 iFirst:out Integer from Standard;
210 iLast :out Integer from Standard);
213 anIndex:Integer from Standard)
214 returns Integer from Standard -- 1-Object, 2-Tool, 3-New 0-?
218 anIndex:Integer from Standard)
219 returns Integer from Standard;
220 ---Purpose: for given index "anIndex" of an edge in DS get
221 --- reference index of an edge
224 returns Integer from Standard;
225 ---Purpose: returns number of edges from source shapes
228 index: Integer from Standard;
229 successorNumber: Integer from Standard)
233 index: Integer from Standard;
234 theArrayOfOrientations:out Address;
235 OrientationsSize:out Integer from Standard);
237 --modified by NIZNHY-PKV Thu Feb 3 11:17:25 2005f
238 -- InsertInterference (me:in out;
239 -- index: Integer; IR: InterferenceResult);
240 -- GetInterference (me;
241 -- index: Integer from Standard;
242 -- interfNumber: Integer from Standard)
243 -- returns InterferenceResult;
244 -- --C++: return const &
245 -- GetIntersectedShape (me;
246 -- index: Integer from Standard;
247 -- interfNumber: Integer from Standard)
248 -- returns Integer from Standard;
250 -- GetIntersectionResult (me;
251 -- index: Integer from Standard;
252 -- interfNumber: Integer from Standard)
253 -- returns Integer from Standard;
255 -- NumberOfInterferences (me; index: Integer)
256 -- returns Integer from Standard;
257 --modified by NIZNHY-PKV Wed Feb 2 14:18:57 2005t
261 myListOfShapeAndInterferences : PShapeAndInterferences from BooleanOperations is protected;
262 ---Purpose: gives the number of interferences inserted in myListOfInterferences.
264 myNumberOfShapesOfTheObject : Integer is protected;
265 ---Purpose: the total number of the shapes of the Object.
267 myNumberOfShapesOfTheTool : Integer is protected;
268 ---Purpose: the total number of the shapes of the Tool.
270 myNumberOfInsertedShapes : Integer is protected;
271 ---Purpose: the total number of the shapes of the Object, Tool and
272 -- also the shapes created by interferences.
273 myLength : Integer is protected;
274 ---Purpose: the total number of allocated space to store.
277 myObject : Shape from TopoDS is protected;
279 myTool : Shape from TopoDS is protected;
281 myShapeIndexMapObj : IndexedDataMapOfShapeInteger from BooleanOperations is protected;
283 myShapeIndexMapTool: IndexedDataMapOfShapeInteger from BooleanOperations is protected;
286 myRefEdges: CArray1OfInteger from BOPTColStd is protected;
288 myNbEdges : Integer from Standard is protected;
293 class Explorer from BooleanOperations,
294 class OnceExplorer from BooleanOperations
296 end ShapesDataStructure;