|
||||
File indexing completed on 2025-01-18 10:03:34
0001 // Created on: 1991-04-03 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_Circ2dTanOnRadGeo_HeaderFile 0018 #define _Geom2dGcc_Circ2dTanOnRadGeo_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 Geom2dGcc_QCurve; 0031 class gp_Lin2d; 0032 class gp_Circ2d; 0033 class GccEnt_QualifiedCirc; 0034 class Geom2dAdaptor_Curve; 0035 class GccEnt_QualifiedLin; 0036 class gp_Pnt2d; 0037 0038 0039 //! This class implements the algorithms used to 0040 //! create a 2d circle tangent to a 2d entity, 0041 //! centered on a 2d entity and with a given radius. 0042 //! More than one argument must be a curve. 0043 //! The arguments of all construction methods are : 0044 //! - The qualified element for the tangency constrains 0045 //! (QualifiedCirc, QualifiedLin, QualifiedCurvPoints). 0046 //! - The Center element (circle, line, curve). 0047 //! - A real Tolerance. 0048 //! Tolerance is only used in the limits cases. 0049 //! For example : 0050 //! We want to create a circle tangent to an OutsideCurv Cu1 0051 //! centered on a line OnLine with a radius Radius and with 0052 //! a tolerance Tolerance. 0053 //! If we did not use Tolerance it is impossible to 0054 //! find a solution in the following case : OnLine is 0055 //! outside Cu1. There is no intersection point between Cu1 0056 //! and OnLine. The distance between the line and the 0057 //! circle is greater than Radius. 0058 //! With Tolerance we will give a solution if the 0059 //! distance between Cu1 and OnLine is lower than or 0060 //! equal Tolerance. 0061 class Geom2dGcc_Circ2dTanOnRadGeo 0062 { 0063 public: 0064 0065 DEFINE_STANDARD_ALLOC 0066 0067 0068 //! This methods implements the algorithms used to create 0069 //! 2d Circles tangent to a curve and centered on a 2d Line 0070 //! with a given radius. 0071 //! Tolerance is used to find solution in every limit cases. 0072 //! raises NegativeValue in case of NegativeRadius. 0073 Standard_EXPORT Geom2dGcc_Circ2dTanOnRadGeo(const Geom2dGcc_QCurve& Qualified1, const gp_Lin2d& OnLine, const Standard_Real Radius, const Standard_Real Tolerance); 0074 0075 //! This methods implements the algorithms used to create 0076 //! 2d Circles tangent to a curve and centered on a 2d Circle 0077 //! with a given radius. 0078 //! Tolerance is used to find solution in every limit cases. 0079 //! raises NegativeValue in case of NegativeRadius. 0080 Standard_EXPORT Geom2dGcc_Circ2dTanOnRadGeo(const Geom2dGcc_QCurve& Qualified1, const gp_Circ2d& OnCirc, const Standard_Real Radius, const Standard_Real Tolerance); 0081 0082 //! This methods implements the algorithms used to create 0083 //! 2d Circles tangent to a circle and centered on a 2d curve 0084 //! with a given radius. 0085 //! Tolerance is used to find solution in every limit cases. 0086 //! raises NegativeValue in case of NegativeRadius. 0087 Standard_EXPORT Geom2dGcc_Circ2dTanOnRadGeo(const GccEnt_QualifiedCirc& Qualified1, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Radius, const Standard_Real Tolerance); 0088 0089 //! This methods implements the algorithms used to create 0090 //! 2d Circles tangent to a 2d Line and centered on a 2d curve 0091 //! with a given radius. 0092 //! Tolerance is used to find solution in every limit cases. 0093 //! raises NegativeValue in case of NegativeRadius. 0094 Standard_EXPORT Geom2dGcc_Circ2dTanOnRadGeo(const GccEnt_QualifiedLin& Qualified1, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Radius, const Standard_Real Tolerance); 0095 0096 //! This methods implements the algorithms used to create 0097 //! 2d Circles tangent to a 2d curve and centered on a 2d curve 0098 //! with a given radius. 0099 //! Tolerance is used to find solution in every limit cases. 0100 //! raises NegativeValue in case of NegativeRadius. 0101 Standard_EXPORT Geom2dGcc_Circ2dTanOnRadGeo(const Geom2dGcc_QCurve& Qualified1, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Radius, const Standard_Real Tolerance); 0102 0103 //! This methods implements the algorithms used to create 0104 //! 2d Circles passing through a 2d point and centered on a 0105 //! 2d curve with a given radius. 0106 //! Tolerance is used to find solution in every limit cases. 0107 //! raises NegativeValue in case of NegativeRadius. 0108 Standard_EXPORT Geom2dGcc_Circ2dTanOnRadGeo(const gp_Pnt2d& Point1, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Radius, const Standard_Real Tolerance); 0109 0110 //! This method returns True if the construction 0111 //! algorithm succeeded. 0112 Standard_EXPORT Standard_Boolean IsDone() const; 0113 0114 //! This method returns the number of solutions. 0115 //! It raises NotDone if the construction algorithm 0116 //! didn't succeed. 0117 Standard_EXPORT Standard_Integer NbSolutions() const; 0118 0119 //! Returns the solution number Index and raises OutOfRange 0120 //! exception if Index is greater than the number of solutions. 0121 //! Be careful: the Index is only a way to get all the 0122 //! solutions, but is not associated to these outside the 0123 //! context of the algorithm-object. 0124 //! It raises NotDone if the construction algorithm 0125 //! didn't succeed. 0126 //! It raises OutOfRange if Index is greater than the 0127 //! number of solutions. 0128 Standard_EXPORT gp_Circ2d ThisSolution (const Standard_Integer Index) const; 0129 0130 Standard_EXPORT void WhichQualifier (const Standard_Integer Index, GccEnt_Position& Qualif1) const; 0131 0132 //! Returns information about the tangency point between the 0133 //! result number Index and the first argument. 0134 //! ParSol is the intrinsic parameter of the point on the 0135 //! solution curv. 0136 //! ParArg is the intrinsic parameter of the point on the 0137 //! argument curv. 0138 //! PntSol is the tangency point on the solution curv. 0139 //! PntArg is the tangency point on the argument curv. 0140 //! It raises NotDone if the construction algorithm 0141 //! didn't succeed. 0142 //! It raises OutOfRange if Index is greater than the 0143 //! number of solutions. 0144 Standard_EXPORT void Tangency1 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const; 0145 0146 //! Returns information about the center (on the curv) 0147 //! of the result. 0148 //! ParArg is the intrinsic parameter of the point on 0149 //! the argument curv. 0150 //! PntSol is the center point of the solution curv. 0151 //! It raises NotDone if the construction algorithm 0152 //! didn't succeed. 0153 //! It raises OutOfRange if Index is greater than the 0154 //! number of solutions. 0155 Standard_EXPORT void CenterOn3 (const Standard_Integer Index, Standard_Real& ParArg, gp_Pnt2d& PntSol) const; 0156 0157 //! Returns True if the solution number Index is equal to 0158 //! the first argument and False in the other cases. 0159 //! It raises NotDone if the construction algorithm 0160 //! didn't succeed. 0161 //! It raises OutOfRange if Index is greater than the 0162 //! number of solutions. 0163 Standard_EXPORT Standard_Boolean IsTheSame1 (const Standard_Integer Index) const; 0164 0165 0166 0167 0168 protected: 0169 0170 0171 0172 0173 0174 private: 0175 0176 0177 0178 Standard_Boolean WellDone; 0179 Standard_Integer NbrSol; 0180 TColgp_Array1OfCirc2d cirsol; 0181 GccEnt_Array1OfPosition qualifier1; 0182 TColStd_Array1OfInteger TheSame1; 0183 TColgp_Array1OfPnt2d pnttg1sol; 0184 TColgp_Array1OfPnt2d pntcen3; 0185 TColStd_Array1OfReal par1sol; 0186 TColStd_Array1OfReal pararg1; 0187 TColStd_Array1OfReal parcen3; 0188 0189 0190 }; 0191 0192 0193 0194 0195 0196 0197 0198 #endif // _Geom2dGcc_Circ2dTanOnRadGeo_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |