0032832: Coding - get rid of unused headers [FairCurve to GeomAPI]
[occt.git] / src / Geom2dGcc / Geom2dGcc_Circ2d2TanRadGeo.hxx
1 // Created on: 1991-03-29
2 // Created by: Remi GILET
3 // Copyright (c) 1991-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _Geom2dGcc_Circ2d2TanRadGeo_HeaderFile
18 #define _Geom2dGcc_Circ2d2TanRadGeo_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22
23 #include <Standard_Integer.hxx>
24 #include <TColgp_Array1OfCirc2d.hxx>
25 #include <GccEnt_Array1OfPosition.hxx>
26 #include <TColStd_Array1OfInteger.hxx>
27 #include <TColgp_Array1OfPnt2d.hxx>
28 #include <TColStd_Array1OfReal.hxx>
29 #include <GccEnt_Position.hxx>
30 class GccEnt_QualifiedCirc;
31 class Geom2dGcc_QCurve;
32 class GccEnt_QualifiedLin;
33 class gp_Pnt2d;
34 class gp_Circ2d;
35
36
37 //! This class implements the algorithms used to
38 //! create 2d circles tangent to one curve and a
39 //! point/line/circle/curv and with a given radius.
40 //! For each construction methods arguments are:
41 //! - Two Qualified elements for tangency constrains.
42 //! (for example EnclosedCirc if we want the
43 //! solution inside the argument EnclosedCirc).
44 //! - Two Reals. One (Radius) for the radius and the
45 //! other (Tolerance) for the tolerance.
46 //! Tolerance is only used for the limit cases.
47 //! For example :
48 //! We want to create a circle inside a circle C1 and
49 //! inside a curve Cu2 with a radius Radius and a
50 //! tolerance Tolerance.
51 //! If we did not used Tolerance it is impossible to
52 //! find a solution in the following case : Cu2 is
53 //! inside C1 and there is no intersection point
54 //! between the two elements.
55 //! With Tolerance we will get a solution if the
56 //! lowest distance between C1 and Cu2 is lower than or
57 //! equal Tolerance.
58 class Geom2dGcc_Circ2d2TanRadGeo 
59 {
60 public:
61
62   DEFINE_STANDARD_ALLOC
63
64   
65   //! This method implements the algorithms used to
66   //! create 2d circles TANgent to a 2d circle and a curve
67   //! with a radius of Radius.
68   //! It raises NegativeValue if Radius is lower than zero.
69   Standard_EXPORT Geom2dGcc_Circ2d2TanRadGeo(const GccEnt_QualifiedCirc& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Standard_Real Radius, const Standard_Real Tolerance);
70   
71   //! This method implements the algorithms used to
72   //! create 2d circles TANgent to a 2d line and a curve
73   //! with a radius of Radius.
74   //! It raises NegativeValue if Radius is lower than zero.
75   Standard_EXPORT Geom2dGcc_Circ2d2TanRadGeo(const GccEnt_QualifiedLin& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Standard_Real Radius, const Standard_Real Tolerance);
76   
77   //! This method implements the algorithms used to
78   //! create 2d circles TANgent to two curves with
79   //! a radius of Radius.
80   //! It raises NegativeValue if Radius is lower than zero.
81   Standard_EXPORT Geom2dGcc_Circ2d2TanRadGeo(const Geom2dGcc_QCurve& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Standard_Real Radius, const Standard_Real Tolerance);
82   
83   //! This method implements the algorithms used to
84   //! create 2d circles TANgent to a curve and a point
85   //! with a radius of Radius.
86   //! It raises NegativeValue if Radius is lower than zero.
87   Standard_EXPORT Geom2dGcc_Circ2d2TanRadGeo(const Geom2dGcc_QCurve& Qualified1, const gp_Pnt2d& Point2, const Standard_Real Radius, const Standard_Real Tolerance);
88   
89   //! This method returns True if the algorithm succeeded.
90   Standard_EXPORT Standard_Boolean IsDone() const;
91   
92   //! This method returns the number of solutions.
93   //! It raises NotDone if the algorithm failed.
94   Standard_EXPORT Standard_Integer NbSolutions() const;
95   
96   //! Returns the solution number Index.
97   //! Be careful: the Index is only a way to get all the
98   //! solutions, but is not associated to those outside the context
99   //! of the algorithm-object.
100   //! It raises OutOfRange exception if Index is greater
101   //! than the number of solutions.
102   //! It raises NotDone if the construction algorithm did not
103   //! succeed.
104   Standard_EXPORT gp_Circ2d ThisSolution (const Standard_Integer Index) const;
105   
106   //! It returns the information about the qualifiers of
107   //! the tangency arguments concerning the solution number Index.
108   //! It returns the real qualifiers (the qualifiers given to the
109   //! constructor method in case of enclosed, enclosing and outside
110   //! and the qualifiers computedin case of unqualified).
111   Standard_EXPORT void WhichQualifier (const Standard_Integer Index, GccEnt_Position& Qualif1, GccEnt_Position& Qualif2) const;
112   
113   //! Returns information about the tangency point between the
114   //! result number Index and the first argument.
115   //! ParSol is the intrinsic parameter of the point PntSol on the solution.
116   //! ParArg is the intrinsic parameter of the point PntSol on the first
117   //! argument.
118   //! It raises OutOfRange if Index is greater than the number
119   //! of solutions.
120   //! It raises NotDone if the construction algorithm did not
121   //! succeed.
122   Standard_EXPORT void Tangency1 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
123   
124   //! Returns information about the tangency point between the
125   //! result number Index and the second argument.
126   //! ParSol is the intrinsic parameter of the point PntSol on
127   //! the solution.
128   //! ParArg is the intrinsic parameter of the point PntArg on
129   //! the second argument.
130   //! It raises OutOfRange if Index is greater than the number
131   //! of solutions.
132   //! It raises NotDone if the construction algorithm did not
133   //! succeed.
134   Standard_EXPORT void Tangency2 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
135   
136   //! Returns True if the solution number Index is equal to
137   //! the first argument.
138   //! It raises OutOfRange if Index is greater than the number
139   //! of solutions.
140   //! It raises NotDone if the construction algorithm did not
141   //! succeed.
142   Standard_EXPORT Standard_Boolean IsTheSame1 (const Standard_Integer Index) const;
143   
144   //! Returns True if the solution number Index is equal to
145   //! the second argument.
146   //! It raises OutOfRange if Index is greater than the number
147   //! of solutions.
148   //! It raises NotDone if the construction algorithm did not
149   //! succeed.
150   Standard_EXPORT Standard_Boolean IsTheSame2 (const Standard_Integer Index) const;
151
152
153
154
155 protected:
156
157
158
159
160
161 private:
162
163
164
165   Standard_Boolean WellDone;
166   Standard_Integer NbrSol;
167   TColgp_Array1OfCirc2d cirsol;
168   GccEnt_Array1OfPosition qualifier1;
169   GccEnt_Array1OfPosition qualifier2;
170   TColStd_Array1OfInteger TheSame1;
171   TColStd_Array1OfInteger TheSame2;
172   TColgp_Array1OfPnt2d pnttg1sol;
173   TColgp_Array1OfPnt2d pnttg2sol;
174   TColStd_Array1OfReal par1sol;
175   TColStd_Array1OfReal par2sol;
176   TColStd_Array1OfReal pararg1;
177   TColStd_Array1OfReal pararg2;
178
179
180 };
181
182
183
184
185
186
187
188 #endif // _Geom2dGcc_Circ2d2TanRadGeo_HeaderFile