|
|
|||
File indexing completed on 2026-09-13 09:16:16
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 _GccAna_Lin2dTanPar_HeaderFile 0018 #define _GccAna_Lin2dTanPar_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 0023 #include <Standard_Integer.hxx> 0024 #include <gp_Lin2d.hxx> 0025 #include <NCollection_Array1.hxx> 0026 #include <GccEnt_Position.hxx> 0027 #include <gp_Pnt2d.hxx> 0028 class gp_Pnt2d; 0029 class gp_Lin2d; 0030 class GccEnt_QualifiedCirc; 0031 0032 //! This class implements the algorithms used to create 2d 0033 //! line tangent to a circle or a point and parallel to 0034 //! another line. 0035 //! The solution has the same orientation as the 0036 //! second argument. 0037 //! Describes functions for building a 2D line parallel to a line and: 0038 //! - tangential to a circle, or 0039 //! - passing through a point. 0040 //! A Lin2dTanPar object provides a framework for: 0041 //! - defining the construction of 2D line(s), 0042 //! - implementing the construction algorithm, and consulting the result(s). 0043 class GccAna_Lin2dTanPar 0044 { 0045 public: 0046 DEFINE_STANDARD_ALLOC 0047 0048 //! This method implements the algorithms used to create a 2d 0049 //! line passing through a point and parallel to 0050 //! another line. 0051 Standard_EXPORT GccAna_Lin2dTanPar(const gp_Pnt2d& ThePoint, const gp_Lin2d& Lin1); 0052 0053 //! This method implements the algorithms used to create a 2d 0054 //! line tangent to a circle and parallel to another line. 0055 //! It raises BadQualifier in case of EnclosedCirc. 0056 //! Exceptions 0057 //! GccEnt_BadQualifier if a qualifier is inconsistent with 0058 //! the argument it qualifies (for example, enclosed for a circle). 0059 Standard_EXPORT GccAna_Lin2dTanPar(const GccEnt_QualifiedCirc& Qualified1, const gp_Lin2d& Lin1); 0060 0061 //! Returns True if the algorithm succeeded. 0062 Standard_EXPORT bool IsDone() const; 0063 0064 //! Returns the number of solutions. 0065 //! Raises NotDone if the construction algorithm didn't succeed. 0066 Standard_EXPORT int NbSolutions() const; 0067 0068 //! Returns the solution number Index and raises OutOfRange 0069 //! exception if Index is greater than the number of solutions. 0070 //! Be careful: the Index is only a way to get all the 0071 //! solutions, but is not associated to those outside the 0072 //! context of the algorithm-object. 0073 //! raises NotDone if the construction algorithm 0074 //! didn't succeed. 0075 //! It raises OutOfRange if Index is greater than the 0076 //! number of solutions. 0077 Standard_EXPORT gp_Lin2d ThisSolution(const int Index) const; 0078 0079 //! Returns the information about the qualifiers of the 0080 //! tangency arguments concerning the solution number Index. 0081 //! It returns the real qualifiers (the qualifiers given to the 0082 //! constructor method in case of enclosed, enclosing and outside 0083 //! and the qualifiers computed in case of unqualified). 0084 //! Raises NotDone if the construction algorithm 0085 //! didn't succeed. 0086 //! It raises OutOfRange if Index is greater than the 0087 //! number of solutions. 0088 Standard_EXPORT void WhichQualifier(const int Index, GccEnt_Position& Qualif1) const; 0089 0090 //! Returns information about the tangency point between the 0091 //! result number Index and the first argument. 0092 //! ParSol is the intrinsic parameter of the point on the 0093 //! solution curv. 0094 //! ParArg is the intrinsic parameter of the point on the 0095 //! argument curv. 0096 //! ParArg is equal 0 when the solution is passing through 0097 //! a point. Raises NotDone if the construction algorithm 0098 //! didn't succeed. 0099 //! It raises OutOfRange if Index is greater than the 0100 //! number of solutions. 0101 Standard_EXPORT void Tangency1(const int Index, 0102 double& ParSol, 0103 double& ParArg, 0104 gp_Pnt2d& Pnt) const; 0105 0106 private: 0107 bool WellDone; 0108 int NbrSol; 0109 NCollection_Array1<gp_Lin2d> linsol; 0110 NCollection_Array1<GccEnt_Position> qualifier1; 0111 NCollection_Array1<gp_Pnt2d> pnttg1sol; 0112 NCollection_Array1<double> par1sol; 0113 NCollection_Array1<double> pararg1; 0114 }; 0115 0116 #endif // _GccAna_Lin2dTanPar_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|