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
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _Geom2dGcc_Circ2d2TanOnIter_HeaderFile
18 #define _Geom2dGcc_Circ2d2TanOnIter_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
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;
33 class GccEnt_QualifiedLin;
36 class Geom2dAdaptor_Curve;
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
50 class Geom2dGcc_Circ2d2TanOnIter
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
148 //! This method returns True if the construction
149 //! algorithm succeeded.
150 Standard_EXPORT Standard_Boolean IsDone() const;
152 //! Returns the solution.
153 //! It raises NotDone if the construction algorithm
155 Standard_EXPORT gp_Circ2d ThisSolution() const;
157 Standard_EXPORT void WhichQualifier (GccEnt_Position& Qualif1, GccEnt_Position& Qualif2) const;
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
167 Standard_EXPORT void Tangency1 (Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
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
177 Standard_EXPORT void Tangency2 (Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
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
183 Standard_EXPORT void CenterOn3 (Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
185 //! It raises NotDone if the construction algorithm
187 Standard_EXPORT Standard_Boolean IsTheSame1() const;
189 //! It raises NotDone if the construction algorithm
191 Standard_EXPORT Standard_Boolean IsTheSame2() const;
206 Standard_Boolean WellDone;
208 GccEnt_Position qualifier1;
209 GccEnt_Position qualifier2;
210 Standard_Boolean TheSame1;
211 Standard_Boolean TheSame2;
215 Standard_Real par1sol;
216 Standard_Real par2sol;
217 Standard_Real pararg1;
218 Standard_Real pararg2;
219 Standard_Real parcen3;
230 #endif // _Geom2dGcc_Circ2d2TanOnIter_HeaderFile