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 GccEnt_QualifiedCirc;
34 class Geom2dAdaptor_Curve;
35 class GccEnt_QualifiedLin;
40 //! This class implements the algorithms used to
41 //! create 2d circles TANgent to 2 entities and
42 //! having the center ON a curve.
43 //! The order of the tangency argument is always
44 //! QualifiedCirc, QualifiedLin, QualifiedCurv, Pnt2d.
45 //! the arguments are :
46 //! - The two tangency arguments (lines, circles or points).
47 //! - The center line (a curve).
48 //! - The parameter for each tangency argument which
51 class Geom2dGcc_Circ2d2TanOnGeo
58 //! This method implements the algorithms used to
59 //! create 2d circles TANgent to two 2d circles and
60 //! having the center ON a curve.
61 Standard_EXPORT Geom2dGcc_Circ2d2TanOnGeo(const GccEnt_QualifiedCirc& Qualified1, const GccEnt_QualifiedCirc& Qualified2, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Tolerance);
63 //! This method implements the algorithms used to
64 //! create 2d circles TANgent to a 2d circle and a 2d line
65 //! having the center ON a curve.
66 Standard_EXPORT Geom2dGcc_Circ2d2TanOnGeo(const GccEnt_QualifiedCirc& Qualified1, const GccEnt_QualifiedLin& Qualified2, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Tolerance);
68 //! This method implements the algorithms used to
69 //! create 2d circles TANgent to a 2d circle and a point
70 //! having the center ON a curve.
71 Standard_EXPORT Geom2dGcc_Circ2d2TanOnGeo(const GccEnt_QualifiedCirc& Qualified1, const gp_Pnt2d& Point2, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Tolerance);
73 //! This method implements the algorithms used to
74 //! create 2d circles TANgent to two 2d lines
75 //! having the center ON a curve.
76 Standard_EXPORT Geom2dGcc_Circ2d2TanOnGeo(const GccEnt_QualifiedLin& Qualified1, const GccEnt_QualifiedLin& Qualified2, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Tolerance);
78 //! This method implements the algorithms used to
79 //! create 2d circles TANgent to a 2d line and a point
80 //! having the center ON a 2d line.
81 Standard_EXPORT Geom2dGcc_Circ2d2TanOnGeo(const GccEnt_QualifiedLin& Qualified1, const gp_Pnt2d& Qualified2, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Tolerance);
83 //! This method implements the algorithms used to
84 //! create 2d circles TANgent to two points
85 //! having the center ON a 2d line.
86 Standard_EXPORT Geom2dGcc_Circ2d2TanOnGeo(const gp_Pnt2d& Point1, const gp_Pnt2d& Point2, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Tolerance);
88 //! This method returns True if the construction
89 //! algorithm succeeded.
90 Standard_EXPORT Standard_Boolean IsDone() const;
92 //! This method returns the number of solutions.
93 //! It raises NotDone if the construction algorithm
95 Standard_EXPORT Standard_Integer NbSolutions() const;
97 //! Returns the solution number Index and raises OutOfRange
98 //! exception if Index is greater than the number of solutions.
99 //! Be careful: the Index is only a way to get all the
100 //! solutions, but is not associated to those outside the
101 //! context of the algorithm-object.
102 //! It raises NotDone if the construction algorithm
104 //! It raises OutOfRange if Index is greater than the
105 //! number of solutions.
106 Standard_EXPORT gp_Circ2d ThisSolution (const Standard_Integer Index) const;
108 //! It returns the information about the qualifiers of
110 //! arguments concerning the solution number Index.
111 //! It returns the real qualifiers (the qualifiers given to the
112 //! constructor method in case of enclosed, enclosing and outside
113 //! and the qualifiers computedin case of unqualified).
114 Standard_EXPORT void WhichQualifier (const Standard_Integer Index, GccEnt_Position& Qualif1, GccEnt_Position& Qualif2) const;
116 //! Returns information about the tangency point between the
117 //! result number Index and the first argument.
118 //! ParSol is the intrinsic parameter of the point on the
120 //! ParArg is the intrinsic parameter of the point on the
122 //! PntSol is the tangency point on the solution curv.
123 //! PntArg is the tangency point on the argument curv.
124 //! It raises NotDone if the construction algorithm
126 //! It raises OutOfRange if Index is greater than the
127 //! number of solutions.
128 Standard_EXPORT void Tangency1 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
130 //! Returns information about the tangency point between the
131 //! result number Index and the second argument.
132 //! ParSol is the intrinsic parameter of the point on the
134 //! ParArg is the intrinsic parameter of the point on the
136 //! PntSol is the tangency point on the solution curv.
137 //! PntArg is the tangency point on the argument curv.
138 //! It raises NotDone if the construction algorithm
140 //! It raises OutOfRange if Index is greater than the
141 //! number of solutions.
142 Standard_EXPORT void Tangency2 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
144 //! Returns information about the center (on the curv)
146 //! ParArg is the intrinsic parameter of the point on
147 //! the argument curv.
148 //! PntSol is the center point of the solution curv.
149 //! It raises NotDone if the construction algorithm
151 //! It raises OutOfRange if Index is greater than the
152 //! number of solutions.
153 Standard_EXPORT void CenterOn3 (const Standard_Integer Index, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
155 //! Returns True if the solution number Index is equal to
156 //! the first argument and False in the other cases.
157 //! It raises NotDone if the construction algorithm
159 //! It raises OutOfRange if Index is greater than the
160 //! number of solutions.
161 Standard_EXPORT Standard_Boolean IsTheSame1 (const Standard_Integer Index) const;
163 //! Returns True if the solution number Index is equal to
164 //! the second argument and False in the other cases.
165 //! It raises NotDone if the construction algorithm
167 //! It raises OutOfRange if Index is greater than the
168 //! number of solutions.
169 Standard_EXPORT Standard_Boolean IsTheSame2 (const Standard_Integer Index) const;
184 Standard_Boolean WellDone;
185 Standard_Integer NbrSol;
186 TColgp_Array1OfCirc2d cirsol;
187 GccEnt_Array1OfPosition qualifier1;
188 GccEnt_Array1OfPosition qualifier2;
189 TColStd_Array1OfInteger TheSame1;
190 TColStd_Array1OfInteger TheSame2;
191 TColgp_Array1OfPnt2d pnttg1sol;
192 TColgp_Array1OfPnt2d pnttg2sol;
193 TColgp_Array1OfPnt2d pntcen;
194 TColStd_Array1OfReal par1sol;
195 TColStd_Array1OfReal par2sol;
196 TColStd_Array1OfReal pararg1;
197 TColStd_Array1OfReal pararg2;
198 TColStd_Array1OfReal parcen3;
209 #endif // _Geom2dGcc_Circ2d2TanOnGeo_HeaderFile