summaryrefslogtreecommitdiff
path: root/inc/TopOpeBRepDS_HDataStructure.hxx
blob: f7892d2c2804573f6fa576f5021ce3e89f7564f0 (plain)
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 _TopOpeBRepDS_HDataStructure_HeaderFile
#define _TopOpeBRepDS_HDataStructure_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_DefineHandle_HeaderFile
#include <Standard_DefineHandle.hxx>
#endif
#ifndef _Handle_TopOpeBRepDS_HDataStructure_HeaderFile
#include <Handle_TopOpeBRepDS_HDataStructure.hxx>
#endif

#ifndef _TopOpeBRepDS_DataStructure_HeaderFile
#include <TopOpeBRepDS_DataStructure.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _TCollection_AsciiString_HeaderFile
#include <TCollection_AsciiString.hxx>
#endif
#ifndef _MMgt_TShared_HeaderFile
#include <MMgt_TShared.hxx>
#endif
#ifndef _TopAbs_ShapeEnum_HeaderFile
#include <TopAbs_ShapeEnum.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _TopOpeBRepDS_Config_HeaderFile
#include <TopOpeBRepDS_Config.hxx>
#endif
#ifndef _TopOpeBRepDS_Kind_HeaderFile
#include <TopOpeBRepDS_Kind.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Handle_TopOpeBRepDS_Interference_HeaderFile
#include <Handle_TopOpeBRepDS_Interference.hxx>
#endif
class TopoDS_Shape;
class TopOpeBRepDS_DataStructure;
class TopOpeBRepDS_Surface;
class TopOpeBRepDS_CurveIterator;
class TopOpeBRepDS_Curve;
class TopOpeBRepDS_PointIterator;
class TopOpeBRepDS_Point;
class TopTools_ListIteratorOfListOfShape;
class TopOpeBRepDS_SurfaceIterator;
class TopOpeBRepDS_ListOfInterference;
class TopOpeBRepDS_ListIteratorOfListOfInterference;
class TopOpeBRepDS_Interference;



class TopOpeBRepDS_HDataStructure : public MMgt_TShared {

public:

  
  Standard_EXPORT   TopOpeBRepDS_HDataStructure();
  
  Standard_EXPORT     void AddAncestors(const TopoDS_Shape& S) ;
  //! Update  the data structure with  shapes of type T1 <br>
//!          containing a subshape of type T2 which is stored <br>
//!          in the DS. <br>
//!          Used by the previous one. <br>
  Standard_EXPORT     void AddAncestors(const TopoDS_Shape& S,const TopAbs_ShapeEnum T1,const TopAbs_ShapeEnum T2) ;
  //! perform post processing of the DS. <br>
  Standard_EXPORT     void Complete() ;
  //! Check the integrity of the DS <br>
  Standard_EXPORT     void ChkIntg() ;
  
  Standard_EXPORT    const TopOpeBRepDS_DataStructure& DS() const;
  
  Standard_EXPORT     TopOpeBRepDS_DataStructure& ChangeDS() ;
  
  Standard_EXPORT     Standard_Integer NbSurfaces() const;
  
  Standard_EXPORT     Standard_Integer NbCurves() const;
  
  Standard_EXPORT     Standard_Integer NbPoints() const;
  //! Returns the surface of index <I>. <br>
  Standard_EXPORT    const TopOpeBRepDS_Surface& Surface(const Standard_Integer I) const;
  //! Returns an iterator  on the curves on  the surface <br>
//!          <I>. <br>
  Standard_EXPORT     TopOpeBRepDS_CurveIterator SurfaceCurves(const Standard_Integer I) const;
  //! Returns the Curve of index <I>. <br>
  Standard_EXPORT    const TopOpeBRepDS_Curve& Curve(const Standard_Integer I) const;
  //! Returns the Curve of index <I>. <br>
//! <br>
  Standard_EXPORT     TopOpeBRepDS_Curve& ChangeCurve(const Standard_Integer I) ;
  //! Returns an iterator   on the points on  the  curve <br>
//!          <I>. <br>
  Standard_EXPORT     TopOpeBRepDS_PointIterator CurvePoints(const Standard_Integer I) const;
  //! Returns the point of index <I>. <br>
  Standard_EXPORT    const TopOpeBRepDS_Point& Point(const Standard_Integer I) const;
  
  Standard_EXPORT     Standard_Integer NbShapes() const;
  //! Returns the shape of index <I> in the DS <br>
  Standard_EXPORT    const TopoDS_Shape& Shape(const Standard_Integer I,const Standard_Boolean FindKeep = Standard_True) const;
  //! Returns the index of shape <S> in the DS <br>
//!          returns 0 if <S> is not in the DS <br>
  Standard_EXPORT     Standard_Integer Shape(const TopoDS_Shape& S,const Standard_Boolean FindKeep = Standard_True) const;
  //! Returns True if <S> has new geometries. <br>
  Standard_EXPORT     Standard_Boolean HasGeometry(const TopoDS_Shape& S) const;
  //! Returns True if <S> has new geometries (SOLID,FACE,EDGE) <br>
//!          or if <S> (SHELL,WIRE) has sub-shape (FACE,EDGE) <br>
//!          with new geometries <br>
  Standard_EXPORT     Standard_Boolean HasShape(const TopoDS_Shape& S,const Standard_Boolean FindKeep = Standard_True) const;
  //! Returns True if <S> share a geometrical domain with <br>
//!          some other shapes. <br>
  Standard_EXPORT     Standard_Boolean HasSameDomain(const TopoDS_Shape& S,const Standard_Boolean FindKeep = Standard_True) const;
  //! Returns an iterator on the SameDomain shapes attached <br>
//!          to the shape <S>. <br>
  Standard_EXPORT     TopTools_ListIteratorOfListOfShape SameDomain(const TopoDS_Shape& S) const;
  //! Returns orientation of shape <S> compared with its <br>
//!          reference shape <br>
  Standard_EXPORT     TopOpeBRepDS_Config SameDomainOrientation(const TopoDS_Shape& S) const;
  //! Returns orientation of shape <S> compared with its <br>
//!          reference shape <br>
  Standard_EXPORT     Standard_Integer SameDomainReference(const TopoDS_Shape& S) const;
  //! Returns an iterator on the  surfaces attached to the <br>
//!          solid <S>. <br>
  Standard_EXPORT     TopOpeBRepDS_SurfaceIterator SolidSurfaces(const TopoDS_Shape& S) const;
  //! Returns an iterator on the  surfaces attached to the <br>
//!          solid <I>. <br>
  Standard_EXPORT     TopOpeBRepDS_SurfaceIterator SolidSurfaces(const Standard_Integer I) const;
  //! Returns an iterator on the  curves attached to the <br>
//!          face <F>. <br>
  Standard_EXPORT     TopOpeBRepDS_CurveIterator FaceCurves(const TopoDS_Shape& F) const;
  //! Returns an iterator on the  curves attached to the <br>
//!          face <I>. <br>
  Standard_EXPORT     TopOpeBRepDS_CurveIterator FaceCurves(const Standard_Integer I) const;
  //! Returns an iterator on the points  attached to the <br>
//!          edge <E>. <br>
  Standard_EXPORT     TopOpeBRepDS_PointIterator EdgePoints(const TopoDS_Shape& E) const;
  
  Standard_EXPORT     Standard_Integer MakeCurve(const TopOpeBRepDS_Curve& C1,TopOpeBRepDS_Curve& C2) ;
  
  Standard_EXPORT     void RemoveCurve(const Standard_Integer iC) ;
  
  Standard_EXPORT     void RemoveShape(const Standard_Integer iS) ;
  
  Standard_EXPORT     Standard_Integer NbGeometry(const TopOpeBRepDS_Kind K) const;
  
  Standard_EXPORT     Standard_Integer NbTopology(const TopOpeBRepDS_Kind K) const;
  
  Standard_EXPORT     Standard_Integer NbTopology() const;
  //! returns True if all the edges stored as shapes in the DS <br>
//!          are SameParameter, otherwise False. <br>
  Standard_EXPORT     Standard_Boolean EdgesSameParameter() const;
  
  Standard_EXPORT     void SortOnParameter(const TopOpeBRepDS_ListOfInterference& L1,TopOpeBRepDS_ListOfInterference& L2) const;
  
  Standard_EXPORT     void SortOnParameter(TopOpeBRepDS_ListOfInterference& L) const;
  
  Standard_EXPORT     void MinMaxOnParameter(const TopOpeBRepDS_ListOfInterference& L,Standard_Real& Min,Standard_Real& Max) const;
  
//! Search, among a list of interferences accessed by the iterator <br>
//! <IT>, a geometry <G> whose 3D point is identical to the 3D point <br>
//! of the TheDSPoint <PDS>. <br>
//! returns True if such an interference has been found, False else. <br>
//! if True, iterator It points (by the Value() method) on the first <br>
//! interference accessing an identical 3D point. <br>
  Standard_EXPORT     Standard_Boolean ScanInterfList(TopOpeBRepDS_ListIteratorOfListOfInterference& IT,const TopOpeBRepDS_Point& PDS) const;
  
//! Get the geometry of a DS point <PDS>. <br>
//! Search for it with ScanInterfList (previous method). <br>
//! if found, set <G,K> to the geometry,kind of the interference found. <br>
//! returns the value of ScanInterfList(). <br>
  Standard_EXPORT     Standard_Boolean GetGeometry(TopOpeBRepDS_ListIteratorOfListOfInterference& IT,const TopOpeBRepDS_Point& PDS,Standard_Integer& G,TopOpeBRepDS_Kind& K) const;
  
//! Add interference <I> to list <LI>. <br>
  Standard_EXPORT     void StoreInterference(const Handle(TopOpeBRepDS_Interference)& I,TopOpeBRepDS_ListOfInterference& LI,const TCollection_AsciiString& str = "") ;
  
//! Add interference <I> to list of interference of shape <S>. <br>
  Standard_EXPORT     void StoreInterference(const Handle(TopOpeBRepDS_Interference)& I,const TopoDS_Shape& S,const TCollection_AsciiString& str = "") ;
  
//! Add interference <I> to list of interference of shape <IS>. <br>
  Standard_EXPORT     void StoreInterference(const Handle(TopOpeBRepDS_Interference)& I,const Standard_Integer IS,const TCollection_AsciiString& str = "") ;
  
  Standard_EXPORT     void StoreInterferences(const TopOpeBRepDS_ListOfInterference& LI,const TopoDS_Shape& S,const TCollection_AsciiString& str = "") ;
  
  Standard_EXPORT     void StoreInterferences(const TopOpeBRepDS_ListOfInterference& LI,const Standard_Integer IS,const TCollection_AsciiString& str = "") ;
  
  Standard_EXPORT     void ClearStoreInterferences(const TopOpeBRepDS_ListOfInterference& LI,const TopoDS_Shape& S,const TCollection_AsciiString& str = "") ;
  
  Standard_EXPORT     void ClearStoreInterferences(const TopOpeBRepDS_ListOfInterference& LI,const Standard_Integer IS,const TCollection_AsciiString& str = "") ;




  DEFINE_STANDARD_RTTI(TopOpeBRepDS_HDataStructure)

protected:




private: 


TopOpeBRepDS_DataStructure myDS;
Standard_Boolean myEdgesSameParameter;
TCollection_AsciiString myAscii;


};





// other Inline functions and methods (like "C++: function call" methods)


#endif