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