5853b05102d69149bae4dbe1861979a45210bce5
[occt.git] / src / Geom2dGcc / Geom2dGcc_Circ2d3TanIter.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_Circ2d3TanIter_HeaderFile
18 #define _Geom2dGcc_Circ2d3TanIter_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <Standard_Boolean.hxx>
25 #include <gp_Circ2d.hxx>
26 #include <GccEnt_Position.hxx>
27 #include <gp_Pnt2d.hxx>
28 #include <Standard_Real.hxx>
29 class StdFail_NotDone;
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 3 points/lines/circles/
39 //! curves with one curve or more.
40 //! The arguments of all construction methods are :
41 //! - The three qualifiied elements for the
42 //! tangency constrains (QualifiedCirc, QualifiedLine,
43 //! Qualifiedcurv, Points).
44 //! - A parameter for each QualifiedCurv.
45 class Geom2dGcc_Circ2d3TanIter 
46 {
47 public:
48
49   DEFINE_STANDARD_ALLOC
50
51   
52   //! This method implements the algorithms used to
53   //! create 2d circles tangent to 2 circles and a curve.
54   Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedCirc& Qualified1, const GccEnt_QualifiedCirc& Qualified2, const Geom2dGcc_QCurve& Qualified3, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance);
55   
56   //! This method implements the algorithms used to
57   //! create 2d circles tangent to a circle and 2 curves.
58   Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedCirc& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Geom2dGcc_QCurve& Qualified3, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance);
59   
60   //! This method implements the algorithms used to
61   //! create 2d circles tangent to a circle and a line and
62   //! a curve.
63   Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedCirc& Qualified1, const GccEnt_QualifiedLin& Qualified2, const Geom2dGcc_QCurve& Qualified3, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance);
64   
65   //! This method implements the algorithms used to
66   //! create 2d circles tangent to a circle and a point and
67   //! a curve.
68   Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedCirc& Qualified1, const Geom2dGcc_QCurve& Qualified2, const gp_Pnt2d& Point3, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Tolerance);
69   
70   //! This method implements the algorithms used to
71   //! create 2d circles tangent to 2 lines and a curve.
72   Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedLin& Qualified1, const GccEnt_QualifiedLin& Qualified2, const Geom2dGcc_QCurve& Qualified3, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance);
73   
74   //! This method implements the algorithms used to
75   //! create 2d circles tangent to a line and 2 curves.
76   Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedLin& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Geom2dGcc_QCurve& Qualified3, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance);
77   
78   //! This method implements the algorithms used to
79   //! create 2d circles tangent to a line and a curve
80   //! and a point.
81   Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedLin& Qualified1, const Geom2dGcc_QCurve& Qualified2, const gp_Pnt2d& Point3, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Tolerance);
82   
83   //! This method implements the algorithms used to
84   //! create 2d circles tangent to a curve and 2 points.
85   Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const Geom2dGcc_QCurve& Qualified1, const gp_Pnt2d& Point1, const gp_Pnt2d& Point2, const Standard_Real Param1, const Standard_Real Tolerance);
86   
87   //! This method implements the algorithms used to
88   //! create 2d circles tangent to 2 curves and a point.
89   Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const Geom2dGcc_QCurve& Qualified1, const Geom2dGcc_QCurve& Qualified2, const gp_Pnt2d& Point2, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Tolerance);
90   
91   //! This method implements the algorithms used to
92   //! create 2d circles tangent to 3 curves.
93   Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const Geom2dGcc_QCurve& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Geom2dGcc_QCurve& Qualified3, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance);
94   
95   //! This method returns True if the construction
96   //! algorithm succeeded.
97   Standard_EXPORT Standard_Boolean IsDone() const;
98   
99   //! Returns the solution.
100   //! It raises NotDone if the construction algorithm
101   //! didn't succeed.
102   Standard_EXPORT gp_Circ2d ThisSolution() const;
103   
104   Standard_EXPORT void WhichQualifier (GccEnt_Position& Qualif1, GccEnt_Position& Qualif2, GccEnt_Position& Qualif3) const;
105   
106   //! Returns informations about the tangency point between
107   //! the result and the first argument.
108   //! ParSol is the intrinsic parameter of the point PntSol
109   //! on the solution curv.
110   //! ParArg is the intrinsic parameter of the point PntSol
111   //! on the argument curv.
112   //! It raises NotDone if the construction algorithm
113   //! didn't succeed.
114   Standard_EXPORT void Tangency1 (Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
115   
116   //! Returns informations about the tangency point between
117   //! the result and the second argument.
118   //! ParSol is the intrinsic parameter of the point PntSol
119   //! on the solution curv.
120   //! ParArg is the intrinsic parameter of the point PntSol
121   //! on the argument curv.
122   //! It raises NotDone if the construction algorithm
123   //! didn't succeed.
124   Standard_EXPORT void Tangency2 (Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
125   
126   //! Returns informations about the tangency point between
127   //! the result and the third argument.
128   //! ParSol is the intrinsic parameter of the point PntSol
129   //! on the solution curv.
130   //! ParArg is the intrinsic parameter of the point PntSol
131   //! on the argument curv.
132   //! It raises NotDone if the construction algorithm
133   //! didn't succeed.
134   Standard_EXPORT void Tangency3 (Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
135   
136   //! It raises NotDone if the construction algorithm
137   //! didn't succeed.
138   Standard_EXPORT Standard_Boolean IsTheSame1() const;
139   
140   //! It raises NotDone if the construction algorithm
141   //! didn't succeed.
142   Standard_EXPORT Standard_Boolean IsTheSame2() const;
143   
144   //! It raises NotDone if the construction algorithm
145   //! didn't succeed.
146   Standard_EXPORT Standard_Boolean IsTheSame3() const;
147
148
149
150
151 protected:
152
153
154
155
156
157 private:
158
159
160
161   Standard_Boolean WellDone;
162   gp_Circ2d cirsol;
163   GccEnt_Position qualifier1;
164   GccEnt_Position qualifier2;
165   GccEnt_Position qualifier3;
166   Standard_Boolean TheSame1;
167   Standard_Boolean TheSame2;
168   Standard_Boolean TheSame3;
169   gp_Pnt2d pnttg1sol;
170   gp_Pnt2d pnttg2sol;
171   gp_Pnt2d pnttg3sol;
172   Standard_Real par1sol;
173   Standard_Real par2sol;
174   Standard_Real par3sol;
175   Standard_Real pararg1;
176   Standard_Real pararg2;
177   Standard_Real pararg3;
178
179
180 };
181
182
183
184
185
186
187
188 #endif // _Geom2dGcc_Circ2d3TanIter_HeaderFile