Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-18 09:20:16

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_Circ2d3TanIter_HeaderFile
0018 #define _Geom2dGcc_Circ2d3TanIter_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <gp_Circ2d.hxx>
0024 #include <GccEnt_Position.hxx>
0025 #include <gp_Pnt2d.hxx>
0026 class GccEnt_QualifiedCirc;
0027 class Geom2dGcc_QCurve;
0028 class GccEnt_QualifiedLin;
0029 
0030 //! This class implements the algorithms used to
0031 //! create 2d circles tangent to 3 points/lines/circles/
0032 //! curves with one curve or more.
0033 //! The arguments of all construction methods are :
0034 //! - The three qualifiied elements for the
0035 //! tangency constrains (QualifiedCirc, QualifiedLine,
0036 //! Qualifiedcurv, Points).
0037 //! - A parameter for each QualifiedCurv.
0038 class Geom2dGcc_Circ2d3TanIter
0039 {
0040 public:
0041   DEFINE_STANDARD_ALLOC
0042 
0043   //! This method implements the algorithms used to
0044   //! create 2d circles tangent to 2 circles and a curve.
0045   Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedCirc& Qualified1,
0046                                            const GccEnt_QualifiedCirc& Qualified2,
0047                                            const Geom2dGcc_QCurve&     Qualified3,
0048                                            const double                Param1,
0049                                            const double                Param2,
0050                                            const double                Param3,
0051                                            const double                Tolerance);
0052 
0053   //! This method implements the algorithms used to
0054   //! create 2d circles tangent to a circle and 2 curves.
0055   Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedCirc& Qualified1,
0056                                            const Geom2dGcc_QCurve&     Qualified2,
0057                                            const Geom2dGcc_QCurve&     Qualified3,
0058                                            const double                Param1,
0059                                            const double                Param2,
0060                                            const double                Param3,
0061                                            const double                Tolerance);
0062 
0063   //! This method implements the algorithms used to
0064   //! create 2d circles tangent to a circle and a line and
0065   //! a curve.
0066   Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedCirc& Qualified1,
0067                                            const GccEnt_QualifiedLin&  Qualified2,
0068                                            const Geom2dGcc_QCurve&     Qualified3,
0069                                            const double                Param1,
0070                                            const double                Param2,
0071                                            const double                Param3,
0072                                            const double                Tolerance);
0073 
0074   //! This method implements the algorithms used to
0075   //! create 2d circles tangent to a circle and a point and
0076   //! a curve.
0077   Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedCirc& Qualified1,
0078                                            const Geom2dGcc_QCurve&     Qualified2,
0079                                            const gp_Pnt2d&             Point3,
0080                                            const double                Param1,
0081                                            const double                Param2,
0082                                            const double                Tolerance);
0083 
0084   //! This method implements the algorithms used to
0085   //! create 2d circles tangent to 2 lines and a curve.
0086   Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedLin& Qualified1,
0087                                            const GccEnt_QualifiedLin& Qualified2,
0088                                            const Geom2dGcc_QCurve&    Qualified3,
0089                                            const double               Param1,
0090                                            const double               Param2,
0091                                            const double               Param3,
0092                                            const double               Tolerance);
0093 
0094   //! This method implements the algorithms used to
0095   //! create 2d circles tangent to a line and 2 curves.
0096   Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedLin& Qualified1,
0097                                            const Geom2dGcc_QCurve&    Qualified2,
0098                                            const Geom2dGcc_QCurve&    Qualified3,
0099                                            const double               Param1,
0100                                            const double               Param2,
0101                                            const double               Param3,
0102                                            const double               Tolerance);
0103 
0104   //! This method implements the algorithms used to
0105   //! create 2d circles tangent to a line and a curve
0106   //! and a point.
0107   Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const GccEnt_QualifiedLin& Qualified1,
0108                                            const Geom2dGcc_QCurve&    Qualified2,
0109                                            const gp_Pnt2d&            Point3,
0110                                            const double               Param1,
0111                                            const double               Param2,
0112                                            const double               Tolerance);
0113 
0114   //! This method implements the algorithms used to
0115   //! create 2d circles tangent to a curve and 2 points.
0116   Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const Geom2dGcc_QCurve& Qualified1,
0117                                            const gp_Pnt2d&         Point1,
0118                                            const gp_Pnt2d&         Point2,
0119                                            const double            Param1,
0120                                            const double            Tolerance);
0121 
0122   //! This method implements the algorithms used to
0123   //! create 2d circles tangent to 2 curves and a point.
0124   Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const Geom2dGcc_QCurve& Qualified1,
0125                                            const Geom2dGcc_QCurve& Qualified2,
0126                                            const gp_Pnt2d&         Point2,
0127                                            const double            Param1,
0128                                            const double            Param2,
0129                                            const double            Tolerance);
0130 
0131   //! This method implements the algorithms used to
0132   //! create 2d circles tangent to 3 curves.
0133   Standard_EXPORT Geom2dGcc_Circ2d3TanIter(const Geom2dGcc_QCurve& Qualified1,
0134                                            const Geom2dGcc_QCurve& Qualified2,
0135                                            const Geom2dGcc_QCurve& Qualified3,
0136                                            const double            Param1,
0137                                            const double            Param2,
0138                                            const double            Param3,
0139                                            const double            Tolerance);
0140 
0141   //! This method returns True if the construction
0142   //! algorithm succeeded.
0143   Standard_EXPORT bool IsDone() const;
0144 
0145   //! Returns the solution.
0146   //! It raises NotDone if the construction algorithm
0147   //! didn't succeed.
0148   Standard_EXPORT gp_Circ2d ThisSolution() const;
0149 
0150   Standard_EXPORT void WhichQualifier(GccEnt_Position& Qualif1,
0151                                       GccEnt_Position& Qualif2,
0152                                       GccEnt_Position& Qualif3) const;
0153 
0154   //! Returns information about the tangency point between
0155   //! the result and the first argument.
0156   //! ParSol is the intrinsic parameter of the point PntSol
0157   //! on the solution curv.
0158   //! ParArg is the intrinsic parameter of the point PntSol
0159   //! on the argument curv.
0160   //! It raises NotDone if the construction algorithm
0161   //! didn't succeed.
0162   Standard_EXPORT void Tangency1(double& ParSol, double& ParArg, gp_Pnt2d& PntSol) const;
0163 
0164   //! Returns information about the tangency point between
0165   //! the result and the second argument.
0166   //! ParSol is the intrinsic parameter of the point PntSol
0167   //! on the solution curv.
0168   //! ParArg is the intrinsic parameter of the point PntSol
0169   //! on the argument curv.
0170   //! It raises NotDone if the construction algorithm
0171   //! didn't succeed.
0172   Standard_EXPORT void Tangency2(double& ParSol, double& ParArg, gp_Pnt2d& PntSol) const;
0173 
0174   //! Returns information about the tangency point between
0175   //! the result and the third argument.
0176   //! ParSol is the intrinsic parameter of the point PntSol
0177   //! on the solution curv.
0178   //! ParArg is the intrinsic parameter of the point PntSol
0179   //! on the argument curv.
0180   //! It raises NotDone if the construction algorithm
0181   //! didn't succeed.
0182   Standard_EXPORT void Tangency3(double& ParSol, double& ParArg, gp_Pnt2d& PntSol) const;
0183 
0184   //! It raises NotDone if the construction algorithm
0185   //! didn't succeed.
0186   Standard_EXPORT bool IsTheSame1() const;
0187 
0188   //! It raises NotDone if the construction algorithm
0189   //! didn't succeed.
0190   Standard_EXPORT bool IsTheSame2() const;
0191 
0192   //! It raises NotDone if the construction algorithm
0193   //! didn't succeed.
0194   Standard_EXPORT bool IsTheSame3() const;
0195 
0196 private:
0197   bool            WellDone;
0198   gp_Circ2d       cirsol;
0199   GccEnt_Position qualifier1;
0200   GccEnt_Position qualifier2;
0201   GccEnt_Position qualifier3;
0202   bool            TheSame1;
0203   bool            TheSame2;
0204   bool            TheSame3;
0205   gp_Pnt2d        pnttg1sol;
0206   gp_Pnt2d        pnttg2sol;
0207   gp_Pnt2d        pnttg3sol;
0208   double          par1sol;
0209   double          par2sol;
0210   double          par3sol;
0211   double          pararg1;
0212   double          pararg2;
0213   double          pararg3;
0214 };
0215 
0216 #endif // _Geom2dGcc_Circ2d3TanIter_HeaderFile