42cf5bc1 |
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_Circ2d2TanOnIter_HeaderFile |
18 | #define _Geom2dGcc_Circ2d2TanOnIter_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 gp_Lin2d; |
33 | class GccEnt_QualifiedLin; |
34 | class gp_Pnt2d; |
35 | class gp_Circ2d; |
36 | class Geom2dAdaptor_Curve; |
37 | |
38 | |
39 | //! This class implements the algorithms used to |
40 | //! create 2d circles TANgent to 2 entities and |
41 | //! having the center ON a curv. |
42 | //! The order of the tangency argument is always |
43 | //! QualifiedCirc, QualifiedLin, QualifiedCurv, Pnt2d. |
44 | //! the arguments are : |
45 | //! - The two tangency arguments. |
46 | //! - The center line. |
47 | //! - The parameter for each tangency argument which |
48 | //! is a curve. |
49 | //! - The tolerance. |
50 | class Geom2dGcc_Circ2d2TanOnIter |
51 | { |
52 | public: |
53 | |
54 | DEFINE_STANDARD_ALLOC |
55 | |
56 | |
57 | //! This method implements the algorithms used to |
58 | //! create 2d circles TANgent to a 2d circle and a curve and |
59 | //! having the center ON a 2d line. |
60 | //! Param2 is the initial guess on the curve QualifiedCurv. |
61 | //! Tolerance is used for the limit cases. |
62 | Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const GccEnt_QualifiedCirc& Qualified1, const Geom2dGcc_QCurve& Qualified2, const gp_Lin2d& OnLine, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance); |
63 | |
64 | //! This method implements the algorithms used to |
65 | //! create 2d circles TANgent to a 2d line and a curve and |
66 | //! having the center ON a 2d line. |
67 | //! Param2 is the initial guess on the curve QualifiedCurv. |
68 | //! Tolerance is used for the limit cases. |
69 | Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const GccEnt_QualifiedLin& Qualified1, const Geom2dGcc_QCurve& Qualified2, const gp_Lin2d& OnLine, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance); |
70 | |
71 | //! This method implements the algorithms used to |
72 | //! create 2d circles TANgent to two curves and |
73 | //! having the center ON a 2d line. |
74 | //! Param1 is the initial guess on the first QualifiedCurv. |
75 | //! Param2 is the initial guess on the first QualifiedCurv. |
76 | //! Tolerance is used for the limit cases. |
77 | Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const Geom2dGcc_QCurve& Qualified1, const Geom2dGcc_QCurve& Qualified2, const gp_Lin2d& OnLine, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance); |
78 | |
79 | //! This method implements the algorithms used to |
80 | //! create 2d circles TANgent to a 2d point and a curve and |
81 | //! having the center ON a 2d line. |
82 | //! Param2 is the initial guess on the curve QualifiedCurv. |
83 | //! Tolerance is used for the limit cases. |
84 | Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const Geom2dGcc_QCurve& Qualified1, const gp_Pnt2d& Point2, const gp_Lin2d& OnLine, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Tolerance); |
85 | |
86 | //! This method implements the algorithms used to |
87 | //! create 2d circles TANgent to a 2d circle and a curve and |
88 | //! having the center ON a 2d circle. |
89 | //! Param2 is the initial guess on the curve QualifiedCurv. |
90 | //! Tolerance is used for the limit cases. |
91 | Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const GccEnt_QualifiedCirc& Qualified1, const Geom2dGcc_QCurve& Qualified2, const gp_Circ2d& OnCirc, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance); |
92 | |
93 | //! This method implements the algorithms used to |
94 | //! create 2d circles TANgent to a 2d line and a curve and |
95 | //! having the center ON a 2d circle. |
96 | //! Param2 is the initial guess on the curve QualifiedCurv. |
97 | //! Tolerance is used for the limit cases. |
98 | Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const GccEnt_QualifiedLin& Qualified1, const Geom2dGcc_QCurve& Qualified2, const gp_Circ2d& OnCirc, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance); |
99 | |
100 | //! This method implements the algorithms used to |
101 | //! create 2d circles TANgent to two curves and |
102 | //! having the center ON a 2d circle. |
103 | //! Param1 is the initial guess on the first QualifiedCurv. |
104 | //! Param2 is the initial guess on the first QualifiedCurv. |
105 | //! Tolerance is used for the limit cases. |
106 | Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const Geom2dGcc_QCurve& Qualified1, const Geom2dGcc_QCurve& Qualified2, const gp_Circ2d& OnCirc, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance); |
107 | |
108 | //! This method implements the algorithms used to |
109 | //! create 2d circles TANgent to a 2d point and a curve and |
110 | //! having the center ON a 2d circle. |
111 | //! Param2 is the initial guess on the curve QualifiedCurv. |
112 | //! Tolerance is used for the limit cases. |
113 | Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const Geom2dGcc_QCurve& Qualified1, const gp_Pnt2d& Point2, const gp_Circ2d& OnCirc, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Tolerance); |
114 | |
115 | //! This method implements the algorithms used to |
116 | //! create 2d circles TANgent to a 2d circle and a curve and |
117 | //! having the center ON a 2d curve. |
118 | //! Param2 is the initial guess on the curve QualifiedCurv. |
119 | //! ParamOn is the initial guess on the center curve OnCurv. |
120 | //! Tolerance is used for the limit cases. |
121 | Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const GccEnt_QualifiedCirc& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real ParamOn, const Standard_Real Tolerance); |
122 | |
123 | //! This method implements the algorithms used to |
124 | //! create 2d circles TANgent to a 2d line and a curve and |
125 | //! having the center ON a 2d curve. |
126 | //! Param2 is the initial guess on the curve QualifiedCurv. |
127 | //! ParamOn is the initial guess on the center curve OnCurv. |
128 | //! Tolerance is used for the limit cases. |
129 | Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const GccEnt_QualifiedLin& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Geom2dAdaptor_Curve& OnCurve, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real ParamOn, const Standard_Real Tolerance); |
130 | |
131 | //! This method implements the algorithms used to |
132 | //! create 2d circles TANgent to a 2d Point and a curve and |
133 | //! having the center ON a 2d curve. |
134 | //! Param1 is the initial guess on the curve QualifiedCurv. |
135 | //! ParamOn is the initial guess on the center curve OnCurv. |
136 | //! Tolerance is used for the limit cases. |
137 | Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const Geom2dGcc_QCurve& Qualified1, const gp_Pnt2d& Point2, const Geom2dAdaptor_Curve& OnCurve, const Standard_Real Param1, const Standard_Real ParamOn, const Standard_Real Tolerance); |
138 | |
139 | //! This method implements the algorithms used to |
140 | //! create 2d circles TANgent to two curves and |
141 | //! having the center ON a 2d curve. |
142 | //! Param1 is the initial guess on the first curve QualifiedCurv. |
143 | //! Param1 is the initial guess on the second curve QualifiedCurv. |
144 | //! ParamOn is the initial guess on the center curve OnCurv. |
145 | //! Tolerance is used for the limit cases. |
146 | Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const Geom2dGcc_QCurve& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Geom2dAdaptor_Curve& OnCurve, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real ParamOn, const Standard_Real Tolerance); |
147 | |
148 | //! This method returns True if the construction |
149 | //! algorithm succeeded. |
150 | Standard_EXPORT Standard_Boolean IsDone() const; |
151 | |
152 | //! Returns the solution. |
153 | //! It raises NotDone if the construction algorithm |
154 | //! didn't succeed. |
155 | Standard_EXPORT gp_Circ2d ThisSolution() const; |
156 | |
157 | Standard_EXPORT void WhichQualifier (GccEnt_Position& Qualif1, GccEnt_Position& Qualif2) const; |
158 | |
159 | //! Returns information about the tangency point between |
160 | //! the result and the first argument. |
161 | //! ParSol is the intrinsic parameter of the point PntSol |
162 | //! on the solution curv. |
163 | //! ParArg is the intrinsic parameter of the point PntSol |
164 | //! on the argument curv. |
165 | //! It raises NotDone if the construction algorithm |
166 | //! didn't succeed. |
167 | Standard_EXPORT void Tangency1 (Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const; |
168 | |
169 | //! Returns information about the tangency point between |
170 | //! the result and the second argument. |
171 | //! ParSol is the intrinsic parameter of the point PntSol |
172 | //! on the solution curv. |
173 | //! ParArg is the intrinsic parameter of the point PntSol |
174 | //! on the argument curv. |
175 | //! It raises NotDone if the construction algorithm |
176 | //! didn't succeed. |
177 | Standard_EXPORT void Tangency2 (Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const; |
178 | |
179 | //! Returns information about the center (on the curv) of the |
180 | //! result and the third argument. |
181 | //! It raises NotDone if the construction algorithm |
182 | //! didn't succeed. |
183 | Standard_EXPORT void CenterOn3 (Standard_Real& ParArg, gp_Pnt2d& PntSol) const; |
184 | |
185 | //! It raises NotDone if the construction algorithm |
186 | //! didn't succeed. |
187 | Standard_EXPORT Standard_Boolean IsTheSame1() const; |
188 | |
189 | //! It raises NotDone if the construction algorithm |
190 | //! didn't succeed. |
191 | Standard_EXPORT Standard_Boolean IsTheSame2() const; |
192 | |
193 | |
194 | |
195 | |
196 | protected: |
197 | |
198 | |
199 | |
200 | |
201 | |
202 | private: |
203 | |
204 | |
205 | |
206 | Standard_Boolean WellDone; |
207 | gp_Circ2d cirsol; |
208 | GccEnt_Position qualifier1; |
209 | GccEnt_Position qualifier2; |
210 | Standard_Boolean TheSame1; |
211 | Standard_Boolean TheSame2; |
212 | gp_Pnt2d pnttg1sol; |
213 | gp_Pnt2d pnttg2sol; |
214 | gp_Pnt2d pntcen; |
215 | Standard_Real par1sol; |
216 | Standard_Real par2sol; |
217 | Standard_Real pararg1; |
218 | Standard_Real pararg2; |
219 | Standard_Real parcen3; |
220 | |
221 | |
222 | }; |
223 | |
224 | |
225 | |
226 | |
227 | |
228 | |
229 | |
230 | #endif // _Geom2dGcc_Circ2d2TanOnIter_HeaderFile |