Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/Geom2dGcc_Circ2d2TanOnGeo.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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