Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1991-03-29
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_Circ2d2TanOnGeo_HeaderFile
0018 #define _Geom2dGcc_Circ2d2TanOnGeo_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <Standard_Integer.hxx>
0024 #include <TColgp_Array1OfCirc2d.hxx>
0025 #include <GccEnt_Array1OfPosition.hxx>
0026 #include <TColStd_Array1OfInteger.hxx>
0027 #include <TColgp_Array1OfPnt2d.hxx>
0028 #include <TColStd_Array1OfReal.hxx>
0029 #include <GccEnt_Position.hxx>
0030 class GccEnt_QualifiedCirc;
0031 class Geom2dAdaptor_Curve;
0032 class GccEnt_QualifiedLin;
0033 class gp_Pnt2d;
0034 class gp_Circ2d;
0035 
0036 
0037 //! This class implements the algorithms used to
0038 //! create 2d circles TANgent to 2 entities and
0039 //! having the center ON a curve.
0040 //! The order of the tangency argument is always
0041 //! QualifiedCirc, QualifiedLin, QualifiedCurv, Pnt2d.
0042 //! the arguments are :
0043 //! - The two tangency arguments (lines, circles or points).
0044 //! - The center line (a curve).
0045 //! - The parameter for each tangency argument which
0046 //! is a curve.
0047 //! - The tolerance.
0048 class Geom2dGcc_Circ2d2TanOnGeo 
0049 {
0050 public:
0051 
0052   DEFINE_STANDARD_ALLOC
0053 
0054   
0055   //! This method implements the algorithms used to
0056   //! create 2d circles TANgent to two 2d circles and
0057   //! having the center ON a curve.
0058   Standard_EXPORT Geom2dGcc_Circ2d2TanOnGeo(const GccEnt_QualifiedCirc& Qualified1, const GccEnt_QualifiedCirc& Qualified2, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Tolerance);
0059   
0060   //! This method implements the algorithms used to
0061   //! create 2d circles TANgent to a 2d circle and a 2d line
0062   //! having the center ON a curve.
0063   Standard_EXPORT Geom2dGcc_Circ2d2TanOnGeo(const GccEnt_QualifiedCirc& Qualified1, const GccEnt_QualifiedLin& Qualified2, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Tolerance);
0064   
0065   //! This method implements the algorithms used to
0066   //! create 2d circles TANgent to a 2d circle and a point
0067   //! having the center ON a curve.
0068   Standard_EXPORT Geom2dGcc_Circ2d2TanOnGeo(const GccEnt_QualifiedCirc& Qualified1, const gp_Pnt2d& Point2, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Tolerance);
0069   
0070   //! This method implements the algorithms used to
0071   //! create 2d circles TANgent to two 2d lines
0072   //! having the center ON a curve.
0073   Standard_EXPORT Geom2dGcc_Circ2d2TanOnGeo(const GccEnt_QualifiedLin& Qualified1, const GccEnt_QualifiedLin& Qualified2, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Tolerance);
0074   
0075   //! This method implements the algorithms used to
0076   //! create 2d circles TANgent to a 2d line and a point
0077   //! having the center ON a 2d line.
0078   Standard_EXPORT Geom2dGcc_Circ2d2TanOnGeo(const GccEnt_QualifiedLin& Qualified1, const gp_Pnt2d& Qualified2, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Tolerance);
0079   
0080   //! This method implements the algorithms used to
0081   //! create 2d circles TANgent to two points
0082   //! having the center ON a 2d line.
0083   Standard_EXPORT Geom2dGcc_Circ2d2TanOnGeo(const gp_Pnt2d& Point1, const gp_Pnt2d& Point2, const Geom2dAdaptor_Curve& OnCurv, const Standard_Real Tolerance);
0084   
0085   //! This method returns True if the construction
0086   //! algorithm succeeded.
0087   Standard_EXPORT Standard_Boolean IsDone() const;
0088   
0089   //! This method returns the number of solutions.
0090   //! It raises NotDone if the construction algorithm
0091   //! didn't succeed.
0092   Standard_EXPORT Standard_Integer NbSolutions() const;
0093   
0094   //! Returns the solution number Index and raises OutOfRange
0095   //! exception if Index is greater than the number of solutions.
0096   //! Be careful: the Index is only a way to get all the
0097   //! solutions, but is not associated to those outside the
0098   //! context of the algorithm-object.
0099   //! It raises NotDone if the construction algorithm
0100   //! didn't succeed.
0101   //! It raises OutOfRange if Index is greater than the
0102   //! number of solutions.
0103   Standard_EXPORT gp_Circ2d ThisSolution (const Standard_Integer Index) const;
0104   
0105   //! It returns the information about the qualifiers of
0106   //! the tangency
0107   //! arguments concerning the solution number Index.
0108   //! It returns the real qualifiers (the qualifiers given to the
0109   //! constructor method in case of enclosed, enclosing and outside
0110   //! and the qualifiers computedin case of unqualified).
0111   Standard_EXPORT void WhichQualifier (const Standard_Integer Index, GccEnt_Position& Qualif1, GccEnt_Position& Qualif2) const;
0112   
0113   //! Returns information about the tangency point between the
0114   //! result number Index and the first argument.
0115   //! ParSol is the intrinsic parameter of the point on the
0116   //! solution curv.
0117   //! ParArg is the intrinsic parameter of the point on the
0118   //! argument curv.
0119   //! PntSol is the tangency point on the solution curv.
0120   //! PntArg is the tangency point on the argument curv.
0121   //! It raises NotDone if the construction algorithm
0122   //! didn't succeed.
0123   //! It raises OutOfRange if Index is greater than the
0124   //! number of solutions.
0125   Standard_EXPORT void Tangency1 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
0126   
0127   //! Returns information about the tangency point between the
0128   //! result number Index and the second argument.
0129   //! ParSol is the intrinsic parameter of the point on the
0130   //! solution curv.
0131   //! ParArg is the intrinsic parameter of the point on the
0132   //! argument curv.
0133   //! PntSol is the tangency point on the solution curv.
0134   //! PntArg is the tangency point on the argument curv.
0135   //! It raises NotDone if the construction algorithm
0136   //! didn't succeed.
0137   //! It raises OutOfRange if Index is greater than the
0138   //! number of solutions.
0139   Standard_EXPORT void Tangency2 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
0140   
0141   //! Returns information about the center (on the curv)
0142   //! of the result.
0143   //! ParArg is the intrinsic parameter of the point on
0144   //! the argument curv.
0145   //! PntSol is the center point of the solution curv.
0146   //! It raises NotDone if the construction algorithm
0147   //! didn't succeed.
0148   //! It raises OutOfRange if Index is greater than the
0149   //! number of solutions.
0150   Standard_EXPORT void CenterOn3 (const Standard_Integer Index, Standard_Real& ParArg, gp_Pnt2d& PntSol) const;
0151   
0152   //! Returns True if the solution number Index is equal to
0153   //! the first argument and False in the other cases.
0154   //! It raises NotDone if the construction algorithm
0155   //! didn't succeed.
0156   //! It raises OutOfRange if Index is greater than the
0157   //! number of solutions.
0158   Standard_EXPORT Standard_Boolean IsTheSame1 (const Standard_Integer Index) const;
0159   
0160   //! Returns True if the solution number Index is equal to
0161   //! the second argument and False in the other cases.
0162   //! It raises NotDone if the construction algorithm
0163   //! didn't succeed.
0164   //! It raises OutOfRange if Index is greater than the
0165   //! number of solutions.
0166   Standard_EXPORT Standard_Boolean IsTheSame2 (const Standard_Integer Index) const;
0167 
0168 
0169 
0170 
0171 protected:
0172 
0173 
0174 
0175 
0176 
0177 private:
0178 
0179 
0180 
0181   Standard_Boolean WellDone;
0182   Standard_Integer NbrSol;
0183   TColgp_Array1OfCirc2d cirsol;
0184   GccEnt_Array1OfPosition qualifier1;
0185   GccEnt_Array1OfPosition qualifier2;
0186   TColStd_Array1OfInteger TheSame1;
0187   TColStd_Array1OfInteger TheSame2;
0188   TColgp_Array1OfPnt2d pnttg1sol;
0189   TColgp_Array1OfPnt2d pnttg2sol;
0190   TColgp_Array1OfPnt2d pntcen;
0191   TColStd_Array1OfReal par1sol;
0192   TColStd_Array1OfReal par2sol;
0193   TColStd_Array1OfReal pararg1;
0194   TColStd_Array1OfReal pararg2;
0195   TColStd_Array1OfReal parcen3;
0196 
0197 
0198 };
0199 
0200 
0201 
0202 
0203 
0204 
0205 
0206 #endif // _Geom2dGcc_Circ2d2TanOnGeo_HeaderFile