1 // Created on: 1991-03-29
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_Circ2d3TanIter_HeaderFile
18 #define _Geom2dGcc_Circ2d3TanIter_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <gp_Circ2d.hxx>
26 #include <GccEnt_Position.hxx>
27 #include <gp_Pnt2d.hxx>
28 #include <Standard_Real.hxx>
29 class StdFail_NotDone;
30 class GccEnt_QualifiedCirc;
31 class Geom2dGcc_QCurve;
32 class GccEnt_QualifiedLin;
37 //! This class implements the algorithms used to
38 //! create 2d circles tangent to 3 points/lines/circles/
39 //! curves with one curve or more.
40 //! The arguments of all construction methods are :
41 //! - The three qualifiied elements for the
42 //! tangency constrains (QualifiedCirc, QualifiedLine,
43 //! Qualifiedcurv, Points).
44 //! - A parameter for each QualifiedCurv.
45 class Geom2dGcc_Circ2d3TanIter
52 //! This method implements the algorithms used to
53 //! create 2d circles tangent to 2 circles and a curve.
54 Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedCirc& Qualified1, const GccEnt_QualifiedCirc& Qualified2, const Geom2dGcc_QCurve& Qualified3, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance);
56 //! This method implements the algorithms used to
57 //! create 2d circles tangent to a circle and 2 curves.
58 Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedCirc& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Geom2dGcc_QCurve& Qualified3, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance);
60 //! This method implements the algorithms used to
61 //! create 2d circles tangent to a circle and a line and
63 Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedCirc& Qualified1, const GccEnt_QualifiedLin& Qualified2, const Geom2dGcc_QCurve& Qualified3, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance);
65 //! This method implements the algorithms used to
66 //! create 2d circles tangent to a circle and a point and
68 Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedCirc& Qualified1, const Geom2dGcc_QCurve& Qualified2, const gp_Pnt2d& Point3, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Tolerance);
70 //! This method implements the algorithms used to
71 //! create 2d circles tangent to 2 lines and a curve.
72 Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedLin& Qualified1, const GccEnt_QualifiedLin& Qualified2, const Geom2dGcc_QCurve& Qualified3, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance);
74 //! This method implements the algorithms used to
75 //! create 2d circles tangent to a line and 2 curves.
76 Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedLin& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Geom2dGcc_QCurve& Qualified3, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance);
78 //! This method implements the algorithms used to
79 //! create 2d circles tangent to a line and a curve
81 Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedLin& Qualified1, const Geom2dGcc_QCurve& Qualified2, const gp_Pnt2d& Point3, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Tolerance);
83 //! This method implements the algorithms used to
84 //! create 2d circles tangent to a curve and 2 points.
85 Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const Geom2dGcc_QCurve& Qualified1, const gp_Pnt2d& Point1, const gp_Pnt2d& Point2, const Standard_Real Param1, const Standard_Real Tolerance);
87 //! This method implements the algorithms used to
88 //! create 2d circles tangent to 2 curves and a point.
89 Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const Geom2dGcc_QCurve& Qualified1, const Geom2dGcc_QCurve& Qualified2, const gp_Pnt2d& Point2, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Tolerance);
91 //! This method implements the algorithms used to
92 //! create 2d circles tangent to 3 curves.
93 Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const Geom2dGcc_QCurve& Qualified1, const Geom2dGcc_QCurve& Qualified2, const Geom2dGcc_QCurve& Qualified3, const Standard_Real Param1, const Standard_Real Param2, const Standard_Real Param3, const Standard_Real Tolerance);
95 //! This method returns True if the construction
96 //! algorithm succeeded.
97 Standard_EXPORT Standard_Boolean IsDone() const;
99 //! Returns the solution.
100 //! It raises NotDone if the construction algorithm
102 Standard_EXPORT gp_Circ2d ThisSolution() const;
104 Standard_EXPORT void WhichQualifier (GccEnt_Position& Qualif1, GccEnt_Position& Qualif2, GccEnt_Position& Qualif3) const;
106 //! Returns informations about the tangency point between
107 //! the result and the first argument.
108 //! ParSol is the intrinsic parameter of the point PntSol
109 //! on the solution curv.
110 //! ParArg is the intrinsic parameter of the point PntSol
111 //! on the argument curv.
112 //! It raises NotDone if the construction algorithm
114 Standard_EXPORT void Tangency1 (Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
116 //! Returns informations about the tangency point between
117 //! the result and the second argument.
118 //! ParSol is the intrinsic parameter of the point PntSol
119 //! on the solution curv.
120 //! ParArg is the intrinsic parameter of the point PntSol
121 //! on the argument curv.
122 //! It raises NotDone if the construction algorithm
124 Standard_EXPORT void Tangency2 (Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
126 //! Returns informations about the tangency point between
127 //! the result and the third argument.
128 //! ParSol is the intrinsic parameter of the point PntSol
129 //! on the solution curv.
130 //! ParArg is the intrinsic parameter of the point PntSol
131 //! on the argument curv.
132 //! It raises NotDone if the construction algorithm
134 Standard_EXPORT void Tangency3 (Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
136 //! It raises NotDone if the construction algorithm
138 Standard_EXPORT Standard_Boolean IsTheSame1() const;
140 //! It raises NotDone if the construction algorithm
142 Standard_EXPORT Standard_Boolean IsTheSame2() const;
144 //! It raises NotDone if the construction algorithm
146 Standard_EXPORT Standard_Boolean IsTheSame3() const;
161 Standard_Boolean WellDone;
163 GccEnt_Position qualifier1;
164 GccEnt_Position qualifier2;
165 GccEnt_Position qualifier3;
166 Standard_Boolean TheSame1;
167 Standard_Boolean TheSame2;
168 Standard_Boolean TheSame3;
172 Standard_Real par1sol;
173 Standard_Real par2sol;
174 Standard_Real par3sol;
175 Standard_Real pararg1;
176 Standard_Real pararg2;
177 Standard_Real pararg3;
188 #endif // _Geom2dGcc_Circ2d3TanIter_HeaderFile