File: HLRBRep_Data.hxx

package info (click to toggle)
oce 0.18.2-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 301,460 kB
  • sloc: cpp: 1,190,610; ansic: 67,225; sh: 11,667; tcl: 7,954; cs: 5,221; python: 2,867; java: 1,522; makefile: 344; xml: 292; perl: 37
file content (272 lines) | stat: -rw-r--r-- 9,386 bytes parent folder | download | duplicates (5)
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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
// 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 _HLRBRep_Data_HeaderFile
#define _HLRBRep_Data_HeaderFile

#include <Standard.hxx>
#include <Standard_DefineHandle.hxx>
#include <Handle_HLRBRep_Data.hxx>

#include <Standard_Integer.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <HLRBRep_Array1OfEData.hxx>
#include <HLRBRep_Array1OfFData.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <Standard_ShortReal.hxx>
#include <HLRAlgo_Projector.hxx>
#include <HLRBRep_CLProps.hxx>
#include <HLRBRep_SLProps.hxx>
#include <Standard_Real.hxx>
#include <HLRBRep_FaceIterator.hxx>
#include <Standard_Address.hxx>
#include <GeomAbs_SurfaceType.hxx>
#include <Standard_Boolean.hxx>
#include <GeomAbs_CurveType.hxx>
#include <TopAbs_Orientation.hxx>
#include <HLRBRep_Intersector.hxx>
#include <Handle_BRepTopAdaptor_TopolTool.hxx>
#include <HLRAlgo_Interference.hxx>
#include <MMgt_TShared.hxx>
#include <TopAbs_State.hxx>
class BRepTopAdaptor_TopolTool;
class StdFail_UndefinedDerivative;
class HLRBRep_Array1OfEData;
class HLRBRep_Array1OfFData;
class HLRAlgo_Projector;
class TopTools_IndexedMapOfShape;
class BRepTopAdaptor_MapOfShapeTool;
class HLRAlgo_Interference;
class gp_Dir2d;
class HLRBRep_EdgeData;
class HLRAlgo_InterferenceList;
class HLRBRep_FaceData;
class IntRes2d_IntersectionPoint;



class HLRBRep_Data : public MMgt_TShared
{

public:

  
  //! Create an  empty data structure  of <NV> vertices,
  //! <NE> edges and <NF> faces.
  Standard_EXPORT HLRBRep_Data(const Standard_Integer NV, const Standard_Integer NE, const Standard_Integer NF);
  
  //! Write <DS>    in   me  with   a     translation of
  //! <dv>,<de>,<df>.
  Standard_EXPORT   void Write (const Handle(HLRBRep_Data)& DS, const Standard_Integer dv, const Standard_Integer de, const Standard_Integer df) ;
  
      HLRBRep_Array1OfEData& EDataArray() ;
  
      HLRBRep_Array1OfFData& FDataArray() ;
  
  //! Set the  tolerance for the  rejections  during the
  //! exploration
      void Tolerance (const Standard_ShortReal tol) ;
  
  //! returns  the tolerance for the  rejections  during
  //! the exploration
      Standard_ShortReal Tolerance()  const;
  
  //! end of building  of the Data and updating
  //! all the informations linked to the projection.
  Standard_EXPORT   void Update (const HLRAlgo_Projector& P) ;
  
      HLRAlgo_Projector& Projector() ;
  
      Standard_Integer NbVertices()  const;
  
      Standard_Integer NbEdges()  const;
  
      Standard_Integer NbFaces()  const;
  
      TopTools_IndexedMapOfShape& EdgeMap() ;
  
      TopTools_IndexedMapOfShape& FaceMap() ;
  
  //! to compare with only non rejected edges.
  Standard_EXPORT   void InitBoundSort (const Standard_Address MinMaxTot, const Standard_Integer e1, const Standard_Integer e2) ;
  
  //! Begin an iteration only  on visible Edges
  //! crossing the face number <FI>.
  Standard_EXPORT   void InitEdge (const Standard_Integer FI, BRepTopAdaptor_MapOfShapeTool& MST) ;
  
  Standard_EXPORT   Standard_Boolean MoreEdge() ;
  
  Standard_EXPORT   void NextEdge (const Standard_Boolean skip = Standard_True) ;
  
  //! Returns the  current Edge
  Standard_EXPORT   Standard_Integer Edge()  const;
  
  //! Returns true if   the  current edge to   be hidden
  //! belongs to the hiding face.
      Standard_Boolean HidingTheFace()  const;
  
  //! Returns true if the current hiding face is not  an
  //! auto-intersected one.
      Standard_Boolean SimpleHidingFace()  const;
  
  //! Intersect  the current  Edge  with the boundary of
  //! the hiding  face.   The interferences are given by
  //! the More, Next, and Value methods.
  Standard_EXPORT   void InitInterference() ;
  
      Standard_Boolean MoreInterference()  const;
  
  Standard_EXPORT   void NextInterference() ;
  
  //! Returns  True if the  interference is rejected.
  Standard_EXPORT   Standard_Boolean RejectedInterference() ;
  
  //! Returns True if the rejected interference is above
  //! the face.
  Standard_EXPORT   Standard_Boolean AboveInterference() ;
  
      HLRAlgo_Interference& Interference() ;
  
  //! Returns the local description of the projection of
  //! the current LEdge  at parameter  <Param>.
  Standard_EXPORT   void LocalLEGeometry2D (const Standard_Real Param, gp_Dir2d& Tg, gp_Dir2d& Nm, Standard_Real& Cu) ;
  
  //! Returns the local description of the projection of
  //! the current FEdge  at parameter  <Param>.
  Standard_EXPORT   void LocalFEGeometry2D (const Standard_Integer FE, const Standard_Real Param, gp_Dir2d& Tg, gp_Dir2d& Nm, Standard_Real& Cu) ;
  
  //! Returns the local  3D   state of the  intersection
  //! between the current edge and the current face at the
  //! <p1> and <p2> parameters.
  Standard_EXPORT   void EdgeState (const Standard_Real p1, const Standard_Real p2, TopAbs_State& stbef, TopAbs_State& staf) ;
  
  //! Returns the  true if the  Edge <EData> belongs to the
  //! Hiding Face.
      Standard_Boolean EdgeOfTheHidingFace (const Standard_Integer E, const HLRBRep_EdgeData& EData)  const;
  
  //! Returns the number of  levels of hiding face above
  //! the   first  point  of   the    edge <EData>.     The
  //! InterferenceList is  given to  compute far away of
  //! the Interferences and then come back.
  Standard_EXPORT   Standard_Integer HidingStartLevel (const Standard_Integer E, const HLRBRep_EdgeData& EData, const HLRAlgo_InterferenceList& IL) ;
  
  //! Returns   the  state   of  the   Edge  <EData>  after
  //! classification.
  Standard_EXPORT   TopAbs_State Compare (const Standard_Integer E, const HLRBRep_EdgeData& EData) ;
  
  //! Simple classification of part of edge  [p1,  p2]
  //! returns  OUT  if  at  least  1 of  Nbp  points  of  edge  is  out
  //! othewise  returns  IN
  //! It  is  used  to  check  "suspision"  hided  part  of  edge.
  Standard_EXPORT   TopAbs_State SimplClassify (const Standard_Integer E, const HLRBRep_EdgeData& EData, const Standard_Integer Nbp, const Standard_Real p1, const Standard_Real p2) ;
  
  //! Classification of an edge.
  Standard_EXPORT   TopAbs_State Classify (const Standard_Integer E, const HLRBRep_EdgeData& EData, const Standard_Boolean LevelFlag, Standard_Integer& Level, const Standard_Real param) ;
  
  Standard_EXPORT   void Destroy() ;
~HLRBRep_Data()
{
  Destroy();
}



  DEFINE_STANDARD_RTTI(HLRBRep_Data)

protected:




private: 

  
  //! Orient the   OutLines  ( left  must  be  inside in
  //! projection ). Returns True if the face of a closed
  //! shell has been inverted;
  Standard_EXPORT   Standard_Boolean OrientOutLine (const Standard_Integer I, HLRBRep_FaceData& FD) ;
  
  //! Orient the Edges which  are not  Internal OutLine,
  //! not Double and not IsoLine.
  Standard_EXPORT   void OrientOthEdge (const Standard_Integer I, HLRBRep_FaceData& FD) ;
  
  //! Returns  True  if the  intersection is  rejected.
  Standard_EXPORT   Standard_Boolean RejectedPoint (const IntRes2d_IntersectionPoint& PInter, const TopAbs_Orientation BoundOri, const Standard_Integer NumSeg) ;
  
  //! returns True  if there is a common  vertex between
  //! myLE and myFE  dependig  on  <head1> and  <head2>.
  Standard_EXPORT   Standard_Boolean SameVertex (const Standard_Boolean head1, const Standard_Boolean head2) ;

  Standard_Integer myNbVertices;
  Standard_Integer myNbEdges;
  Standard_Integer myNbFaces;
  TopTools_IndexedMapOfShape myEMap;
  TopTools_IndexedMapOfShape myFMap;
  HLRBRep_Array1OfEData myEData;
  HLRBRep_Array1OfFData myFData;
  TColStd_Array1OfInteger myEdgeIndices;
  Standard_ShortReal myToler;
  HLRAlgo_Projector myProj;
  HLRBRep_CLProps myLLProps;
  HLRBRep_CLProps myFLProps;
  HLRBRep_SLProps mySLProps;
  Standard_Real myBigSize;
  HLRBRep_FaceIterator myFaceItr1;
  HLRBRep_FaceIterator myFaceItr2;
  Standard_Integer iFace;
  Standard_Address iFaceData;
  Standard_Address iFaceGeom;
  Standard_Address iFaceMinMax;
  GeomAbs_SurfaceType iFaceType;
  Standard_Boolean iFaceBack;
  Standard_Boolean iFaceSimp;
  Standard_Boolean iFaceSmpl;
  Standard_Boolean iFaceTest;
  Standard_Integer myHideCount;
  Standard_Real myDeca[16];
  Standard_Real mySurD[16];
  Standard_Integer myCurSortEd;
  Standard_Integer myNbrSortEd;
  Standard_Integer myLE;
  Standard_Boolean myLEOutLine;
  Standard_Boolean myLEInternal;
  Standard_Boolean myLEDouble;
  Standard_Boolean myLEIsoLine;
  Standard_Address myLEData;
  Standard_Address myLEGeom;
  Standard_Address myLEMinMax;
  GeomAbs_CurveType myLEType;
  Standard_ShortReal myLETol;
  Standard_Integer myFE;
  TopAbs_Orientation myFEOri;
  Standard_Boolean myFEOutLine;
  Standard_Boolean myFEInternal;
  Standard_Boolean myFEDouble;
  Standard_Address myFEData;
  Standard_Address myFEGeom;
  GeomAbs_CurveType myFEType;
  Standard_ShortReal myFETol;
  HLRBRep_Intersector myIntersector;
  Handle(BRepTopAdaptor_TopolTool) myClassifier;
  Standard_Boolean mySameVertex;
  Standard_Boolean myIntersected;
  Standard_Integer myNbPoints;
  Standard_Integer myNbSegments;
  Standard_Integer iInterf;
  HLRAlgo_Interference myIntf;
  Standard_Boolean myAboveIntf;
  Standard_Address myReject;


};


#include <HLRBRep_Data.lxx>





#endif // _HLRBRep_Data_HeaderFile