Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-08 09:16:09

0001 // Created on: 1991-04-24
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_Lin2dTanOblIter_HeaderFile
0018 #define _Geom2dGcc_Lin2dTanOblIter_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <gp_Lin2d.hxx>
0024 #include <GccEnt_Position.hxx>
0025 #include <gp_Pnt2d.hxx>
0026 class Geom2dGcc_QCurve;
0027 
0028 //! This class implements the algorithms used to
0029 //! create 2d line tangent to a curve QualifiedCurv and
0030 //! doing an angle Angle with a line TheLin.
0031 //! The angle must be in Radian.
0032 class Geom2dGcc_Lin2dTanOblIter
0033 {
0034 public:
0035   DEFINE_STANDARD_ALLOC
0036 
0037   //! This class implements the algorithm used to
0038   //! create 2d line tangent to a curve and doing an
0039   //! angle Angle with the line TheLin.
0040   //! Angle must be in Radian.
0041   //! Param2 is the initial guess on the curve QualifiedCurv.
0042   //! Tolang is the angular tolerance.
0043   Standard_EXPORT Geom2dGcc_Lin2dTanOblIter(const Geom2dGcc_QCurve& Qualified1,
0044                                             const gp_Lin2d&         TheLin,
0045                                             const Standard_Real     Param1,
0046                                             const Standard_Real     TolAng,
0047                                             const Standard_Real     Angle = 0);
0048 
0049   //! This method returns true when there is a solution
0050   //! and false in the other cases.
0051   Standard_EXPORT Standard_Boolean IsDone() const;
0052 
0053   Standard_EXPORT gp_Lin2d ThisSolution() const;
0054 
0055   Standard_EXPORT void WhichQualifier(GccEnt_Position& Qualif1) const;
0056 
0057   Standard_EXPORT void Tangency1(Standard_Real& ParSol,
0058                                  Standard_Real& ParArg,
0059                                  gp_Pnt2d&      PntSol) const;
0060 
0061   Standard_EXPORT void Intersection2(Standard_Real& ParSol,
0062                                      Standard_Real& ParArg,
0063                                      gp_Pnt2d&      PntSol) const;
0064 
0065   Standard_EXPORT Standard_Boolean IsParallel2() const;
0066 
0067 protected:
0068 private:
0069   Standard_Boolean WellDone;
0070   Standard_Boolean Paral2;
0071   gp_Lin2d         linsol;
0072   GccEnt_Position  qualifier1;
0073   gp_Pnt2d         pnttg1sol;
0074   gp_Pnt2d         pntint2sol;
0075   Standard_Real    par1sol;
0076   Standard_Real    par2sol;
0077   Standard_Real    pararg1;
0078   Standard_Real    pararg2;
0079 };
0080 
0081 #endif // _Geom2dGcc_Lin2dTanOblIter_HeaderFile