|
||||
File indexing completed on 2025-01-18 10:03:34
0001 // Created on: 1991-03-28 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_Circ2dTanCenGeo_HeaderFile 0018 #define _Geom2dGcc_Circ2dTanCenGeo_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 <TColgp_Array1OfPnt2d.hxx> 0027 #include <TColStd_Array1OfReal.hxx> 0028 #include <GccEnt_Position.hxx> 0029 class Geom2dGcc_QCurve; 0030 class gp_Pnt2d; 0031 class gp_Circ2d; 0032 0033 0034 //! This class implements the algorithms used to 0035 //! create 2d circles tangent to a curve and 0036 //! centered on a point. 0037 //! The arguments of all construction methods are : 0038 //! - The qualified element for the tangency constrains 0039 //! (QualifiedCurv). 0040 //! -The center point Pcenter. 0041 //! - A real Tolerance. 0042 //! Tolerance is only used in the limits cases. 0043 //! For example : 0044 //! We want to create a circle tangent to an EnclosedCurv C1 0045 //! with a tolerance Tolerance. 0046 //! If we did not use Tolerance it is impossible to 0047 //! find a solution in the following case : Pcenter is 0048 //! outside C1. 0049 //! With Tolerance we will give a solution if the distance 0050 //! between C1 and Pcenter is lower than or equal Tolerance/2. 0051 class Geom2dGcc_Circ2dTanCenGeo 0052 { 0053 public: 0054 0055 DEFINE_STANDARD_ALLOC 0056 0057 0058 //! This method implements the algorithms used to 0059 //! create 2d circles tangent to a circle and 0060 //! centered on a point. 0061 Standard_EXPORT Geom2dGcc_Circ2dTanCenGeo(const Geom2dGcc_QCurve& Qualified1, const gp_Pnt2d& Pcenter, const Standard_Real Tolerance); 0062 0063 //! This method returns True if the construction 0064 //! algorithm succeeded. 0065 Standard_EXPORT Standard_Boolean IsDone() const; 0066 0067 //! Returns the number of solutions and raises NotDone 0068 //! exception if the algorithm didn't succeed. 0069 //! It raises NotDone if the construction algorithm 0070 //! didn't succeed. 0071 Standard_EXPORT Standard_Integer NbSolutions() const; 0072 0073 //! Returns the solution number Index and raises OutOfRange 0074 //! exception if Index is greater than the number of solutions. 0075 //! Be careful: the Index is only a way to get all the 0076 //! solutions, but is not associated to these outside the 0077 //! context of the algorithm-object. 0078 //! It raises NotDone if the construction algorithm 0079 //! didn't succeed. 0080 //! It raises OutOfRange if Index is greater than the 0081 //! number of solutions or less than zero. 0082 Standard_EXPORT gp_Circ2d ThisSolution (const Standard_Integer Index) const; 0083 0084 Standard_EXPORT void WhichQualifier (const Standard_Integer Index, GccEnt_Position& Qualif1) const; 0085 0086 //! Returns information about the tangency point between the 0087 //! result number Index and the first argument. 0088 //! ParSol is the intrinsic parameter of the point PntSol 0089 //! on the solution curv. 0090 //! ParArg is the intrinsic parameter of the point PntArg 0091 //! on the argument curv. 0092 //! It raises NotDone if the construction algorithm 0093 //! didn't succeed. 0094 //! It raises OutOfRange if Index is greater than the 0095 //! number of solutions or less than zero. 0096 Standard_EXPORT void Tangency1 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const; 0097 0098 0099 0100 0101 protected: 0102 0103 0104 0105 0106 0107 private: 0108 0109 0110 0111 Standard_Boolean WellDone; 0112 Standard_Integer NbrSol; 0113 TColgp_Array1OfCirc2d cirsol; 0114 GccEnt_Array1OfPosition qualifier1; 0115 TColgp_Array1OfPnt2d pnttg1sol; 0116 TColStd_Array1OfReal par1sol; 0117 TColStd_Array1OfReal pararg1; 0118 0119 0120 }; 0121 0122 0123 0124 0125 0126 0127 0128 #endif // _Geom2dGcc_Circ2dTanCenGeo_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |