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 Geom2dGcc_QCurve; 30 31 32 //! This class implements the algorithms used to 33 //! create 2d line tangent to a curve QualifiedCurv and 34 //! doing an angle Angle with a line TheLin. 35 //! The angle must be in Radian. 36 class Geom2dGcc_Lin2dTanOblIter 37 { 38 public: 39 40 DEFINE_STANDARD_ALLOC 41 42 43 //! This class implements the algorithm used to 44 //! create 2d line tangent to a curve and doing an 45 //! angle Angle with the line TheLin. 46 //! Angle must be in Radian. 47 //! Param2 is the initial guess on the curve QualifiedCurv. 48 //! Tolang is the angular tolerance. 49 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); 50 51 //! This method returns true when there is a solution 52 //! and false in the other cases. 53 Standard_EXPORT Standard_Boolean IsDone() const; 54 55 Standard_EXPORT gp_Lin2d ThisSolution() const; 56 57 Standard_EXPORT void WhichQualifier (GccEnt_Position& Qualif1) const; 58 59 Standard_EXPORT void Tangency1 (Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const; 60 61 Standard_EXPORT void Intersection2 (Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const; 62 63 Standard_EXPORT Standard_Boolean IsParallel2() const; 64 65 66 67 68 protected: 69 70 71 72 73 74 private: 75 76 77 78 Standard_Boolean WellDone; 79 Standard_Boolean Paral2; 80 gp_Lin2d linsol; 81 GccEnt_Position qualifier1; 82 gp_Pnt2d pnttg1sol; 83 gp_Pnt2d pntint2sol; 84 Standard_Real par1sol; 85 Standard_Real par2sol; 86 Standard_Real pararg1; 87 Standard_Real pararg2; 88 89 90 }; 91 92 93 94 95 96 97 98 #endif // _Geom2dGcc_Lin2dTanOblIter_HeaderFile 99