Adding of testing cases from subgroups 937 940 and 941 of CHL group
[occt.git] / src / BOP / BOP_ShapeSet.cdl
CommitLineData
b311480e 1-- Created on: 1993-06-16
2-- Created by: Jean Yves LEBEY
3-- Copyright (c) 1993-1999 Matra Datavision
4-- Copyright (c) 1999-2012 OPEN CASCADE SAS
5--
6-- The content of this file is subject to the Open CASCADE Technology Public
7-- License Version 6.5 (the "License"). You may not use the content of this file
8-- except in compliance with the License. Please obtain a copy of the License
9-- at http://www.opencascade.org and read it completely before using this file.
10--
11-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13--
14-- The Original Code and all software distributed under the License is
15-- distributed on an "AS IS" basis, without warranty of any kind, and the
16-- Initial Developer hereby disclaims all such warranties, including without
17-- limitation, any warranties of merchantability, fitness for a particular
18-- purpose or non-infringement. Please see the License for the specific terms
19-- and conditions governing the rights and limitations under the License.
20
7fd59977 21
22class ShapeSet from BOP
23
24 ---Purpose:
25
26 -- Auxiliary class providing an exploration of a set
27 -- of shapes to build faces or solids.
28
29 -- To build faces : shapes are wires, elements are edges.
30 -- To build solids : shapes are shells, elements are faces.
31
32 -- The ShapeSet stores a list of shapes, a list of elements
33 -- to start reconstructions, and a map to search neighbours.
34 -- The map stores the connection between elements through
35 -- subshapes of type <SubShapeType> given in constructor.
36
37 -- <SubShapeType> is :
38 -- - TopAbs_VERTEX to connect edges
39 -- - TopAbs_EDGE to connect faces
40 --
41
42uses
43
44 ShapeEnum from TopAbs,
45
46 Orientation from TopAbs,
47 Shape from TopoDS,
48
49 ListOfShape from TopTools,
50 ListIteratorOfListOfShape from TopTools,
51 IndexedDataMapOfShapeListOfShape from TopTools,
52 IndexedMapOfOrientedShape from TopTools,
53
54 Explorer from TopExp
55
56is
57
58 Create (SubShapeType : ShapeEnum from TopAbs)
59 returns ShapeSet from BOP;
60 ---Purpose:
61 --- Creates a ShapeSet in order to build shapes connected
62 --- by <SubShapeType> shapes.
63 ---
64
65 Delete(me:out)
66 is virtual;
67 ---C++: alias "Standard_EXPORT virtual ~BOP_ShapeSet(){Delete() ; }"
68 ---Purpose:
69 --- Destructor
70 ---
71 AddShape(me:out;
72 S:Shape from TopoDS)
73 is virtual;
74 ---Purpose:
75 --- Adds <S> to the list of shapes. (wires or shells).
76 ---
77 AddStartElement(me:out;
78 S:Shape from TopoDS)
79 is virtual;
80 ---Purpose:
81 --- Add S to the list of starting shapes used for reconstructions.
82 --- apply AddElement(S).
83 ---
84 AddElement(me:out;
85 S:Shape from TopoDS)
86 is virtual;
87 ---Purpose:
88 --- For each subshape SE of S of type mySubShapeType
89 --- Add subshapes of S to the map of subshapes (mySubShapeMap)
90 --- Add S to the list of shape incident to subshapes of S.
91 ---
92 ProcessAddShape(me:out;
93 S:Shape from TopoDS)
94 is static protected;
95 ---Purpose:
96 --- Internal purpose
97 ---
98 ProcessAddStartElement(me:out;
99 S:Shape from TopoDS)
100 is static protected;
101 ---Purpose:
102 --- Internal purpose
103 ---
104 ProcessAddElement(me:out;
105 S:Shape from TopoDS)
106 is static protected;
107 ---Purpose:
108 --- Internal purpose
109 ---
110 StartElements(me)
111 returns ListOfShape from TopTools;
112 ---C++: return const &
113 ---Purpose:
114 --- Selector.
115 ---
116 --
117 --
118 -- Iteration on the shapes of AddShape()
119 --
120 InitShapes(me:out);
121 ---Purpose:
122 --- Internal purpose
123 ---
124 MoreShapes(me)
125 returns Boolean from Standard;
126 ---Purpose:
127 --- Internal purpose
128 ---
129 NextShape(me:in out);
130 ---Purpose:
131 --- Internal purpose
132 ---
133 Shape(me)
134 returns Shape from TopoDS;
135 ---C++: return const &
136
137 --
138 -- Iteration on the start elements of AddStartElement()
139 --
140 InitStartElements(me:out);
141
142 MoreStartElements(me)
143 returns Boolean from Standard;
144 ---Purpose:
145 --- Internal purpose
146 ---
147 NextStartElement(me:out);
148 ---Purpose:
149 --- Internal purpose
150 ---
151 StartElement(me)
152 returns Shape;
153 ---C++: return const &
154 ---Purpose:
155 --- Iteration on the neighbours of a shape of type myShapeType
156 --- through its subshapes of type mySubShapeType.
157 ---
158 InitNeighbours(me:out;
159 S:Shape from TopoDS)
160 is virtual;
161
162 MoreNeighbours(me:out)
163 returns Boolean from Standard;
164 ---Purpose:
165 --- Internal purpose
166 ---
167 NextNeighbour(me: out);
168 ---Purpose:
169 --- Internal purpose
170 ---
171 Neighbour(me)
172 returns Shape from TopoDS;
173 ---C++: return const &
174 ---Purpose:
175 --- Internal purpose
176 ---
177 ChangeStartShapes(me:out)
178 returns ListOfShape from TopTools;
179 ---C++: return &
180 ---Purpose:
181 --- Modifier
182 ---
183
184 FindNeighbours(me:in out)
185 is virtual;
186 ---Purpose:
187 --- Build the list of neighbour shapes of myCurrentShape
188 --- (neighbour shapes and myCurrentShapes are of type t)
189 --- Initialize myIncidentShapesIter on neighbour shapes.
190 ---
191
192 MakeNeighboursList(me:in out;E,V:Shape)
193 returns ListOfShape from TopTools
194 is virtual;
195 ---C++: return const &
196
197 MaxNumberSubShape(me:in out;Shape:Shape)
198 returns Integer;
199
200
201 ClearContents(me:out);
202 ---Purpose:
203 --- Clears myStartShapes,mySubShapeMap,myShapes
204 ---
205fields
206
207 myShapeType : ShapeEnum from TopAbs is protected;
208 -- shape type : edge
209
210 mySubShapeType : ShapeEnum from TopAbs is protected;
211 -- subshape type : vertex
212
213 --mySubShapeExplorer : ShapeExplorer from BOP is protected;
214 mySubShapeExplorer : Explorer from TopExp is protected;
215 -- explorer of edge vertices
216
217 myStartShapes : ListOfShape from TopTools is protected;
218 -- list of starting edges
219
220 myStartShapesIter : ListIteratorOfListOfShape from TopTools is protected;
221 -- myStartShapes iterator
222
223 mySubShapeMap : IndexedDataMapOfShapeListOfShape from TopTools is protected;
224 -- map of vertices
225 -- mySubShapeMap(vertex) = list of incident edges to a vertex
226
227 myIncidentShapesIter : ListIteratorOfListOfShape from TopTools is protected;
228 -- iter on list L of edges incident to a vertex, L = mySubShapeMap(vertex)
229
230 myShapes : ListOfShape from TopTools is protected;
231 -- list of wires which are not to be reconstructed
232
233 myShapesIter : ListIteratorOfListOfShape from TopTools is protected;
234 -- myShapes iterator
235
236 myCurrentShape : Shape from TopoDS is protected;
237 -- current edge which neighbours are searched, using FindNeighbours()
238
239 myCurrentShapeNeighbours : ListOfShape from TopTools is protected;
240 -- list of edges neighbour of the edge myCurrentShape
241
242end ShapeSet;