Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:34

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_Lin2d2TanIter_HeaderFile
0018 #define _Geom2dGcc_Lin2d2TanIter_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 class GccEnt_QualifiedCirc;
0028 
0029 
0030 //! This class implements the algorithms used to
0031 //! create 2d lines tangent to 2 other elements which
0032 //! can be circles, curves or points.
0033 //! More than one argument must be a curve.
0034 //!
0035 //! Note: Some constructors may check the type of the qualified argument
0036 //! and raise BadQualifier Error in case of incorrect couple (qualifier,
0037 //! curv).
0038 //! For example: "EnclosedCirc".
0039 class Geom2dGcc_Lin2d2TanIter 
0040 {
0041 public:
0042 
0043   DEFINE_STANDARD_ALLOC
0044 
0045   
0046   //! This class implements the algorithms used to create 2d
0047   //! lines passing through a point and tangent to a curve.
0048   //! Tolang is used to determine the tolerance for the
0049   //! tangency points.
0050   //! Param2 is used for the initial guess on the curve.
0051   Standard_EXPORT Geom2dGcc_Lin2d2TanIter(const Geom2dGcc_QCurve& Qualified1, const gp_Pnt2d& ThePoint, const Standard_Real Param1, const Standard_Real Tolang);
0052   
0053   //! This class implements the algorithms used to create 2d
0054   //! line tangent to a circle and to a curve.
0055   //! Tolang is used to determine the tolerance for the
0056   //! tangency points.
0057   //! Param2 is used for the initial guess on the curve.
0058   //! Exception BadQualifier is raised in the case of
0059   //! EnclosedCirc
0060   Standard_EXPORT Geom2dGcc_Lin2d2TanIter(const GccEnt_QualifiedCirc& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Standard_Real Param2, const Standard_Real Tolang);
0061   
0062   //! This class implements the algorithms used to create 2d
0063   //! line tangent to two curves.
0064   //! Tolang is used to determine the tolerance for the
0065   //! tangency points.
0066   //! Param1 is used for the initial guess on the first curve.
0067   //! Param2 is used for the initial guess on the second curve.
0068   Standard_EXPORT Geom2dGcc_Lin2d2TanIter(const Geom2dGcc_QCurve& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Tolang);
0069   
0070   //! This methode returns true when there is a solution
0071   //! and false in the other cases.
0072   Standard_EXPORT Standard_Boolean IsDone() const;
0073   
0074   //! Returns the solution.
0075   Standard_EXPORT gp_Lin2d ThisSolution() const;
0076   
0077   Standard_EXPORT void WhichQualifier (GccEnt_Position& Qualif1, GccEnt_Position& Qualif2) const;
0078   
0079   //! Returns information about the tangency point between the
0080   //! result and the first argument.
0081   //! ParSol is the intrinsic parameter of the point PntSol on
0082   //! the solution curv.
0083   //! ParArg is the intrinsic parameter of the point PntSol on
0084   //! the argument curv.
0085   Standard_EXPORT void Tangency1 (Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
0086   
0087   Standard_EXPORT void Tangency2 (Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
0088 
0089 
0090 
0091 
0092 protected:
0093 
0094 
0095 
0096 
0097 
0098 private:
0099 
0100 
0101 
0102   Standard_Boolean WellDone;
0103   gp_Lin2d linsol;
0104   GccEnt_Position qualifier1;
0105   GccEnt_Position qualifier2;
0106   gp_Pnt2d pnttg1sol;
0107   gp_Pnt2d pnttg2sol;
0108   Standard_Real par1sol;
0109   Standard_Real par2sol;
0110   Standard_Real pararg1;
0111   Standard_Real pararg2;
0112 
0113 
0114 };
0115 
0116 
0117 
0118 
0119 
0120 
0121 
0122 #endif // _Geom2dGcc_Lin2d2TanIter_HeaderFile