|
||||
File indexing completed on 2025-01-18 10:03:31
0001 // Created on: 1991-03-18 0002 // Created by: Remy 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 _GccAna_Circ2d3Tan_HeaderFile 0018 #define _GccAna_Circ2d3Tan_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 GccEnt_QualifiedLin; 0032 class gp_Pnt2d; 0033 class gp_Circ2d; 0034 0035 0036 //! This class implements the algorithms used to 0037 //! create 2d circles tangent to 3 points/lines/circles. 0038 //! The arguments of all construction methods are : 0039 //! - The three qualified elements for the 0040 //! tangency constraints (QualifiedCirc, QualifiedLine, 0041 //! Points). 0042 //! - A real Tolerance. 0043 //! Tolerance is only used in the limit cases. 0044 //! For example : 0045 //! We want to create a circle tangent to an UnqualifiedCirc 0046 //! C1 and an UnqualifiedCirc C2 and an UnqualifiedCirc C3 0047 //! with a tolerance Tolerance. 0048 //! If we do not use Tolerance it is impossible to find 0049 //! a solution in the following case : C2 is inside C1 0050 //! and there is no intersection point between the two 0051 //! circles, and C3 is completely outside C1. 0052 //! With Tolerance we will find a solution if the 0053 //! lowest distance between C1 and C2 is lower than or 0054 //! equal Tolerance. 0055 class GccAna_Circ2d3Tan 0056 { 0057 public: 0058 0059 DEFINE_STANDARD_ALLOC 0060 0061 0062 //! This method implements the algorithms used to 0063 //! create 2d circles tangent to 3 circles. 0064 //! ConstructionError is raised if there is a problem during 0065 //! the computation. 0066 Standard_EXPORT GccAna_Circ2d3Tan(const GccEnt_QualifiedCirc& Qualified1, const GccEnt_QualifiedCirc& Qualified2, const GccEnt_QualifiedCirc& Qualified3, const Standard_Real Tolerance); 0067 0068 //! This method implements the algorithms used to 0069 //! create 2d circles tangent to 2 circles and 1 line. 0070 //! ConstructionError is raised if there is a problem during 0071 //! the computation. 0072 Standard_EXPORT GccAna_Circ2d3Tan(const GccEnt_QualifiedCirc& Qualified1, const GccEnt_QualifiedCirc& Qualified2, const GccEnt_QualifiedLin& Qualified3, const Standard_Real Tolerance); 0073 0074 //! This method implements the algorithms used to 0075 //! create 2d circles tangent to 1 circle and 2 lines. 0076 //! ConstructionError is raised if there is a problem during 0077 //! the computation. 0078 Standard_EXPORT GccAna_Circ2d3Tan(const GccEnt_QualifiedCirc& Qualified1, const GccEnt_QualifiedLin& Qualified2, const GccEnt_QualifiedLin& Qualified3, const Standard_Real Tolerance); 0079 0080 //! This method implements the algorithms used to 0081 //! create 2d circles tangent to 3 lines. 0082 //! ConstructionError is raised if there is a problem during 0083 //! the computation. 0084 Standard_EXPORT GccAna_Circ2d3Tan(const GccEnt_QualifiedLin& Qualified1, const GccEnt_QualifiedLin& Qualified2, const GccEnt_QualifiedLin& Qualified3, const Standard_Real Tolerance); 0085 0086 //! This method implements the algorithms used to 0087 //! create 2d circles tangent to 2 circles and 1 Point. 0088 //! ConstructionError is raised if there is a problem during 0089 //! the computation. 0090 Standard_EXPORT GccAna_Circ2d3Tan(const GccEnt_QualifiedCirc& Qualified1, const GccEnt_QualifiedCirc& Qualified2, const gp_Pnt2d& Point3, const Standard_Real Tolerance); 0091 0092 //! This method implements the algorithms used to 0093 //! create 2d circles tangent to a circle and a line and 0094 //! 1 Point. 0095 //! ConstructionError is raised if there is a problem during 0096 //! the computation. 0097 Standard_EXPORT GccAna_Circ2d3Tan(const GccEnt_QualifiedCirc& Qualified1, const GccEnt_QualifiedLin& Qualified2, const gp_Pnt2d& Point3, const Standard_Real Tolerance); 0098 0099 //! This method implements the algorithms used to 0100 //! create 2d circles tangent to 2 lines and 1 Point. 0101 //! ConstructionError is raised if there is a problem during 0102 //! the computation. 0103 Standard_EXPORT GccAna_Circ2d3Tan(const GccEnt_QualifiedLin& Qualified1, const GccEnt_QualifiedLin& Qualified2, const gp_Pnt2d& Point3, const Standard_Real Tolerance); 0104 0105 //! This method implements the algorithms used to 0106 //! create 2d circles tangent to a circle and passing 0107 //! through 2 Points. 0108 //! ConstructionError is raised if there is a problem during 0109 //! the computation. 0110 Standard_EXPORT GccAna_Circ2d3Tan(const GccEnt_QualifiedCirc& Qualified1, const gp_Pnt2d& Point2, const gp_Pnt2d& Point3, const Standard_Real Tolerance); 0111 0112 //! This method implements the algorithms used to 0113 //! create 2d circles tangent to a line and passing 0114 //! through 2 Points. 0115 //! ConstructionError is raised if there is a problem during 0116 //! the computation. 0117 Standard_EXPORT GccAna_Circ2d3Tan(const GccEnt_QualifiedLin& Qualified1, const gp_Pnt2d& Point2, const gp_Pnt2d& Point3, const Standard_Real Tolerance); 0118 0119 //! This method implements the algorithms used to 0120 //! create 2d circles passing through 3 Points. 0121 //! ConstructionError is raised if there is a problem during 0122 //! the computation. 0123 Standard_EXPORT GccAna_Circ2d3Tan(const gp_Pnt2d& Point1, const gp_Pnt2d& Point2, const gp_Pnt2d& Point3, const Standard_Real Tolerance); 0124 0125 //! This method returns True if the construction 0126 //! algorithm succeeded. 0127 //! Note: IsDone protects against a failure arising from a 0128 //! more internal intersection algorithm, which has 0129 //! reached its numeric limits. 0130 Standard_EXPORT Standard_Boolean IsDone() const; 0131 0132 //! This method returns the number of solutions. 0133 //! Raises NotDone if the construction algorithm didn't succeed. 0134 Standard_EXPORT Standard_Integer NbSolutions() const; 0135 0136 //! Returns the solution number Index and raises OutOfRange 0137 //! exception if Index is greater than the number of 0138 //! solutions. 0139 //! Be careful: the Index is only a way to get all the 0140 //! solutions, but is not associated to those outside the 0141 //! context of the algorithm-object. 0142 //! Raises OutOfRange if Index is greater than 0143 //! the number of solutions. 0144 //! It raises NotDone if the algorithm failed. 0145 Standard_EXPORT gp_Circ2d ThisSolution (const Standard_Integer Index) const; 0146 0147 //! Returns the information about the qualifiers of the 0148 //! tangency 0149 //! arguments concerning the solution number Index. 0150 //! It returns the real qualifiers (the qualifiers given to the 0151 //! constructor method in case of enclosed, enclosing and outside 0152 //! and the qualifiers computedin case of unqualified). 0153 Standard_EXPORT void WhichQualifier (const Standard_Integer Index, GccEnt_Position& Qualif1, GccEnt_Position& Qualif2, GccEnt_Position& Qualif3) const; 0154 0155 //! Returns information about the tangency point between the 0156 //! result number Index and the first argument. 0157 //! ParSol is the intrinsic parameter of the point PntSol 0158 //! on the solution curv. 0159 //! ParArg is the intrinsic parameter of the point PntArg 0160 //! on the argument curv. Raises OutOfRange if Index is greater than 0161 //! the number of solutions. 0162 //! It raises NotDone if the algorithm failed. 0163 Standard_EXPORT void Tangency1 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const; 0164 0165 //! Returns information about the tangency point between the 0166 //! result number Index and the first argument. 0167 //! ParSol is the intrinsic parameter of the point PntSol 0168 //! on the solution curv. 0169 //! ParArg is the intrinsic parameter of the point Pntsol 0170 //! on the argument curv. Raises OutOfRange if Index is greater than 0171 //! the number of solutions. 0172 //! It raises NotDone if the algorithm failed. 0173 Standard_EXPORT void Tangency2 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const; 0174 0175 //! Returns information about the tangency point between the 0176 //! result number Index and the first argument. 0177 //! ParSol is the intrinsic parameter of the point PntSol 0178 //! on the solution curv. 0179 //! ParArg is the intrinsic parameter of the point Pntsol 0180 //! on the argument curv. Raises OutOfRange if Index is greater than 0181 //! the number of solutions. 0182 //! It raises NotDone if the algorithm failed. 0183 Standard_EXPORT void Tangency3 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const; 0184 0185 //! Returns True if the solution number Index is equal to 0186 //! the first argument. Raises OutOfRange if Index is greater than 0187 //! the number of solutions. 0188 //! It raises NotDone if the algorithm failed. 0189 Standard_EXPORT Standard_Boolean IsTheSame1 (const Standard_Integer Index) const; 0190 0191 //! Returns True if the solution number Index is equal to 0192 //! the second argument. Raises OutOfRange Index is greater than 0193 //! the number of solutions. 0194 //! It raises NotDone if the algorithm failed. 0195 Standard_EXPORT Standard_Boolean IsTheSame2 (const Standard_Integer Index) const; 0196 0197 //! Returns True if the solution number Index is equal to 0198 //! the third argument. Raises OutOfRange if Index is greater than 0199 //! the number of solutions. 0200 //! It raises NotDone if the algorithm failed. 0201 Standard_EXPORT Standard_Boolean IsTheSame3 (const Standard_Integer Index) const; 0202 0203 0204 0205 0206 protected: 0207 0208 0209 0210 0211 0212 private: 0213 0214 0215 0216 Standard_Boolean WellDone; 0217 Standard_Integer NbrSol; 0218 TColgp_Array1OfCirc2d cirsol; 0219 GccEnt_Array1OfPosition qualifier1; 0220 GccEnt_Array1OfPosition qualifier2; 0221 GccEnt_Array1OfPosition qualifier3; 0222 TColStd_Array1OfInteger TheSame1; 0223 TColStd_Array1OfInteger TheSame2; 0224 TColStd_Array1OfInteger TheSame3; 0225 TColgp_Array1OfPnt2d pnttg1sol; 0226 TColgp_Array1OfPnt2d pnttg2sol; 0227 TColgp_Array1OfPnt2d pnttg3sol; 0228 TColStd_Array1OfReal par1sol; 0229 TColStd_Array1OfReal par2sol; 0230 TColStd_Array1OfReal par3sol; 0231 TColStd_Array1OfReal pararg1; 0232 TColStd_Array1OfReal pararg2; 0233 TColStd_Array1OfReal pararg3; 0234 0235 0236 }; 0237 0238 0239 0240 0241 0242 0243 0244 #endif // _GccAna_Circ2d3Tan_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |