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_Circ2d2TanOnGeo_HeaderFile
18 #define _Geom2dGcc_Circ2d2TanOnGeo_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <Standard_Integer.hxx>
26 #include <TColgp_Array1OfCirc2d.hxx>
27 #include <GccEnt_Array1OfPosition.hxx>
28 #include <TColStd_Array1OfInteger.hxx>
29 #include <TColgp_Array1OfPnt2d.hxx>
30 #include <TColStd_Array1OfReal.hxx>
31 #include <Standard_Real.hxx>
32 #include <GccEnt_Position.hxx>
33 class StdFail_NotDone;
34 class GccEnt_BadQualifier;
35 class Standard_OutOfRange;
36 class GccEnt_QualifiedCirc;
37 class Geom2dAdaptor_Curve;
38 class GccEnt_QualifiedLin;
43 //! This class implements the algorithms used to
44 //! create 2d circles TANgent to 2 entities and
45 //! having the center ON a curve.
46 //! The order of the tangency argument is always
47 //! QualifiedCirc, QualifiedLin, QualifiedCurv, Pnt2d.
48 //! the arguments are :
49 //! - The two tangency arguments (lines, circles or points).
50 //! - The center line (a curve).
51 //! - The parameter for each tangency argument which
54 class Geom2dGcc_Circ2d2TanOnGeo
61 //! This method implements the algorithms used to
62 //! create 2d circles TANgent to two 2d circles and
63 //! having the center ON a curve.
64 Standard_EXPORT Geom2dGcc_Circ2d2TanOnGeo(const GccEnt_QualifiedCirc& Qualified1, const GccEnt_QualifiedCirc& Qualified2, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Tolerance);
66 //! This method implements the algorithms used to
67 //! create 2d circles TANgent to a 2d circle and a 2d line
68 //! having the center ON a curve.
69 Standard_EXPORT Geom2dGcc_Circ2d2TanOnGeo(const GccEnt_QualifiedCirc& Qualified1, const GccEnt_QualifiedLin& Qualified2, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Tolerance);
71 //! This method implements the algorithms used to
72 //! create 2d circles TANgent to a 2d circle and a point
73 //! having the center ON a curve.
74 Standard_EXPORT Geom2dGcc_Circ2d2TanOnGeo(const GccEnt_QualifiedCirc& Qualified1, const gp_Pnt2d& Point2, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Tolerance);
76 //! This method implements the algorithms used to
77 //! create 2d circles TANgent to two 2d lines
78 //! having the center ON a curve.
79 Standard_EXPORT Geom2dGcc_Circ2d2TanOnGeo(const GccEnt_QualifiedLin& Qualified1, const GccEnt_QualifiedLin& Qualified2, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Tolerance);
81 //! This method implements the algorithms used to
82 //! create 2d circles TANgent to a 2d line and a point
83 //! having the center ON a 2d line.
84 Standard_EXPORT Geom2dGcc_Circ2d2TanOnGeo(const GccEnt_QualifiedLin& Qualified1, const gp_Pnt2d& Qualified2, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Tolerance);
86 //! This method implements the algorithms used to
87 //! create 2d circles TANgent to two points
88 //! having the center ON a 2d line.
89 Standard_EXPORT Geom2dGcc_Circ2d2TanOnGeo(const gp_Pnt2d& Point1, const gp_Pnt2d& Point2, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Tolerance);
91 //! This method returns True if the construction
92 //! algorithm succeeded.
93 Standard_EXPORT Standard_Boolean IsDone() const;
95 //! This method returns the number of solutions.
96 //! It raises NotDone if the construction algorithm
98 Standard_EXPORT Standard_Integer NbSolutions() const;
100 //! Returns the solution number Index and raises OutOfRange
101 //! exception if Index is greater than the number of solutions.
102 //! Be careful: the Index is only a way to get all the
103 //! solutions, but is not associated to those outside the
104 //! context of the algorithm-object.
105 //! It raises NotDone if the construction algorithm
107 //! It raises OutOfRange if Index is greater than the
108 //! number of solutions.
109 Standard_EXPORT gp_Circ2d ThisSolution (const Standard_Integer Index) const;
111 //! It returns the informations about the qualifiers of
113 //! arguments concerning the solution number Index.
114 //! It returns the real qualifiers (the qualifiers given to the
115 //! constructor method in case of enclosed, enclosing and outside
116 //! and the qualifiers computedin case of unqualified).
117 Standard_EXPORT void WhichQualifier (const Standard_Integer Index, GccEnt_Position& Qualif1, GccEnt_Position& Qualif2) const;
119 //! Returns informations about the tangency point between the
120 //! result number Index and the first argument.
121 //! ParSol is the intrinsic parameter of the point on the
123 //! ParArg is the intrinsic parameter of the point on the
125 //! PntSol is the tangency point on the solution curv.
126 //! PntArg is the tangency point on the argument curv.
127 //! It raises NotDone if the construction algorithm
129 //! It raises OutOfRange if Index is greater than the
130 //! number of solutions.
131 Standard_EXPORT void Tangency1 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
133 //! Returns informations about the tangency point between the
134 //! result number Index and the second argument.
135 //! ParSol is the intrinsic parameter of the point on the
137 //! ParArg is the intrinsic parameter of the point on the
139 //! PntSol is the tangency point on the solution curv.
140 //! PntArg is the tangency point on the argument curv.
141 //! It raises NotDone if the construction algorithm
143 //! It raises OutOfRange if Index is greater than the
144 //! number of solutions.
145 Standard_EXPORT void Tangency2 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
147 //! Returns informations about the center (on the curv)
149 //! ParArg is the intrinsic parameter of the point on
150 //! the argument curv.
151 //! PntSol is the center point of the solution curv.
152 //! It raises NotDone if the construction algorithm
154 //! It raises OutOfRange if Index is greater than the
155 //! number of solutions.
156 Standard_EXPORT void CenterOn3 (const Standard_Integer Index, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
158 //! Returns True if the solution number Index is equal to
159 //! the first argument and False in the other cases.
160 //! It raises NotDone if the construction algorithm
162 //! It raises OutOfRange if Index is greater than the
163 //! number of solutions.
164 Standard_EXPORT Standard_Boolean IsTheSame1 (const Standard_Integer Index) const;
166 //! Returns True if the solution number Index is equal to
167 //! the second argument and False in the other cases.
168 //! It raises NotDone if the construction algorithm
170 //! It raises OutOfRange if Index is greater than the
171 //! number of solutions.
172 Standard_EXPORT Standard_Boolean IsTheSame2 (const Standard_Integer Index) const;
187 Standard_Boolean WellDone;
188 Standard_Integer NbrSol;
189 TColgp_Array1OfCirc2d cirsol;
190 GccEnt_Array1OfPosition qualifier1;
191 GccEnt_Array1OfPosition qualifier2;
192 TColStd_Array1OfInteger TheSame1;
193 TColStd_Array1OfInteger TheSame2;
194 TColgp_Array1OfPnt2d pnttg1sol;
195 TColgp_Array1OfPnt2d pnttg2sol;
196 TColgp_Array1OfPnt2d pntcen;
197 TColStd_Array1OfReal par1sol;
198 TColStd_Array1OfReal par2sol;
199 TColStd_Array1OfReal pararg1;
200 TColStd_Array1OfReal pararg2;
201 TColStd_Array1OfReal parcen3;
212 #endif // _Geom2dGcc_Circ2d2TanOnGeo_HeaderFile