1 // Created on: 1991-04-24 2 // Created by: Remi GILET 3 // Copyright (c) 1991-1999 Matra Datavision 4 // Copyright (c) 1999-2014 OPEN CASCADE SAS 5 // 6 // This file is part of Open CASCADE Technology software library. 7 // 8 // This library is free software; you can redistribute it and/or modify it under 9 // the terms of the GNU Lesser General Public License version 2.1 as published 10 // by the Free Software Foundation, with special exception defined in the file 11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 12 // distribution for complete text of the license and disclaimer of any warranty. 13 // 14 // Alternatively, this file may be used under the terms of Open CASCADE 15 // commercial license or contractual agreement. 16 17 #ifndef _Geom2dGcc_Lin2dTanOblIter_HeaderFile 18 #define _Geom2dGcc_Lin2dTanOblIter_HeaderFile 19 20 #include <Standard.hxx> 21 #include <Standard_DefineAlloc.hxx> 22 #include <Standard_Handle.hxx> 23 24 #include <Standard_Boolean.hxx> 25 #include <gp_Lin2d.hxx> 26 #include <GccEnt_Position.hxx> 27 #include <gp_Pnt2d.hxx> 28 #include <Standard_Real.hxx> 29 class GccEnt_BadQualifier; 30 class StdFail_NotDone; 31 class Geom2dGcc_IsParallel; 32 class Geom2dGcc_QCurve; 33 class gp_Lin2d; 34 class gp_Pnt2d; 35 36 37 //! This class implements the algorithms used to 38 //! create 2d line tangent to a curve QualifiedCurv and 39 //! doing an angle Angle with a line TheLin. 40 //! The angle must be in Radian. 41 class Geom2dGcc_Lin2dTanOblIter 42 { 43 public: 44 45 DEFINE_STANDARD_ALLOC 46 47 48 //! This class implements the algorithm used to 49 //! create 2d line tangent to a curve and doing an 50 //! angle Angle with the line TheLin. 51 //! Angle must be in Radian. 52 //! Param2 is the initial guess on the curve QualifiedCurv. 53 //! Tolang is the angular tolerance. 54 Standard_EXPORT Geom2dGcc_Lin2dTanOblIter(const Geom2dGcc_QCurve& Qualified1, const gp_Lin2d& TheLin, const Standard_Real Param1, const Standard_Real TolAng, const Standard_Real Angle = 0); 55 56 //! This method returns true when there is a solution 57 //! and false in the other cases. 58 Standard_EXPORT Standard_Boolean IsDone() const; 59 60 Standard_EXPORT gp_Lin2d ThisSolution() const; 61 62 Standard_EXPORT void WhichQualifier (GccEnt_Position& Qualif1) const; 63 64 Standard_EXPORT void Tangency1 (Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const; 65 66 Standard_EXPORT void Intersection2 (Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const; 67 68 Standard_EXPORT Standard_Boolean IsParallel2() const; 69 70 71 72 73 protected: 74 75 76 77 78 79 private: 80 81 82 83 Standard_Boolean WellDone; 84 Standard_Boolean Paral2; 85 gp_Lin2d linsol; 86 GccEnt_Position qualifier1; 87 gp_Pnt2d pnttg1sol; 88 gp_Pnt2d pntint2sol; 89 Standard_Real par1sol; 90 Standard_Real par2sol; 91 Standard_Real pararg1; 92 Standard_Real pararg2; 93 94 95 }; 96 97 98 99 100 101 102 103 #endif // _Geom2dGcc_Lin2dTanOblIter_HeaderFile 104