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
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _Geom2dGcc_Lin2d2TanIter_HeaderFile
18 #define _Geom2dGcc_Lin2d2TanIter_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
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_QCurve;
33 class GccEnt_QualifiedCirc;
37 //! This class implements the algorithms used to
38 //! create 2d lines tangent to 2 other elements which
39 //! can be circles, curves or points.
40 //! More than one argument must be a curve.
42 //! Note: Some constructors may check the type of the qualified argument
43 //! and raise BadQualifier Error in case of incorrect couple (qualifier,
45 //! For example: "EnclosedCirc".
46 class Geom2dGcc_Lin2d2TanIter
53 //! This class implements the algorithms used to create 2d
54 //! lines passing thrue a point and tangent to a curve.
55 //! Tolang is used to determine the tolerance for the
57 //! Param2 is used for the initial guess on the curve.
58 Standard_EXPORT Geom2dGcc_Lin2d2TanIter(const Geom2dGcc_QCurve& Qualified1, const gp_Pnt2d& ThePoint, const Standard_Real Param1, const Standard_Real Tolang);
60 //! This class implements the algorithms used to create 2d
61 //! line tangent to a circle and to a cuve.
62 //! Tolang is used to determine the tolerance for the
64 //! Param2 is used for the initial guess on the curve.
65 //! Exception BadQualifier is raised in the case of
67 Standard_EXPORT Geom2dGcc_Lin2d2TanIter(const GccEnt_QualifiedCirc& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Standard_Real Param2, const Standard_Real Tolang);
69 //! This class implements the algorithms used to create 2d
70 //! line tangent to two curves.
71 //! Tolang is used to determine the tolerance for the
73 //! Param1 is used for the initial guess on the first curve.
74 //! Param2 is used for the initial guess on the second curve.
75 Standard_EXPORT Geom2dGcc_Lin2d2TanIter(const Geom2dGcc_QCurve& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Tolang);
77 //! This methode returns true when there is a solution
78 //! and false in the other cases.
79 Standard_EXPORT Standard_Boolean IsDone() const;
81 //! Returns the solution.
82 Standard_EXPORT gp_Lin2d ThisSolution() const;
84 Standard_EXPORT void WhichQualifier (GccEnt_Position& Qualif1, GccEnt_Position& Qualif2) const;
86 //! Returns informations about the tangency point between the
87 //! result and the first argument.
88 //! ParSol is the intrinsic parameter of the point PntSol on
89 //! the solution curv.
90 //! ParArg is the intrinsic parameter of the point PntSol on
91 //! the argument curv.
92 Standard_EXPORT void Tangency1 (Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
94 Standard_EXPORT void Tangency2 (Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
109 Standard_Boolean WellDone;
111 GccEnt_Position qualifier1;
112 GccEnt_Position qualifier2;
115 Standard_Real par1sol;
116 Standard_Real par2sol;
117 Standard_Real pararg1;
118 Standard_Real pararg2;
129 #endif // _Geom2dGcc_Lin2d2TanIter_HeaderFile