0032630: Coding - get rid of unsused forward declarations [BinMDF to IFSelect]
[occt.git] / src / Geom2dGcc / Geom2dGcc_Circ2dTanOnRadGeo.hxx
1 // Created on: 1991-04-03
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_Circ2dTanOnRadGeo_HeaderFile
18 #define _Geom2dGcc_Circ2dTanOnRadGeo_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 Geom2dGcc_QCurve;
34 class gp_Lin2d;
35 class gp_Circ2d;
36 class GccEnt_QualifiedCirc;
37 class Geom2dAdaptor_Curve;
38 class GccEnt_QualifiedLin;
39 class gp_Pnt2d;
40
41
42 //! This class implements the algorithms used to
43 //! create a 2d circle tangent to a 2d entity,
44 //! centered on a 2d entity and with a given radius.
45 //! More than one argument must be a curve.
46 //! The arguments of all construction methods are :
47 //! - The qualified element for the tangency constrains
48 //! (QualifiedCirc, QualifiedLin, QualifiedCurvPoints).
49 //! - The Center element (circle, line, curve).
50 //! - A real Tolerance.
51 //! Tolerance is only used in the limits cases.
52 //! For example :
53 //! We want to create a circle tangent to an OutsideCurv Cu1
54 //! centered on a line OnLine with a radius Radius and with
55 //! a tolerance Tolerance.
56 //! If we did not use Tolerance it is impossible to
57 //! find a solution in the following case : OnLine is
58 //! outside Cu1. There is no intersection point between Cu1
59 //! and OnLine. The distance between the line and the
60 //! circle is greater than Radius.
61 //! With Tolerance we will give a solution if the
62 //! distance between Cu1 and OnLine is lower than or
63 //! equal Tolerance.
64 class Geom2dGcc_Circ2dTanOnRadGeo 
65 {
66 public:
67
68   DEFINE_STANDARD_ALLOC
69
70   
71   //! This methods implements the algorithms used to create
72   //! 2d Circles tangent to a curve and centered on a 2d Line
73   //! with a given radius.
74   //! Tolerance is used to find solution in every limit cases.
75   //! raises NegativeValue in case of NegativeRadius.
76   Standard_EXPORT Geom2dGcc_Circ2dTanOnRadGeo(const Geom2dGcc_QCurve& Qualified1, const gp_Lin2d& OnLine, const Standard_Real Radius, const Standard_Real Tolerance);
77   
78   //! This methods implements the algorithms used to create
79   //! 2d Circles tangent to a curve and centered on a 2d Circle
80   //! with a given radius.
81   //! Tolerance is used to find solution in every limit cases.
82   //! raises NegativeValue in case of NegativeRadius.
83   Standard_EXPORT Geom2dGcc_Circ2dTanOnRadGeo(const Geom2dGcc_QCurve& Qualified1, const gp_Circ2d& OnCirc, const Standard_Real Radius, const Standard_Real Tolerance);
84   
85   //! This methods implements the algorithms used to create
86   //! 2d Circles tangent to a circle and centered on a 2d curve
87   //! with a given radius.
88   //! Tolerance is used to find solution in every limit cases.
89   //! raises NegativeValue in case of NegativeRadius.
90   Standard_EXPORT Geom2dGcc_Circ2dTanOnRadGeo(const GccEnt_QualifiedCirc& Qualified1, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Radius, const Standard_Real Tolerance);
91   
92   //! This methods implements the algorithms used to create
93   //! 2d Circles tangent to a 2d Line and centered on a 2d curve
94   //! with a given radius.
95   //! Tolerance is used to find solution in every limit cases.
96   //! raises NegativeValue in case of NegativeRadius.
97   Standard_EXPORT Geom2dGcc_Circ2dTanOnRadGeo(const GccEnt_QualifiedLin& Qualified1, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Radius, const Standard_Real Tolerance);
98   
99   //! This methods implements the algorithms used to create
100   //! 2d Circles tangent to a 2d curve and centered on a 2d curve
101   //! with a given radius.
102   //! Tolerance is used to find solution in every limit cases.
103   //! raises NegativeValue in case of NegativeRadius.
104   Standard_EXPORT Geom2dGcc_Circ2dTanOnRadGeo(const Geom2dGcc_QCurve& Qualified1, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Radius, const Standard_Real Tolerance);
105   
106   //! This methods implements the algorithms used to create
107   //! 2d Circles passing through a 2d point and centered on a
108   //! 2d curve with a given radius.
109   //! Tolerance is used to find solution in every limit cases.
110   //! raises NegativeValue in case of NegativeRadius.
111   Standard_EXPORT Geom2dGcc_Circ2dTanOnRadGeo(const gp_Pnt2d& Point1, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Radius, const Standard_Real Tolerance);
112   
113   //! This method returns True if the construction
114   //! algorithm succeeded.
115   Standard_EXPORT Standard_Boolean IsDone() const;
116   
117   //! This method returns the number of solutions.
118   //! It raises NotDone if the construction algorithm
119   //! didn't succeed.
120   Standard_EXPORT Standard_Integer NbSolutions() const;
121   
122   //! Returns the solution number Index and raises OutOfRange
123   //! exception if Index is greater than the number of solutions.
124   //! Be careful: the Index is only a way to get all the
125   //! solutions, but is not associated to these outside the
126   //! context of the algorithm-object.
127   //! It raises NotDone if the construction algorithm
128   //! didn't succeed.
129   //! It raises OutOfRange if Index is greater than the
130   //! number of solutions.
131   Standard_EXPORT gp_Circ2d ThisSolution (const Standard_Integer Index) const;
132   
133   Standard_EXPORT void WhichQualifier (const Standard_Integer Index, GccEnt_Position& Qualif1) const;
134   
135   //! Returns information about the tangency point between the
136   //! result number Index and the first argument.
137   //! ParSol is the intrinsic parameter of the point on the
138   //! solution curv.
139   //! ParArg is the intrinsic parameter of the point on the
140   //! argument curv.
141   //! PntSol is the tangency point on the solution curv.
142   //! PntArg is the tangency point on the argument curv.
143   //! It raises NotDone if the construction algorithm
144   //! didn't succeed.
145   //! It raises OutOfRange if Index is greater than the
146   //! number of solutions.
147   Standard_EXPORT void Tangency1 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
148   
149   //! Returns information about the center (on the curv)
150   //! of the result.
151   //! ParArg is the intrinsic parameter of the point on
152   //! the argument curv.
153   //! PntSol is the center point of the solution curv.
154   //! It raises NotDone if the construction algorithm
155   //! didn't succeed.
156   //! It raises OutOfRange if Index is greater than the
157   //! number of solutions.
158   Standard_EXPORT void CenterOn3 (const Standard_Integer Index, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
159   
160   //! Returns True if the solution number Index is equal to
161   //! the first argument and False in the other cases.
162   //! It raises NotDone if the construction algorithm
163   //! didn't succeed.
164   //! It raises OutOfRange if Index is greater than the
165   //! number of solutions.
166   Standard_EXPORT Standard_Boolean IsTheSame1 (const Standard_Integer Index) const;
167
168
169
170
171 protected:
172
173
174
175
176
177 private:
178
179
180
181   Standard_Boolean WellDone;
182   Standard_Integer NbrSol;
183   TColgp_Array1OfCirc2d cirsol;
184   GccEnt_Array1OfPosition qualifier1;
185   TColStd_Array1OfInteger TheSame1;
186   TColgp_Array1OfPnt2d pnttg1sol;
187   TColgp_Array1OfPnt2d pntcen3;
188   TColStd_Array1OfReal par1sol;
189   TColStd_Array1OfReal pararg1;
190   TColStd_Array1OfReal parcen3;
191
192
193 };
194
195
196
197
198
199
200
201 #endif // _Geom2dGcc_Circ2dTanOnRadGeo_HeaderFile