0032630: Coding - get rid of unsused forward declarations [BinMDF to IFSelect]
[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 #include <Standard_Handle.hxx>
23
24 #include <Standard_Boolean.hxx>
25 #include <Standard_Integer.hxx>
26 #include <TColgp_Array1OfCirc2d.hxx>
27 #include <GccEnt_Array1OfPosition.hxx>
28 #include <TColStd_Array1OfInteger.hxx>
29 #include <TColgp_Array1OfPnt2d.hxx>
30 #include <TColStd_Array1OfReal.hxx>
31 #include <Standard_Real.hxx>
32 #include <GccEnt_Position.hxx>
33 class GccEnt_QualifiedCirc;
34 class Geom2dGcc_QCurve;
35 class GccEnt_QualifiedLin;
36 class gp_Pnt2d;
37 class gp_Circ2d;
38
39
40 //! This class implements the algorithms used to
41 //! create 2d circles tangent to one curve and a
42 //! point/line/circle/curv and with a given radius.
43 //! For each construction methods arguments are:
44 //! - Two Qualified elements for tangency constrains.
45 //! (for example EnclosedCirc if we want the
46 //! solution inside the argument EnclosedCirc).
47 //! - Two Reals. One (Radius) for the radius and the
48 //! other (Tolerance) for the tolerance.
49 //! Tolerance is only used for the limit cases.
50 //! For example :
51 //! We want to create a circle inside a circle C1 and
52 //! inside a curve Cu2 with a radius Radius and a
53 //! tolerance Tolerance.
54 //! If we did not used Tolerance it is impossible to
55 //! find a solution in the following case : Cu2 is
56 //! inside C1 and there is no intersection point
57 //! between the two elements.
58 //! With Tolerance we will get a solution if the
59 //! lowest distance between C1 and Cu2 is lower than or
60 //! equal Tolerance.
61 class Geom2dGcc_Circ2d2TanRadGeo 
62 {
63 public:
64
65   DEFINE_STANDARD_ALLOC
66
67   
68   //! This method implements the algorithms used to
69   //! create 2d circles TANgent to a 2d circle and a curve
70   //! with a radius of Radius.
71   //! It raises NegativeValue if Radius is lower than zero.
72   Standard_EXPORT Geom2dGcc_Circ2d2TanRadGeo(const GccEnt_QualifiedCirc& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Standard_Real Radius, const Standard_Real Tolerance);
73   
74   //! This method implements the algorithms used to
75   //! create 2d circles TANgent to a 2d line and a curve
76   //! with a radius of Radius.
77   //! It raises NegativeValue if Radius is lower than zero.
78   Standard_EXPORT Geom2dGcc_Circ2d2TanRadGeo(const GccEnt_QualifiedLin& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Standard_Real Radius, const Standard_Real Tolerance);
79   
80   //! This method implements the algorithms used to
81   //! create 2d circles TANgent to two curves with
82   //! a radius of Radius.
83   //! It raises NegativeValue if Radius is lower than zero.
84   Standard_EXPORT Geom2dGcc_Circ2d2TanRadGeo(const Geom2dGcc_QCurve& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Standard_Real Radius, const Standard_Real Tolerance);
85   
86   //! This method implements the algorithms used to
87   //! create 2d circles TANgent to a curve and a point
88   //! with a radius of Radius.
89   //! It raises NegativeValue if Radius is lower than zero.
90   Standard_EXPORT Geom2dGcc_Circ2d2TanRadGeo(const Geom2dGcc_QCurve& Qualified1, const gp_Pnt2d& Point2, const Standard_Real Radius, const Standard_Real Tolerance);
91   
92   //! This method returns True if the algorithm succeeded.
93   Standard_EXPORT Standard_Boolean IsDone() const;
94   
95   //! This method returns the number of solutions.
96   //! It raises NotDone if the algorithm failed.
97   Standard_EXPORT Standard_Integer NbSolutions() const;
98   
99   //! Returns the solution number Index.
100   //! Be careful: the Index is only a way to get all the
101   //! solutions, but is not associated to those outside the context
102   //! of the algorithm-object.
103   //! It raises OutOfRange exception if Index is greater
104   //! than the number of solutions.
105   //! It raises NotDone if the construction algorithm did not
106   //! succeed.
107   Standard_EXPORT gp_Circ2d ThisSolution (const Standard_Integer Index) const;
108   
109   //! It returns the information about the qualifiers of
110   //! the tangency arguments concerning the solution number Index.
111   //! It returns the real qualifiers (the qualifiers given to the
112   //! constructor method in case of enclosed, enclosing and outside
113   //! and the qualifiers computedin case of unqualified).
114   Standard_EXPORT void WhichQualifier (const Standard_Integer Index, GccEnt_Position& Qualif1, GccEnt_Position& Qualif2) const;
115   
116   //! Returns information about the tangency point between the
117   //! result number Index and the first argument.
118   //! ParSol is the intrinsic parameter of the point PntSol on the solution.
119   //! ParArg is the intrinsic parameter of the point PntSol on the first
120   //! argument.
121   //! It raises OutOfRange if Index is greater than the number
122   //! of solutions.
123   //! It raises NotDone if the construction algorithm did not
124   //! succeed.
125   Standard_EXPORT void Tangency1 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
126   
127   //! Returns information about the tangency point between the
128   //! result number Index and the second argument.
129   //! ParSol is the intrinsic parameter of the point PntSol on
130   //! the solution.
131   //! ParArg is the intrinsic parameter of the point PntArg on
132   //! the second argument.
133   //! It raises OutOfRange if Index is greater than the number
134   //! of solutions.
135   //! It raises NotDone if the construction algorithm did not
136   //! succeed.
137   Standard_EXPORT void Tangency2 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
138   
139   //! Returns True if the solution number Index is equal to
140   //! the first argument.
141   //! It raises OutOfRange if Index is greater than the number
142   //! of solutions.
143   //! It raises NotDone if the construction algorithm did not
144   //! succeed.
145   Standard_EXPORT Standard_Boolean IsTheSame1 (const Standard_Integer Index) const;
146   
147   //! Returns True if the solution number Index is equal to
148   //! the second argument.
149   //! It raises OutOfRange if Index is greater than the number
150   //! of solutions.
151   //! It raises NotDone if the construction algorithm did not
152   //! succeed.
153   Standard_EXPORT Standard_Boolean IsTheSame2 (const Standard_Integer Index) const;
154
155
156
157
158 protected:
159
160
161
162
163
164 private:
165
166
167
168   Standard_Boolean WellDone;
169   Standard_Integer NbrSol;
170   TColgp_Array1OfCirc2d cirsol;
171   GccEnt_Array1OfPosition qualifier1;
172   GccEnt_Array1OfPosition qualifier2;
173   TColStd_Array1OfInteger TheSame1;
174   TColStd_Array1OfInteger TheSame2;
175   TColgp_Array1OfPnt2d pnttg1sol;
176   TColgp_Array1OfPnt2d pnttg2sol;
177   TColStd_Array1OfReal par1sol;
178   TColStd_Array1OfReal par2sol;
179   TColStd_Array1OfReal pararg1;
180   TColStd_Array1OfReal pararg2;
181
182
183 };
184
185
186
187
188
189
190
191 #endif // _Geom2dGcc_Circ2d2TanRadGeo_HeaderFile