|
||||
File indexing completed on 2025-01-18 10:03:34
0001 // Created on: 1991-03-29 0002 // Created by: Remi GILET 0003 // Copyright (c) 1991-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_Circ2d2TanRadGeo_HeaderFile 0018 #define _Geom2dGcc_Circ2d2TanRadGeo_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 0023 #include <Standard_Integer.hxx> 0024 #include <TColgp_Array1OfCirc2d.hxx> 0025 #include <GccEnt_Array1OfPosition.hxx> 0026 #include <TColStd_Array1OfInteger.hxx> 0027 #include <TColgp_Array1OfPnt2d.hxx> 0028 #include <TColStd_Array1OfReal.hxx> 0029 #include <GccEnt_Position.hxx> 0030 class GccEnt_QualifiedCirc; 0031 class Geom2dGcc_QCurve; 0032 class GccEnt_QualifiedLin; 0033 class gp_Pnt2d; 0034 class gp_Circ2d; 0035 0036 0037 //! This class implements the algorithms used to 0038 //! create 2d circles tangent to one curve and a 0039 //! point/line/circle/curv and with a given radius. 0040 //! For each construction methods arguments are: 0041 //! - Two Qualified elements for tangency constrains. 0042 //! (for example EnclosedCirc if we want the 0043 //! solution inside the argument EnclosedCirc). 0044 //! - Two Reals. One (Radius) for the radius and the 0045 //! other (Tolerance) for the tolerance. 0046 //! Tolerance is only used for the limit cases. 0047 //! For example : 0048 //! We want to create a circle inside a circle C1 and 0049 //! inside a curve Cu2 with a radius Radius and a 0050 //! tolerance Tolerance. 0051 //! If we did not used Tolerance it is impossible to 0052 //! find a solution in the following case : Cu2 is 0053 //! inside C1 and there is no intersection point 0054 //! between the two elements. 0055 //! With Tolerance we will get a solution if the 0056 //! lowest distance between C1 and Cu2 is lower than or 0057 //! equal Tolerance. 0058 class Geom2dGcc_Circ2d2TanRadGeo 0059 { 0060 public: 0061 0062 DEFINE_STANDARD_ALLOC 0063 0064 0065 //! This method implements the algorithms used to 0066 //! create 2d circles TANgent to a 2d circle and a curve 0067 //! with a radius of Radius. 0068 //! It raises NegativeValue if Radius is lower than zero. 0069 Standard_EXPORT Geom2dGcc_Circ2d2TanRadGeo(const GccEnt_QualifiedCirc& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Standard_Real Radius, const Standard_Real Tolerance); 0070 0071 //! This method implements the algorithms used to 0072 //! create 2d circles TANgent to a 2d line and a curve 0073 //! with a radius of Radius. 0074 //! It raises NegativeValue if Radius is lower than zero. 0075 Standard_EXPORT Geom2dGcc_Circ2d2TanRadGeo(const GccEnt_QualifiedLin& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Standard_Real Radius, const Standard_Real Tolerance); 0076 0077 //! This method implements the algorithms used to 0078 //! create 2d circles TANgent to two curves with 0079 //! a radius of Radius. 0080 //! It raises NegativeValue if Radius is lower than zero. 0081 Standard_EXPORT Geom2dGcc_Circ2d2TanRadGeo(const Geom2dGcc_QCurve& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Standard_Real Radius, const Standard_Real Tolerance); 0082 0083 //! This method implements the algorithms used to 0084 //! create 2d circles TANgent to a curve and a point 0085 //! with a radius of Radius. 0086 //! It raises NegativeValue if Radius is lower than zero. 0087 Standard_EXPORT Geom2dGcc_Circ2d2TanRadGeo(const Geom2dGcc_QCurve& Qualified1, const gp_Pnt2d& Point2, const Standard_Real Radius, const Standard_Real Tolerance); 0088 0089 //! This method returns True if the algorithm succeeded. 0090 Standard_EXPORT Standard_Boolean IsDone() const; 0091 0092 //! This method returns the number of solutions. 0093 //! It raises NotDone if the algorithm failed. 0094 Standard_EXPORT Standard_Integer NbSolutions() const; 0095 0096 //! Returns the solution number Index. 0097 //! Be careful: the Index is only a way to get all the 0098 //! solutions, but is not associated to those outside the context 0099 //! of the algorithm-object. 0100 //! It raises OutOfRange exception if Index is greater 0101 //! than the number of solutions. 0102 //! It raises NotDone if the construction algorithm did not 0103 //! succeed. 0104 Standard_EXPORT gp_Circ2d ThisSolution (const Standard_Integer Index) const; 0105 0106 //! It returns the information about the qualifiers of 0107 //! the tangency arguments concerning the solution number Index. 0108 //! It returns the real qualifiers (the qualifiers given to the 0109 //! constructor method in case of enclosed, enclosing and outside 0110 //! and the qualifiers computedin case of unqualified). 0111 Standard_EXPORT void WhichQualifier (const Standard_Integer Index, GccEnt_Position& Qualif1, GccEnt_Position& Qualif2) const; 0112 0113 //! Returns information about the tangency point between the 0114 //! result number Index and the first argument. 0115 //! ParSol is the intrinsic parameter of the point PntSol on the solution. 0116 //! ParArg is the intrinsic parameter of the point PntSol on the first 0117 //! argument. 0118 //! It raises OutOfRange if Index is greater than the number 0119 //! of solutions. 0120 //! It raises NotDone if the construction algorithm did not 0121 //! succeed. 0122 Standard_EXPORT void Tangency1 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const; 0123 0124 //! Returns information about the tangency point between the 0125 //! result number Index and the second argument. 0126 //! ParSol is the intrinsic parameter of the point PntSol on 0127 //! the solution. 0128 //! ParArg is the intrinsic parameter of the point PntArg on 0129 //! the second argument. 0130 //! It raises OutOfRange if Index is greater than the number 0131 //! of solutions. 0132 //! It raises NotDone if the construction algorithm did not 0133 //! succeed. 0134 Standard_EXPORT void Tangency2 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const; 0135 0136 //! Returns True if the solution number Index is equal to 0137 //! the first argument. 0138 //! It raises OutOfRange if Index is greater than the number 0139 //! of solutions. 0140 //! It raises NotDone if the construction algorithm did not 0141 //! succeed. 0142 Standard_EXPORT Standard_Boolean IsTheSame1 (const Standard_Integer Index) const; 0143 0144 //! Returns True if the solution number Index is equal to 0145 //! the second argument. 0146 //! It raises OutOfRange if Index is greater than the number 0147 //! of solutions. 0148 //! It raises NotDone if the construction algorithm did not 0149 //! succeed. 0150 Standard_EXPORT Standard_Boolean IsTheSame2 (const Standard_Integer Index) const; 0151 0152 0153 0154 0155 protected: 0156 0157 0158 0159 0160 0161 private: 0162 0163 0164 0165 Standard_Boolean WellDone; 0166 Standard_Integer NbrSol; 0167 TColgp_Array1OfCirc2d cirsol; 0168 GccEnt_Array1OfPosition qualifier1; 0169 GccEnt_Array1OfPosition qualifier2; 0170 TColStd_Array1OfInteger TheSame1; 0171 TColStd_Array1OfInteger TheSame2; 0172 TColgp_Array1OfPnt2d pnttg1sol; 0173 TColgp_Array1OfPnt2d pnttg2sol; 0174 TColStd_Array1OfReal par1sol; 0175 TColStd_Array1OfReal par2sol; 0176 TColStd_Array1OfReal pararg1; 0177 TColStd_Array1OfReal pararg2; 0178 0179 0180 }; 0181 0182 0183 0184 0185 0186 0187 0188 #endif // _Geom2dGcc_Circ2d2TanRadGeo_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |