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