summaryrefslogtreecommitdiff
path: root/inc/IntAna_QuadQuadGeo.hxx
blob: 3b44575d49c6ac6757a2f65acf65fa7b60e22f13 (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
// 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 _IntAna_QuadQuadGeo_HeaderFile
#define _IntAna_QuadQuadGeo_HeaderFile

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

#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _IntAna_ResultType_HeaderFile
#include <IntAna_ResultType.hxx>
#endif
#ifndef _gp_Pnt_HeaderFile
#include <gp_Pnt.hxx>
#endif
#ifndef _gp_Dir_HeaderFile
#include <gp_Dir.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
class StdFail_NotDone;
class Standard_DomainError;
class Standard_OutOfRange;
class gp_Pln;
class gp_Cylinder;
class gp_Sphere;
class gp_Cone;
class gp_Pnt;
class gp_Lin;
class gp_Circ;
class gp_Elips;
class gp_Parab;
class gp_Hypr;


//! Geometric intersections between two natural quadrics <br>
//!          (Sphere , Cylinder , Cone , Pln from gp). <br>
//!          The possible intersections are : <br>
//!           - 1 point <br>
//!           - 1 or 2 line(s) <br>
//!           - 1 Point and 1 Line <br>
//!           - 1 circle <br>
//!           - 1 ellipse <br>
//!           - 1 parabola <br>
//!           - 1 or 2 hyperbola(s). <br>
//!           - Empty : there is no intersection between the two quadrics. <br>
//!           - Same  : the quadrics are identical <br>
//!           - NoGeometricSolution : there may be an intersection, but it <br>
//!                is necessary to use an analytic algorithm to determine <br>
//!                it. See class IntQuadQuad from IntAna. <br>
class IntAna_QuadQuadGeo  {
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); 
  }

  //! Empty constructor. <br>
  Standard_EXPORT   IntAna_QuadQuadGeo();
  //! Creates the intersection between two planes. <br>
//!          TolAng is the angular tolerance used to determine <br>
//!          if the planes are parallel. <br>
//!          Tol is the tolerance used to determine if the planes <br>
//!          are identical (only when they are parallel). <br>
  Standard_EXPORT   IntAna_QuadQuadGeo(const gp_Pln& P1,const gp_Pln& P2,const Standard_Real TolAng,const Standard_Real Tol);
  //! Intersects two planes. <br>
//!          TolAng is the angular tolerance used to determine <br>
//!          if the planes are parallel. <br>
//!          Tol is the tolerance used to determine if the planes <br>
//!          are identical (only when they are parallel). <br>
  Standard_EXPORT     void Perform(const gp_Pln& P1,const gp_Pln& P2,const Standard_Real TolAng,const Standard_Real Tol) ;
  //! Creates the intersection between a plane and a cylinder. <br>
//!          TolAng is the angular tolerance used to determine <br>
//!          if the axis of the cylinder is parallel to the plane. <br>
//!          Tol is the tolerance used to determine if the result <br>
//!          is a circle or an ellipse. If the maximum distance between <br>
//!          the ellipse solution and the circle centered at the ellipse <br>
//!          center is less than Tol, the result will be the circle. <br>
  Standard_EXPORT   IntAna_QuadQuadGeo(const gp_Pln& P,const gp_Cylinder& C,const Standard_Real Tolang,const Standard_Real Tol);
  //! Intersects a plane and a cylinder. <br>
//!          TolAng is the angular tolerance used to determine <br>
//!          if the axis of the cylinder is parallel to the plane. <br>
//!          Tol is the tolerance used to determine if the result <br>
//!          is a circle or an ellipse. If the maximum distance between <br>
//!          the ellipse solution and the circle centered at the ellipse <br>
//!          center is less than Tol, the result will be the circle. <br>
  Standard_EXPORT     void Perform(const gp_Pln& P,const gp_Cylinder& C,const Standard_Real Tolang,const Standard_Real Tol) ;
  //! Creates the intersection between a plane and a sphere. <br>
  Standard_EXPORT   IntAna_QuadQuadGeo(const gp_Pln& P,const gp_Sphere& S);
  //! Intersects a plane and a sphere. <br>
  Standard_EXPORT     void Perform(const gp_Pln& P,const gp_Sphere& S) ;
  //! Creates the intersection between a plane and a cone. <br>
//!          TolAng is the angular tolerance used to determine <br>
//!          if the axis of the cone is parallel or perpendicular <br>
//!          to the plane, and if the generating line of the cone <br>
//!          is parallel to the plane. <br>
//!          Tol is the tolerance used to determine if the apex <br>
//!          of the cone is in the plane. <br>
  Standard_EXPORT   IntAna_QuadQuadGeo(const gp_Pln& P,const gp_Cone& C,const Standard_Real Tolang,const Standard_Real Tol);
  //! Intersects a plane and a cone. <br>
//!          TolAng is the angular tolerance used to determine <br>
//!          if the axis of the cone is parallel or perpendicular <br>
//!          to the plane, and if the generating line of the cone <br>
//!          is parallel to the plane. <br>
//!          Tol is the tolerance used to determine if the apex <br>
//!          of the cone is in the plane. <br>
  Standard_EXPORT     void Perform(const gp_Pln& P,const gp_Cone& C,const Standard_Real Tolang,const Standard_Real Tol) ;
  //! Creates the intersection between two cylinders. <br>
  Standard_EXPORT   IntAna_QuadQuadGeo(const gp_Cylinder& Cyl1,const gp_Cylinder& Cyl2,const Standard_Real Tol);
  //! Intersects two cylinders <br>
  Standard_EXPORT     void Perform(const gp_Cylinder& Cyl1,const gp_Cylinder& Cyl2,const Standard_Real Tol) ;
  //! Creates the intersection between a Cylinder and a Sphere. <br>
  Standard_EXPORT   IntAna_QuadQuadGeo(const gp_Cylinder& Cyl,const gp_Sphere& Sph,const Standard_Real Tol);
  //! Intersects a cylinder and a sphere. <br>
  Standard_EXPORT     void Perform(const gp_Cylinder& Cyl,const gp_Sphere& Sph,const Standard_Real Tol) ;
  //! Creates the intersection between a Cylinder and a Cone <br>
  Standard_EXPORT   IntAna_QuadQuadGeo(const gp_Cylinder& Cyl,const gp_Cone& Con,const Standard_Real Tol);
  //! Intersects a cylinder and a cone. <br>
  Standard_EXPORT     void Perform(const gp_Cylinder& Cyl,const gp_Cone& Con,const Standard_Real Tol) ;
  //! Creates the intersection between two Spheres. <br>
  Standard_EXPORT   IntAna_QuadQuadGeo(const gp_Sphere& Sph1,const gp_Sphere& Sph2,const Standard_Real Tol);
  //! Intersects a two spheres. <br>
  Standard_EXPORT     void Perform(const gp_Sphere& Sph1,const gp_Sphere& Sph2,const Standard_Real Tol) ;
  //! Creates the intersection beween a Sphere and a Cone. <br>
  Standard_EXPORT   IntAna_QuadQuadGeo(const gp_Sphere& Sph,const gp_Cone& Con,const Standard_Real Tol);
  //! Intersects a sphere and a cone. <br>
  Standard_EXPORT     void Perform(const gp_Sphere& Sph,const gp_Cone& Con,const Standard_Real Tol) ;
  //! Creates the intersection beween two cones. <br>
  Standard_EXPORT   IntAna_QuadQuadGeo(const gp_Cone& Con1,const gp_Cone& Con2,const Standard_Real Tol);
  //! Intersects two cones. <br>
  Standard_EXPORT     void Perform(const gp_Cone& Con1,const gp_Cone& Con2,const Standard_Real Tol) ;
  //! Returns Standard_True if the computation was successful. <br>
//! <br>
        Standard_Boolean IsDone() const;
  //! Returns the type of intersection. <br>
//! <br>
        IntAna_ResultType TypeInter() const;
  //! Returns the number of interesections. <br>
//!          The possible intersections are : <br>
//!           - 1 point <br>
//!           - 1 or 2 line(s) <br>
//!           - 1 Point and 1 Line <br>
//!           - 1 circle <br>
//!           - 1 ellipse <br>
//!           - 1 parabola <br>
//!           - 1 or 2 hyperbola(s). <br>
//! <br>
        Standard_Integer NbSolutions() const;
  //! Returns the point solution of range Num. <br>
  Standard_EXPORT     gp_Pnt Point(const Standard_Integer Num) const;
  //! Returns the line solution of range Num. <br>
  Standard_EXPORT     gp_Lin Line(const Standard_Integer Num) const;
  //! Returns the circle solution of range Num. <br>
  Standard_EXPORT     gp_Circ Circle(const Standard_Integer Num) const;
  //! Returns the ellipse solution of range Num. <br>
  Standard_EXPORT     gp_Elips Ellipse(const Standard_Integer Num) const;
  //! Returns the parabola solution of range Num. <br>
  Standard_EXPORT     gp_Parab Parabola(const Standard_Integer Num) const;
  //! Returns the hyperbola solution of range Num. <br>
  Standard_EXPORT     gp_Hypr Hyperbola(const Standard_Integer Num) const;
  
  Standard_EXPORT     Standard_Boolean HasCommonGen() const;
  
  Standard_EXPORT    const gp_Pnt& PChar() const;





protected:

  //! Initialize the values of inner tolerances. <br>
  Standard_EXPORT     void InitTolerances() ;


Standard_Boolean done;
Standard_Integer nbint;
IntAna_ResultType typeres;
gp_Pnt pt1;
gp_Pnt pt2;
gp_Dir dir1;
gp_Dir dir2;
Standard_Real param1;
Standard_Real param2;
Standard_Real param1bis;
Standard_Real param2bis;
Standard_Real myEPSILON_DISTANCE;
Standard_Real myEPSILON_ANGLE_CONE;
Standard_Real myEPSILON_MINI_CIRCLE_RADIUS;
Standard_Real myEPSILON_CYLINDER_DELTA_RADIUS;
Standard_Real myEPSILON_CYLINDER_DELTA_DISTANCE;
Standard_Real myEPSILON_AXES_PARA;
Standard_Boolean myCommonGen;
gp_Pnt myPChar;


private:





};


#include <IntAna_QuadQuadGeo.lxx>



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


#endif