summaryrefslogtreecommitdiff
path: root/inc/TopOpeBRep_EdgesIntersector.hxx
blob: 7ba915e6daf578f0726d346a66e369d408a54948 (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
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
// 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 _TopOpeBRep_EdgesIntersector_HeaderFile
#define _TopOpeBRep_EdgesIntersector_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif

#ifndef _TopoDS_Face_HeaderFile
#include <TopoDS_Face.hxx>
#endif
#ifndef _Handle_BRepAdaptor_HSurface_HeaderFile
#include <Handle_BRepAdaptor_HSurface.hxx>
#endif
#ifndef _GeomAbs_SurfaceType_HeaderFile
#include <GeomAbs_SurfaceType.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _IntRes2d_Domain_HeaderFile
#include <IntRes2d_Domain.hxx>
#endif
#ifndef _TopoDS_Edge_HeaderFile
#include <TopoDS_Edge.hxx>
#endif
#ifndef _Geom2dAdaptor_Curve_HeaderFile
#include <Geom2dAdaptor_Curve.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Geom2dInt_GInter_HeaderFile
#include <Geom2dInt_GInter.hxx>
#endif
#ifndef _IntRes2d_SequenceOfIntersectionPoint_HeaderFile
#include <IntRes2d_SequenceOfIntersectionPoint.hxx>
#endif
#ifndef _IntRes2d_SequenceOfIntersectionSegment_HeaderFile
#include <IntRes2d_SequenceOfIntersectionSegment.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _TopoDS_Vertex_HeaderFile
#include <TopoDS_Vertex.hxx>
#endif
#ifndef _TopOpeBRep_SequenceOfPoint2d_HeaderFile
#include <TopOpeBRep_SequenceOfPoint2d.hxx>
#endif
#ifndef _TopOpeBRep_P2Dstatus_HeaderFile
#include <TopOpeBRep_P2Dstatus.hxx>
#endif
#ifndef _TopAbs_Orientation_HeaderFile
#include <TopAbs_Orientation.hxx>
#endif
#ifndef _TopOpeBRepDS_Config_HeaderFile
#include <TopOpeBRepDS_Config.hxx>
#endif
class BRepAdaptor_HSurface;
class TopoDS_Shape;
class Bnd_Box;
class Geom2dAdaptor_Curve;
class BRepAdaptor_Surface;
class TCollection_AsciiString;
class TopOpeBRep_SequenceOfPoint2d;
class TopOpeBRep_Point2d;
class IntRes2d_IntersectionSegment;
class IntRes2d_IntersectionPoint;
class TopOpeBRepDS_Transition;
class gp_Pnt;



class TopOpeBRep_EdgesIntersector  {
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); 
  }

  
  Standard_EXPORT   TopOpeBRep_EdgesIntersector();
  
  Standard_EXPORT   virtual  void Delete() ;
Standard_EXPORT virtual ~TopOpeBRep_EdgesIntersector(){Delete() ; }
  
  Standard_EXPORT     void SetFaces(const TopoDS_Shape& F1,const TopoDS_Shape& F2) ;
  
  Standard_EXPORT     void SetFaces(const TopoDS_Shape& F1,const TopoDS_Shape& F2,const Bnd_Box& B1,const Bnd_Box& B2) ;
  
  Standard_EXPORT     void ForceTolerances(const Standard_Real Tol1,const Standard_Real Tol2) ;
  
  Standard_EXPORT     void Dimension(const Standard_Integer D) ;
  //! set working space dimension D = 1 for E &|| W, 2 for E in F <br>
  Standard_EXPORT     Standard_Integer Dimension() const;
  
  Standard_EXPORT     void Perform(const TopoDS_Shape& E1,const TopoDS_Shape& E2,const Standard_Boolean ReduceSegments = Standard_True) ;
  
  Standard_EXPORT     Standard_Boolean IsEmpty() ;
  //! true if at least one intersection segment. <br>
  Standard_EXPORT     Standard_Boolean HasSegment() const;
  //! = mySameDomain. <br>
  Standard_EXPORT     Standard_Boolean SameDomain() const;
  
  Standard_EXPORT    const TopoDS_Shape& Edge(const Standard_Integer Index) const;
  
  Standard_EXPORT    const Geom2dAdaptor_Curve& Curve(const Standard_Integer Index) const;
  
  Standard_EXPORT    const TopoDS_Shape& Face(const Standard_Integer Index) const;
  
  Standard_EXPORT    const BRepAdaptor_Surface& Surface(const Standard_Integer Index) const;
  
  Standard_EXPORT     Standard_Boolean SurfacesSameOriented() const;
  
  Standard_EXPORT     Standard_Boolean FacesSameOriented() const;
  
  Standard_EXPORT     Standard_Real ToleranceMax() const;
  
  Standard_EXPORT     void Tolerances(Standard_Real& tol1,Standard_Real& tol2) const;
  
  Standard_EXPORT     Standard_Real Tolerance2() const;
  
  Standard_EXPORT     Standard_Integer NbPoints() const;
  
  Standard_EXPORT     Standard_Integer NbSegments() const;
  
  Standard_EXPORT     void Dump(const TCollection_AsciiString& str,const Standard_Integer ie1 = 0,const Standard_Integer ie2 = 0) ;
  
  Standard_EXPORT     void InitPoint(const Standard_Boolean selectkeep = Standard_True) ;
  
  Standard_EXPORT     Standard_Boolean MorePoint() const;
  
  Standard_EXPORT     void NextPoint() ;
  
  Standard_EXPORT    const TopOpeBRep_SequenceOfPoint2d& Points() const;
  
  Standard_EXPORT    const TopOpeBRep_Point2d& Point() const;
  
  Standard_EXPORT    const TopOpeBRep_Point2d& Point(const Standard_Integer I) const;
  
  Standard_EXPORT   virtual  Standard_Boolean ReduceSegment(TopOpeBRep_Point2d& P1,TopOpeBRep_Point2d& P2,TopOpeBRep_Point2d& Pn) const;
  
  Standard_EXPORT     TopOpeBRep_P2Dstatus Status1() const;





protected:





private:

  
  Standard_EXPORT     void Find() ;
  //! process if current edges can be considered as SameDomain <br>
  Standard_EXPORT     Standard_Boolean ComputeSameDomain() ;
  //! set field mySameDomain to B and return B value <br>
  Standard_EXPORT     Standard_Boolean SetSameDomain(const Standard_Boolean B) ;
  
  Standard_EXPORT     void MakePoints2d() ;
  
  Standard_EXPORT     void ReduceSegments() ;
  
  Standard_EXPORT    const IntRes2d_IntersectionSegment& Segment1() const;
  
  Standard_EXPORT     Standard_Boolean IsOpposite1() const;
  
  Standard_EXPORT     void InitPoint1() ;
  
  Standard_EXPORT     Standard_Boolean MorePoint1() const;
  
  Standard_EXPORT     void NextPoint1() ;
  
  Standard_EXPORT    const IntRes2d_IntersectionPoint& Point1() const;
  
  Standard_EXPORT     TopOpeBRepDS_Transition Transition1(const Standard_Integer Index,const TopAbs_Orientation EO) const;
  
  Standard_EXPORT     Standard_Real Parameter1(const Standard_Integer Index) const;
  
  Standard_EXPORT     Standard_Boolean IsVertex1(const Standard_Integer Index) ;
  
  Standard_EXPORT    const TopoDS_Shape& Vertex1(const Standard_Integer Index) ;
  
  Standard_EXPORT     gp_Pnt Value1() const;
  
  Standard_EXPORT     Standard_Boolean IsPointOfSegment1() const;
  
  Standard_EXPORT     Standard_Integer Index1() const;
  //! geometric configuration of E1,E2 at current intersection point : <br>
//! UNSHGEOMETRY if the edges do not share geometry. <br>
//! SAMEORIENTED if the edges share geometry and are same oriented. <br>
//! DIFFORIENTED if the edges share geometry and are not same oriented. <br>
  Standard_EXPORT     TopOpeBRepDS_Config EdgesConfig1() const;


TopoDS_Face myFace1;
TopoDS_Face myFace2;
Handle_BRepAdaptor_HSurface mySurface1;
Handle_BRepAdaptor_HSurface mySurface2;
GeomAbs_SurfaceType mySurfaceType1;
GeomAbs_SurfaceType mySurfaceType2;
Standard_Boolean mySurfacesSameOriented;
Standard_Boolean myFacesSameOriented;
IntRes2d_Domain myDomain1;
IntRes2d_Domain myDomain2;
TopoDS_Edge myEdge1;
TopoDS_Edge myEdge2;
Geom2dAdaptor_Curve myCurve1;
Geom2dAdaptor_Curve myCurve2;
Standard_Real myTol1;
Standard_Real myTol2;
Standard_Boolean myTolForced;
Geom2dInt_GInter myIntersector;
IntRes2d_SequenceOfIntersectionPoint mylpnt;
IntRes2d_SequenceOfIntersectionSegment mylseg;
Standard_Integer myNbPoints;
Standard_Integer myNbSegments;
Standard_Integer myTrueNbPoints;
Standard_Integer myPointIndex;
Standard_Integer myIsVertexPointIndex;
Standard_Integer myIsVertexIndex;
Standard_Boolean myIsVertexValue;
TopoDS_Vertex myIsVertexVertex;
Standard_Integer myDimension;
Standard_Boolean myHasSegment;
Standard_Boolean mySameDomain;
Standard_Boolean myf1surf1F_sameoriented;
Standard_Boolean myf2surf1F_sameoriented;
TopOpeBRep_SequenceOfPoint2d mysp2d;
Standard_Integer myip2d;
Standard_Integer mynp2d;
Standard_Boolean myselectkeep;


};





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


#endif