1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
|
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to
// this header file considered to be the "object code" form of the original source.
#ifndef _TopOpeBRepBuild_ShapeSet_HeaderFile
#define _TopOpeBRepBuild_ShapeSet_HeaderFile
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif
#ifndef _TopAbs_ShapeEnum_HeaderFile
#include <TopAbs_ShapeEnum.hxx>
#endif
#ifndef _TopOpeBRepTool_ShapeExplorer_HeaderFile
#include <TopOpeBRepTool_ShapeExplorer.hxx>
#endif
#ifndef _TopTools_ListOfShape_HeaderFile
#include <TopTools_ListOfShape.hxx>
#endif
#ifndef _TopTools_ListIteratorOfListOfShape_HeaderFile
#include <TopTools_ListIteratorOfListOfShape.hxx>
#endif
#ifndef _TopTools_IndexedDataMapOfShapeListOfShape_HeaderFile
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#endif
#ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _TCollection_AsciiString_HeaderFile
#include <TCollection_AsciiString.hxx>
#endif
#ifndef _TopTools_IndexedMapOfOrientedShape_HeaderFile
#include <TopTools_IndexedMapOfOrientedShape.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Standard_OStream_HeaderFile
#include <Standard_OStream.hxx>
#endif
class TopoDS_Shape;
class TopTools_ListOfShape;
class TCollection_AsciiString;
//! Auxiliary class providing an exploration of a set <br>
//! of shapes to build faces or solids. <br>
//! To build faces : shapes are wires, elements are edges. <br>
//! To build solids : shapes are shells, elements are faces. <br>
//! The ShapeSet stores a list of shapes, a list of elements <br>
//! to start reconstructions, and a map to search neighbours. <br>
//! The map stores the connection between elements through <br>
//! subshapes of type <SubShapeType> given in constructor. <br>
//! <SubShapeType> is : <br>
//! - TopAbs_VERTEX to connect edges <br>
//! - TopAbs_EDGE to connect faces <br>
class TopOpeBRepBuild_ShapeSet {
public:
void* operator new(size_t,void* anAddress)
{
return anAddress;
}
void* operator new(size_t size)
{
return Standard::Allocate(size);
}
void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
//! Creates a ShapeSet in order to build shapes connected <br>
//! by <SubShapeType> shapes. <br>
//! <checkshape>:check (or not) the shapes, startelements, elements added. <br>
Standard_EXPORT TopOpeBRepBuild_ShapeSet(const TopAbs_ShapeEnum SubShapeType,const Standard_Boolean checkshape = Standard_True);
Standard_EXPORT virtual void Delete() ;
Standard_EXPORT virtual ~TopOpeBRepBuild_ShapeSet(){Delete() ; }
//! Adds <S> to the list of shapes. (wires or shells). <br>
Standard_EXPORT virtual void AddShape(const TopoDS_Shape& S) ;
//! (S is a face or edge) <br>
//! Add S to the list of starting shapes used for reconstructions. <br>
//! apply AddElement(S). <br>
Standard_EXPORT virtual void AddStartElement(const TopoDS_Shape& S) ;
//! for each subshape SE of S of type mySubShapeType <br>
//! - Add subshapes of S to the map of subshapes (mySubShapeMap) <br>
//! - Add S to the list of shape incident to subshapes of S. <br>
Standard_EXPORT virtual void AddElement(const TopoDS_Shape& S) ;
//! return a reference on myStartShapes <br>
Standard_EXPORT const TopTools_ListOfShape& StartElements() const;
Standard_EXPORT void InitShapes() ;
Standard_EXPORT Standard_Boolean MoreShapes() const;
Standard_EXPORT void NextShape() ;
Standard_EXPORT const TopoDS_Shape& Shape() const;
Standard_EXPORT void InitStartElements() ;
Standard_EXPORT Standard_Boolean MoreStartElements() const;
Standard_EXPORT void NextStartElement() ;
Standard_EXPORT const TopoDS_Shape& StartElement() const;
Standard_EXPORT virtual void InitNeighbours(const TopoDS_Shape& S) ;
Standard_EXPORT Standard_Boolean MoreNeighbours() ;
Standard_EXPORT void NextNeighbour() ;
Standard_EXPORT const TopoDS_Shape& Neighbour() const;
Standard_EXPORT TopTools_ListOfShape& ChangeStartShapes() ;
Standard_EXPORT Standard_Boolean IsStartElement(const TopoDS_Shape& S) const;
Standard_EXPORT Standard_Boolean IsElement(const TopoDS_Shape& S) const;
Standard_EXPORT Standard_Boolean IsShape(const TopoDS_Shape& S) const;
Standard_EXPORT Standard_Integer NStartElement(const TopoDS_Shape& S) const;
Standard_EXPORT Standard_Integer NElement(const TopoDS_Shape& S) const;
Standard_EXPORT Standard_Integer NShape(const TopoDS_Shape& S) const;
//! Build the list of neighbour shapes of myCurrentShape <br>
//! (neighbour shapes and myCurrentShapes are of type t) <br>
//! Initialize myIncidentShapesIter on neighbour shapes. <br>
Standard_EXPORT virtual void FindNeighbours() ;
Standard_EXPORT virtual const TopTools_ListOfShape& MakeNeighboursList(const TopoDS_Shape& E,const TopoDS_Shape& V) ;
Standard_EXPORT Standard_Integer MaxNumberSubShape(const TopoDS_Shape& Shape) ;
Standard_EXPORT void CheckShape(const Standard_Boolean checkshape) ;
Standard_EXPORT Standard_Boolean CheckShape() const;
Standard_EXPORT Standard_Boolean CheckShape(const TopoDS_Shape& S,const Standard_Boolean checkgeom = Standard_False) ;
Standard_EXPORT void DumpName(Standard_OStream& OS,const TCollection_AsciiString& str) const;
Standard_EXPORT void DumpCheck(Standard_OStream& OS,const TCollection_AsciiString& str,const TopoDS_Shape& S,const Standard_Boolean chk) const;
Standard_EXPORT virtual void DumpSS() ;
Standard_EXPORT virtual void DumpBB() ;
Standard_EXPORT void DEBName(const TCollection_AsciiString& N) ;
Standard_EXPORT const TCollection_AsciiString& DEBName() const;
Standard_EXPORT void DEBNumber(const Standard_Integer I) ;
Standard_EXPORT Standard_Integer DEBNumber() const;
Standard_EXPORT virtual TCollection_AsciiString SName(const TopoDS_Shape& S,const TCollection_AsciiString& sb = "",const TCollection_AsciiString& sa = "") const;
Standard_EXPORT virtual TCollection_AsciiString SNameori(const TopoDS_Shape& S,const TCollection_AsciiString& sb = "",const TCollection_AsciiString& sa = "") const;
Standard_EXPORT virtual TCollection_AsciiString SName(const TopTools_ListOfShape& S,const TCollection_AsciiString& sb = "",const TCollection_AsciiString& sa = "") const;
Standard_EXPORT virtual TCollection_AsciiString SNameori(const TopTools_ListOfShape& S,const TCollection_AsciiString& sb = "",const TCollection_AsciiString& sa = "") const;
protected:
Standard_EXPORT void ProcessAddShape(const TopoDS_Shape& S) ;
Standard_EXPORT void ProcessAddStartElement(const TopoDS_Shape& S) ;
Standard_EXPORT void ProcessAddElement(const TopoDS_Shape& S) ;
TopAbs_ShapeEnum myShapeType;
TopAbs_ShapeEnum mySubShapeType;
TopOpeBRepTool_ShapeExplorer mySubShapeExplorer;
TopTools_ListOfShape myStartShapes;
TopTools_ListIteratorOfListOfShape myStartShapesIter;
TopTools_IndexedDataMapOfShapeListOfShape mySubShapeMap;
TopTools_ListIteratorOfListOfShape myIncidentShapesIter;
TopTools_ListOfShape myShapes;
TopTools_ListIteratorOfListOfShape myShapesIter;
TopoDS_Shape myCurrentShape;
TopTools_ListOfShape myCurrentShapeNeighbours;
Standard_Integer myDEBNumber;
TCollection_AsciiString myDEBName;
TopTools_IndexedMapOfOrientedShape myOMSS;
TopTools_IndexedMapOfOrientedShape myOMES;
TopTools_IndexedMapOfOrientedShape myOMSH;
Standard_Boolean myCheckShape;
private:
};
// other Inline functions and methods (like "C++: function call" methods)
#endif
|