|
||||
File indexing completed on 2025-01-18 10:03:34
0001 // Created on: 1992-10-20 0002 // Created by: Remi GILET 0003 // Copyright (c) 1992-1999 Matra Datavision 0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS 0005 // 0006 // This file is part of Open CASCADE Technology software library. 0007 // 0008 // This library is free software; you can redistribute it and/or modify it under 0009 // the terms of the GNU Lesser General Public License version 2.1 as published 0010 // by the Free Software Foundation, with special exception defined in the file 0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0012 // distribution for complete text of the license and disclaimer of any warranty. 0013 // 0014 // Alternatively, this file may be used under the terms of Open CASCADE 0015 // commercial license or contractual agreement. 0016 0017 #ifndef _Geom2dGcc_Circ2d2TanOn_HeaderFile 0018 #define _Geom2dGcc_Circ2d2TanOn_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <TColgp_Array1OfCirc2d.hxx> 0025 #include <Standard_Integer.hxx> 0026 #include <GccEnt_Array1OfPosition.hxx> 0027 #include <TColStd_Array1OfInteger.hxx> 0028 #include <TColgp_Array1OfPnt2d.hxx> 0029 #include <TColStd_Array1OfReal.hxx> 0030 #include <GccEnt_Position.hxx> 0031 class Geom2dGcc_QualifiedCurve; 0032 class Geom2dAdaptor_Curve; 0033 class Geom2d_Point; 0034 class GccAna_Circ2d2TanOn; 0035 class Geom2dGcc_Circ2d2TanOnGeo; 0036 class gp_Circ2d; 0037 class gp_Pnt2d; 0038 0039 0040 //! This class implements the algorithms used to 0041 //! create 2d circles TANgent to 2 entities and 0042 //! having the center ON a curve. 0043 //! The order of the tangency argument is always 0044 //! QualifiedCirc, QualifiedLin, QualifiedCurv, Pnt2d. 0045 //! the arguments are : 0046 //! - The two tangency arguments. 0047 //! - The center line. 0048 //! - The parameter for each tangency argument which 0049 //! is a curve. 0050 //! - The tolerance. 0051 class Geom2dGcc_Circ2d2TanOn 0052 { 0053 public: 0054 0055 DEFINE_STANDARD_ALLOC 0056 0057 0058 //! This method implements the algorithms used to 0059 //! create 2d circles TANgent to two curves and 0060 //! having the center ON a 2d curve. 0061 //! Param1 is the initial guess on the first curve QualifiedCurv. 0062 //! Param1 is the initial guess on the second curve QualifiedCurv. 0063 //! ParamOn is the initial guess on the center curve OnCurv. 0064 //! Tolerance is used for the limit cases. 0065 Standard_EXPORT Geom2dGcc_Circ2d2TanOn(const Geom2dGcc_QualifiedCurve& Qualified1, const Geom2dGcc_QualifiedCurve& Qualified2, const Geom2dAdaptor_Curve& OnCurve, const Standard_Real Tolerance, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real ParamOn); 0066 0067 //! This method implements the algorithms used to 0068 //! create 2d circles TANgent to one curve and one point and 0069 //! having the center ON a 2d curve. 0070 //! Param1 is the initial guess on the first curve QualifiedCurv. 0071 //! ParamOn is the initial guess on the center curve OnCurv. 0072 //! Tolerance is used for the limit cases. 0073 Standard_EXPORT Geom2dGcc_Circ2d2TanOn(const Geom2dGcc_QualifiedCurve& Qualified1, const Handle(Geom2d_Point)& Point, const Geom2dAdaptor_Curve& OnCurve, const Standard_Real Tolerance, const Standard_Real Param1, const Standard_Real ParamOn); 0074 0075 //! This method implements the algorithms used to 0076 //! create 2d circles TANgent to two points and 0077 //! having the center ON a 2d curve. 0078 //! Tolerance is used for the limit cases. 0079 Standard_EXPORT Geom2dGcc_Circ2d2TanOn(const Handle(Geom2d_Point)& Point1, const Handle(Geom2d_Point)& Point2, const Geom2dAdaptor_Curve& OnCurve, const Standard_Real Tolerance); 0080 0081 Standard_EXPORT void Results (const GccAna_Circ2d2TanOn& Circ); 0082 0083 Standard_EXPORT void Results (const Geom2dGcc_Circ2d2TanOnGeo& Circ); 0084 0085 //! Returns true if the construction algorithm does not fail 0086 //! (even if it finds no solution). 0087 //! Note: IsDone protects against a failure arising from a 0088 //! more internal intersection algorithm, which has 0089 //! reached its numeric limits. 0090 Standard_EXPORT Standard_Boolean IsDone() const; 0091 0092 //! This method returns the number of solutions. 0093 //! NotDone is raised if the algorithm failed. 0094 Standard_EXPORT Standard_Integer NbSolutions() const; 0095 0096 //! Returns the solution number Index and raises OutOfRange 0097 //! exception if Index is greater than the number of solutions. 0098 //! Be careful: the Index is only a way to get all the 0099 //! solutions, but is not associated to these outside the context 0100 //! of the algorithm-object. 0101 //! Exceptions 0102 //! Standard_OutOfRange if Index is less than or equal 0103 //! to zero or greater than the number of solutions 0104 //! computed by this algorithm. 0105 //! StdFail_NotDone if the construction fails. 0106 Standard_EXPORT gp_Circ2d ThisSolution (const Standard_Integer Index) const; 0107 0108 //! It returns the information about the qualifiers of 0109 //! the tangency 0110 //! arguments concerning the solution number Index. 0111 //! It returns the real qualifiers (the qualifiers given to the 0112 //! constructor method in case of enclosed, enclosing and outside 0113 //! and the qualifiers computedin case of unqualified). 0114 //! Exceptions 0115 //! Standard_OutOfRange if Index is less than zero or 0116 //! greater than the number of solutions computed by this algorithm. 0117 //! StdFail_NotDone if the construction fails. 0118 Standard_EXPORT void WhichQualifier (const Standard_Integer Index, GccEnt_Position& Qualif1, GccEnt_Position& Qualif2) const; 0119 0120 //! Returns information about the tangency point between the 0121 //! result and the first argument. 0122 //! ParSol is the intrinsic parameter of the point PntSol on the solution curv. 0123 //! ParArg is the intrinsic parameter of the point PntSol on the argument curv. 0124 Standard_EXPORT void Tangency1 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const; 0125 0126 //! Returns information about the tangency point between the 0127 //! result and the second argument. 0128 //! ParSol is the intrinsic parameter of the point PntSol on the solution curv. 0129 //! ParArg is the intrinsic parameter of the point PntSol on the argument curv. 0130 Standard_EXPORT void Tangency2 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const; 0131 0132 //! Returns the center PntSol of the solution of index Index 0133 //! computed by this algorithm. 0134 //! ParArg is the parameter of the point PntSol on the third argument. 0135 //! Exceptions 0136 //! Standard_OutOfRange if Index is less than zero or 0137 //! greater than the number of solutions computed by this algorithm. 0138 //! StdFail_NotDone if the construction fails. 0139 Standard_EXPORT void CenterOn3 (const Standard_Integer Index, Standard_Real& ParArg, gp_Pnt2d& PntSol) const; 0140 0141 //! Returns true if the solution of index Index and, 0142 //! respectively, the first or second argument of this 0143 //! algorithm are the same (i.e. there are 2 identical circles). 0144 //! If Rarg is the radius of the first or second argument, 0145 //! Rsol is the radius of the solution and dist is the 0146 //! distance between the two centers, we consider the two 0147 //! circles to be identical if |Rarg - Rsol| and dist 0148 //! are less than or equal to the tolerance criterion given at 0149 //! the time of construction of this algorithm. 0150 //! Exceptions 0151 //! Standard_OutOfRange if Index is less than zero or 0152 //! greater than the number of solutions computed by this algorithm. 0153 //! StdFail_NotDone if the construction fails. 0154 Standard_EXPORT Standard_Boolean IsTheSame1 (const Standard_Integer Index) const; 0155 0156 //! Returns true if the solution of index Index and, 0157 //! respectively, the first or second argument of this 0158 //! algorithm are the same (i.e. there are 2 identical circles). 0159 //! If Rarg is the radius of the first or second argument, 0160 //! Rsol is the radius of the solution and dist is the 0161 //! distance between the two centers, we consider the two 0162 //! circles to be identical if |Rarg - Rsol| and dist 0163 //! are less than or equal to the tolerance criterion given at 0164 //! the time of construction of this algorithm. 0165 //! Exceptions 0166 //! Standard_OutOfRange if Index is less than zero or 0167 //! greater than the number of solutions computed by this algorithm. 0168 //! StdFail_NotDone if the construction fails. 0169 Standard_EXPORT Standard_Boolean IsTheSame2 (const Standard_Integer Index) const; 0170 0171 0172 0173 0174 protected: 0175 0176 0177 0178 0179 0180 private: 0181 0182 0183 0184 Standard_Boolean WellDone; 0185 TColgp_Array1OfCirc2d cirsol; 0186 Standard_Integer NbrSol; 0187 GccEnt_Array1OfPosition qualifier1; 0188 GccEnt_Array1OfPosition qualifier2; 0189 TColStd_Array1OfInteger TheSame1; 0190 TColStd_Array1OfInteger TheSame2; 0191 TColgp_Array1OfPnt2d pnttg1sol; 0192 TColgp_Array1OfPnt2d pnttg2sol; 0193 TColgp_Array1OfPnt2d pntcen; 0194 TColStd_Array1OfReal par1sol; 0195 TColStd_Array1OfReal par2sol; 0196 TColStd_Array1OfReal pararg1; 0197 TColStd_Array1OfReal pararg2; 0198 TColStd_Array1OfReal parcen3; 0199 Standard_Boolean Invert; 0200 0201 0202 }; 0203 0204 0205 0206 0207 0208 0209 0210 #endif // _Geom2dGcc_Circ2d2TanOn_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |