summaryrefslogtreecommitdiff
path: root/inc/IntAna2d_AnaIntersection.hxx
blob: f07eda18b9f7fc9ad08aec48cb450f2f35c70474 (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
// 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 _IntAna2d_AnaIntersection_HeaderFile
#define _IntAna2d_AnaIntersection_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 _IntAna2d_IntPoint_HeaderFile
#include <IntAna2d_IntPoint.hxx>
#endif
class StdFail_NotDone;
class Standard_OutOfRange;
class gp_Lin2d;
class gp_Circ2d;
class IntAna2d_Conic;
class gp_Elips2d;
class gp_Parab2d;
class gp_Hypr2d;
class IntAna2d_IntPoint;


//! Implementation of the analytical intersection between: <br>
//!          - two Lin2d, <br>
//!          - two Circ2d, <br>
//!          - a Lin2d and a Circ2d, <br>
//!          - an element of gp (Lin2d, Circ2d, Elips2d, Parab2d, Hypr2d) <br>
//!          and another conic. <br>
//!          No tolerance is given for all the intersections: the tolerance <br>
//!          will be the "precision machine". <br>
class IntAna2d_AnaIntersection  {
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. IsDone returns False. <br>
  Standard_EXPORT   IntAna2d_AnaIntersection();
  //! Intersection between two lines. <br>
  Standard_EXPORT   IntAna2d_AnaIntersection(const gp_Lin2d& L1,const gp_Lin2d& L2);
  //! Intersection between two circles. <br>
  Standard_EXPORT   IntAna2d_AnaIntersection(const gp_Circ2d& C1,const gp_Circ2d& C2);
  //! Intersection between a line and a circle. <br>
  Standard_EXPORT   IntAna2d_AnaIntersection(const gp_Lin2d& L,const gp_Circ2d& C);
  //! Intersection between a line and a conic. <br>
  Standard_EXPORT   IntAna2d_AnaIntersection(const gp_Lin2d& L,const IntAna2d_Conic& C);
  //! Intersection between a circle and another conic. <br>
  Standard_EXPORT   IntAna2d_AnaIntersection(const gp_Circ2d& C,const IntAna2d_Conic& Co);
  //! Intersection between an ellipse and another conic. <br>
  Standard_EXPORT   IntAna2d_AnaIntersection(const gp_Elips2d& E,const IntAna2d_Conic& C);
  //! Intersection between a parabola and another conic. <br>
  Standard_EXPORT   IntAna2d_AnaIntersection(const gp_Parab2d& P,const IntAna2d_Conic& C);
  //! Intersection between an hyperbola and another conic. <br>
  Standard_EXPORT   IntAna2d_AnaIntersection(const gp_Hypr2d& H,const IntAna2d_Conic& C);
  //! Intersection between two lines. <br>
  Standard_EXPORT     void Perform(const gp_Lin2d& L1,const gp_Lin2d& L2) ;
  //! Intersection between two circles. <br>
  Standard_EXPORT     void Perform(const gp_Circ2d& C1,const gp_Circ2d& C2) ;
  //! Intersection between a line and a circle. <br>
  Standard_EXPORT     void Perform(const gp_Lin2d& L,const gp_Circ2d& C) ;
  //! Intersection between a line and a conic. <br>
  Standard_EXPORT     void Perform(const gp_Lin2d& L,const IntAna2d_Conic& C) ;
  //! Intersection between a circle and another conic. <br>
  Standard_EXPORT     void Perform(const gp_Circ2d& C,const IntAna2d_Conic& Co) ;
  //! Intersection between an ellipse and another conic. <br>
  Standard_EXPORT     void Perform(const gp_Elips2d& E,const IntAna2d_Conic& C) ;
  //! Intersection between a parabola and another conic. <br>
  Standard_EXPORT     void Perform(const gp_Parab2d& P,const IntAna2d_Conic& C) ;
  //! Intersection between an hyperbola and another conic. <br>
  Standard_EXPORT     void Perform(const gp_Hypr2d& H,const IntAna2d_Conic& C) ;
  //! Returns TRUE if the computation was succesfull. <br>
        Standard_Boolean IsDone() const;
  //! Returns TRUE when there is no intersection, i-e <br>
//!           - no intersection point <br>
//!           - the elements are not identical. <br>
//!          The element may be parallel in this case. <br>
        Standard_Boolean IsEmpty() const;
  //! For the intersection between an element of gp and a conic <br>
//!          known by an implicit equation, the result will be TRUE <br>
//!          if the element of gp verifies the implicit equation. <br>
//!          For the intersection between two Lin2d or two Circ2d, the <br>
//!          result will be TRUE if the elements are identical. <br>
//!          The function returns FALSE in all the other cases. <br>
        Standard_Boolean IdenticalElements() const;
  //! For the intersection between two Lin2d or two Circ2d, <br>
//!          the function returns TRUE if the elements are parallel. <br>
//!          The function returns FALSE in all the other cases. <br>
        Standard_Boolean ParallelElements() const;
  //! returns the number of IntPoint between the 2 curves. <br>
        Standard_Integer NbPoints() const;
  //! returns the intersection point of range N; <br>
//!          If (N<=0) or (N>NbPoints), an exception is raised. <br>
       const IntAna2d_IntPoint& Point(const Standard_Integer N) const;





protected:





private:



Standard_Boolean done;
Standard_Boolean para;
Standard_Boolean iden;
Standard_Boolean empt;
Standard_Integer nbp;
IntAna2d_IntPoint lpnt[4];


};


#include <IntAna2d_AnaIntersection.lxx>



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


#endif