|
|
|||
File indexing completed on 2026-09-14 09:14:23
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 <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_Pnt2d; 0030 class gp_Circ2d; 0031 0032 //! This class implements the algorithms used to 0033 //! create 2d circles tangent to a curve and 0034 //! centered on a point. 0035 //! The arguments of all construction methods are : 0036 //! - The qualified element for the tangency constrains 0037 //! (QualifiedCurv). 0038 //! -The center point Pcenter. 0039 //! - A real Tolerance. 0040 //! Tolerance is only used in the limits cases. 0041 //! For example : 0042 //! We want to create a circle tangent to an EnclosedCurv C1 0043 //! with a tolerance Tolerance. 0044 //! If we did not use Tolerance it is impossible to 0045 //! find a solution in the following case : Pcenter is 0046 //! outside C1. 0047 //! With Tolerance we will give a solution if the distance 0048 //! between C1 and Pcenter is lower than or equal Tolerance/2. 0049 class Geom2dGcc_Circ2dTanCenGeo 0050 { 0051 public: 0052 DEFINE_STANDARD_ALLOC 0053 0054 //! This method implements the algorithms used to 0055 //! create 2d circles tangent to a circle and 0056 //! centered on a point. 0057 Standard_EXPORT Geom2dGcc_Circ2dTanCenGeo(const Geom2dGcc_QCurve& Qualified1, 0058 const gp_Pnt2d& Pcenter, 0059 const double Tolerance); 0060 0061 //! This method returns True if the construction 0062 //! algorithm succeeded. 0063 Standard_EXPORT bool IsDone() const; 0064 0065 //! Returns the number of solutions and raises NotDone 0066 //! exception if the algorithm didn't succeed. 0067 //! It raises NotDone if the construction algorithm 0068 //! didn't succeed. 0069 Standard_EXPORT int NbSolutions() const; 0070 0071 //! Returns the solution number Index and raises OutOfRange 0072 //! exception if Index is greater than the number of solutions. 0073 //! Be careful: the Index is only a way to get all the 0074 //! solutions, but is not associated to these outside the 0075 //! context of the algorithm-object. 0076 //! It raises NotDone if the construction algorithm 0077 //! didn't succeed. 0078 //! It raises OutOfRange if Index is greater than the 0079 //! number of solutions or less than zero. 0080 Standard_EXPORT gp_Circ2d ThisSolution(const int Index) const; 0081 0082 Standard_EXPORT void WhichQualifier(const int Index, GccEnt_Position& Qualif1) const; 0083 0084 //! Returns information about the tangency point between the 0085 //! result number Index and the first argument. 0086 //! ParSol is the intrinsic parameter of the point PntSol 0087 //! on the solution curv. 0088 //! ParArg is the intrinsic parameter of the point PntArg 0089 //! on the argument curv. 0090 //! It raises NotDone if the construction algorithm 0091 //! didn't succeed. 0092 //! It raises OutOfRange if Index is greater than the 0093 //! number of solutions or less than zero. 0094 Standard_EXPORT void Tangency1(const int Index, 0095 double& ParSol, 0096 double& ParArg, 0097 gp_Pnt2d& PntSol) const; 0098 0099 private: 0100 bool WellDone; 0101 int NbrSol; 0102 NCollection_Array1<gp_Circ2d> cirsol; 0103 NCollection_Array1<GccEnt_Position> qualifier1; 0104 NCollection_Array1<gp_Pnt2d> pnttg1sol; 0105 NCollection_Array1<double> par1sol; 0106 NCollection_Array1<double> pararg1; 0107 }; 0108 0109 #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 |
|