summaryrefslogtreecommitdiff
path: root/inc/Adaptor3d_TopolTool.hxx
blob: 943f4eeef8dc0d891adac8f43fa36c802fb42874 (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
// 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 _Adaptor3d_TopolTool_HeaderFile
#define _Adaptor3d_TopolTool_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_DefineHandle_HeaderFile
#include <Standard_DefineHandle.hxx>
#endif
#ifndef _Handle_Adaptor3d_TopolTool_HeaderFile
#include <Handle_Adaptor3d_TopolTool.hxx>
#endif

#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Handle_Adaptor2d_HLine2d_HeaderFile
#include <Handle_Adaptor2d_HLine2d.hxx>
#endif
#ifndef _Handle_Adaptor3d_HVertex_HeaderFile
#include <Handle_Adaptor3d_HVertex.hxx>
#endif
#ifndef _Handle_Adaptor3d_HSurface_HeaderFile
#include <Handle_Adaptor3d_HSurface.hxx>
#endif
#ifndef _Handle_TColStd_HArray1OfReal_HeaderFile
#include <Handle_TColStd_HArray1OfReal.hxx>
#endif
#ifndef _MMgt_TShared_HeaderFile
#include <MMgt_TShared.hxx>
#endif
#ifndef _Handle_Adaptor2d_HCurve2d_HeaderFile
#include <Handle_Adaptor2d_HCurve2d.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _TopAbs_State_HeaderFile
#include <TopAbs_State.hxx>
#endif
#ifndef _TopAbs_Orientation_HeaderFile
#include <TopAbs_Orientation.hxx>
#endif
#ifndef _Standard_Address_HeaderFile
#include <Standard_Address.hxx>
#endif
class Adaptor2d_HLine2d;
class Adaptor3d_HVertex;
class Adaptor3d_HSurface;
class TColStd_HArray1OfReal;
class Standard_DomainError;
class Adaptor2d_HCurve2d;
class gp_Pnt2d;
class gp_Pnt;
class TColStd_Array1OfReal;


//! This class provides a default topological tool, <br>
//!          based on the Umin,Vmin,Umax,Vmax of an HSurface <br>
//!          from Adaptor3d. <br>
//!          All methods and fields may be redefined when <br>
//!          inheriting from this class. <br>
//!          This class is used to instantiate algorithmes <br>
//!          as Intersection, outlines,... <br>
class Adaptor3d_TopolTool : public MMgt_TShared {

public:

  
  Standard_EXPORT   Adaptor3d_TopolTool();
  
  Standard_EXPORT   Adaptor3d_TopolTool(const Handle(Adaptor3d_HSurface)& Surface);
  
  Standard_EXPORT   virtual  void Initialize() ;
  
  Standard_EXPORT   virtual  void Initialize(const Handle(Adaptor3d_HSurface)& S) ;
  
  Standard_EXPORT   virtual  void Initialize(const Handle(Adaptor2d_HCurve2d)& Curve) ;
  
  Standard_EXPORT   virtual  void Init() ;
  
  Standard_EXPORT   virtual  Standard_Boolean More() ;
  
  Standard_EXPORT   virtual  Handle_Adaptor2d_HCurve2d Value() ;
  
  Standard_EXPORT   virtual  void Next() ;
  
  Standard_EXPORT   virtual  void InitVertexIterator() ;
  
  Standard_EXPORT   virtual  Standard_Boolean MoreVertex() ;
  
  Standard_EXPORT   virtual  Handle_Adaptor3d_HVertex Vertex() ;
  
  Standard_EXPORT   virtual  void NextVertex() ;
  
  Standard_EXPORT   virtual  TopAbs_State Classify(const gp_Pnt2d& P,const Standard_Real Tol,const Standard_Boolean ReacdreOnPeriodic = Standard_True) ;
  
  Standard_EXPORT   virtual  Standard_Boolean IsThePointOn(const gp_Pnt2d& P,const Standard_Real Tol,const Standard_Boolean ReacdreOnPeriodic = Standard_True) ;
  //! If the function returns the orientation of the arc. <br>
//!          If the orientation is FORWARD or REVERSED, the arc is <br>
//!          a "real" limit of the surface. <br>
//!          If the orientation is INTERNAL or EXTERNAL, the arc is <br>
//!          considered as an arc on the surface. <br>
  Standard_EXPORT   virtual  TopAbs_Orientation Orientation(const Handle(Adaptor2d_HCurve2d)& C) ;
  //! Returns the orientation of the vertex V. <br>
//!          The vertex has been found with an exploration on <br>
//!          a given arc. The orientation is the orientation <br>
//!          of the vertex on this arc. <br>
  Standard_EXPORT   virtual  TopAbs_Orientation Orientation(const Handle(Adaptor3d_HVertex)& V) ;
  //! Returns True if the vertices V1 and V2 are identical. <br>
//!          This method does not take the orientation of the <br>
//!          vertices in account. <br>
  Standard_EXPORT   virtual  Standard_Boolean Identical(const Handle(Adaptor3d_HVertex)& V1,const Handle(Adaptor3d_HVertex)& V2) ;
  //! answers if arcs and vertices may have 3d representations, <br>
//!          so that we could use Tol3d and Pnt methods. <br>
  Standard_EXPORT   virtual  Standard_Boolean Has3d() const;
  //! returns 3d tolerance of the arc C <br>
  Standard_EXPORT   virtual  Standard_Real Tol3d(const Handle(Adaptor2d_HCurve2d)& C) const;
  //! returns 3d tolerance of the vertex V <br>
  Standard_EXPORT   virtual  Standard_Real Tol3d(const Handle(Adaptor3d_HVertex)& V) const;
  //! returns 3d point of the vertex V <br>
  Standard_EXPORT   virtual  gp_Pnt Pnt(const Handle(Adaptor3d_HVertex)& V) const;
  
  Standard_EXPORT   virtual  void ComputeSamplePoints() ;
  //! compute the sample-points for the intersections algorithms <br>
  Standard_EXPORT   virtual  Standard_Integer NbSamplesU() ;
  //! compute the sample-points for the intersections algorithms <br>
  Standard_EXPORT   virtual  Standard_Integer NbSamplesV() ;
  //! compute the sample-points for the intersections algorithms <br>
  Standard_EXPORT   virtual  Standard_Integer NbSamples() ;
  //! return the set of U parameters on the surface <br>
//!  obtained by the method SamplePnts <br>
  Standard_EXPORT     void UParameters(TColStd_Array1OfReal& theArray) const;
  //! return the set of V parameters on the surface <br>
//!  obtained by the method SamplePnts <br>
  Standard_EXPORT     void VParameters(TColStd_Array1OfReal& theArray) const;
  
  Standard_EXPORT   virtual  void SamplePoint(const Standard_Integer Index,gp_Pnt2d& P2d,gp_Pnt& P3d) ;
  
  Standard_EXPORT   virtual  Standard_Boolean DomainIsInfinite() ;
  
  Standard_EXPORT   virtual  Standard_Address Edge() const;
  //! compute the sample-points for the intersections algorithms <br>
//! by adaptive algorithm for BSpline surfaces. For other surfaces algorithm <br>
//! is the same as in method ComputeSamplePoints(), but only fill arrays of U <br>
//! and V sample parameters; <br>
//! theDefl is a requred deflection <br>
//! theNUmin, theNVmin are minimal nb points for U and V. <br>
  Standard_EXPORT   virtual  void SamplePnts(const Standard_Real theDefl,const Standard_Integer theNUmin,const Standard_Integer theNVmin) ;
  //! compute the sample-points for the intersections algorithms <br>
//! by adaptive algorithm for BSpline surfaces  -  is  used  in  SamplePnts <br>
//! theDefl is a requred deflection <br>
//! theNUmin, theNVmin are minimal nb points for U and V. <br>
  Standard_EXPORT   virtual  void BSplSamplePnts(const Standard_Real theDefl,const Standard_Integer theNUmin,const Standard_Integer theNVmin) ;
  //! Returns true if provide uniform sampling of points. <br>
  Standard_EXPORT   virtual  Standard_Boolean IsUniformSampling() const;




  DEFINE_STANDARD_RTTI(Adaptor3d_TopolTool)

protected:


Handle_Adaptor3d_HSurface myS;
Standard_Integer myNbSamplesU;
Standard_Integer myNbSamplesV;
Handle_TColStd_HArray1OfReal myUPars;
Handle_TColStd_HArray1OfReal myVPars;


private: 


Standard_Integer nbRestr;
Standard_Integer idRestr;
Standard_Real Uinf;
Standard_Real Usup;
Standard_Real Vinf;
Standard_Real Vsup;
Handle_Adaptor2d_HLine2d myRestr[4];
Standard_Integer nbVtx;
Standard_Integer idVtx;
Handle_Adaptor3d_HVertex myVtx[2];


};





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


#endif