Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-16 09:17:04

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_Circ2d2TanOnIter_HeaderFile
0018 #define _Geom2dGcc_Circ2d2TanOnIter_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 gp_Lin2d;
0029 class GccEnt_QualifiedLin;
0030 class Geom2dAdaptor_Curve;
0031 
0032 //! This class implements the algorithms used to
0033 //! create 2d circles TANgent to 2 entities and
0034 //! having the center ON a curv.
0035 //! The order of the tangency argument is always
0036 //! QualifiedCirc, QualifiedLin, QualifiedCurv, Pnt2d.
0037 //! the arguments are :
0038 //! - The two tangency arguments.
0039 //! - The center line.
0040 //! - The parameter for each tangency argument which
0041 //! is a curve.
0042 //! - The tolerance.
0043 class Geom2dGcc_Circ2d2TanOnIter
0044 {
0045 public:
0046   DEFINE_STANDARD_ALLOC
0047 
0048   //! This method implements the algorithms used to
0049   //! create 2d circles TANgent to a 2d circle and a curve and
0050   //! having the center ON a 2d line.
0051   //! Param2 is the initial guess on the curve QualifiedCurv.
0052   //! Tolerance is used for the limit cases.
0053   Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const GccEnt_QualifiedCirc& Qualified1,
0054                                              const Geom2dGcc_QCurve&     Qualified2,
0055                                              const gp_Lin2d&             OnLine,
0056                                              const double                Param1,
0057                                              const double                Param2,
0058                                              const double                Param3,
0059                                              const double                Tolerance);
0060 
0061   //! This method implements the algorithms used to
0062   //! create 2d circles TANgent to a 2d line and a curve and
0063   //! having the center ON a 2d line.
0064   //! Param2 is the initial guess on the curve QualifiedCurv.
0065   //! Tolerance is used for the limit cases.
0066   Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const GccEnt_QualifiedLin& Qualified1,
0067                                              const Geom2dGcc_QCurve&    Qualified2,
0068                                              const gp_Lin2d&            OnLine,
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 two curves and
0076   //! having the center ON a 2d line.
0077   //! Param1 is the initial guess on the first QualifiedCurv.
0078   //! Param2 is the initial guess on the first QualifiedCurv.
0079   //! Tolerance is used for the limit cases.
0080   Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const Geom2dGcc_QCurve& Qualified1,
0081                                              const Geom2dGcc_QCurve& Qualified2,
0082                                              const gp_Lin2d&         OnLine,
0083                                              const double            Param1,
0084                                              const double            Param2,
0085                                              const double            Param3,
0086                                              const double            Tolerance);
0087 
0088   //! This method implements the algorithms used to
0089   //! create 2d circles TANgent to a 2d point and a curve and
0090   //! having the center ON a 2d line.
0091   //! Param2 is the initial guess on the curve QualifiedCurv.
0092   //! Tolerance is used for the limit cases.
0093   Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const Geom2dGcc_QCurve& Qualified1,
0094                                              const gp_Pnt2d&         Point2,
0095                                              const gp_Lin2d&         OnLine,
0096                                              const double            Param1,
0097                                              const double            Param2,
0098                                              const double            Tolerance);
0099 
0100   //! This method implements the algorithms used to
0101   //! create 2d circles TANgent to a 2d circle and a curve and
0102   //! having the center ON a 2d circle.
0103   //! Param2 is the initial guess on the curve QualifiedCurv.
0104   //! Tolerance is used for the limit cases.
0105   Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const GccEnt_QualifiedCirc& Qualified1,
0106                                              const Geom2dGcc_QCurve&     Qualified2,
0107                                              const gp_Circ2d&            OnCirc,
0108                                              const double                Param1,
0109                                              const double                Param2,
0110                                              const double                Param3,
0111                                              const double                Tolerance);
0112 
0113   //! This method implements the algorithms used to
0114   //! create 2d circles TANgent to a 2d line and a curve and
0115   //! having the center ON a 2d circle.
0116   //! Param2 is the initial guess on the curve QualifiedCurv.
0117   //! Tolerance is used for the limit cases.
0118   Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const GccEnt_QualifiedLin& Qualified1,
0119                                              const Geom2dGcc_QCurve&    Qualified2,
0120                                              const gp_Circ2d&           OnCirc,
0121                                              const double               Param1,
0122                                              const double               Param2,
0123                                              const double               Param3,
0124                                              const double               Tolerance);
0125 
0126   //! This method implements the algorithms used to
0127   //! create 2d circles TANgent to two curves and
0128   //! having the center ON a 2d circle.
0129   //! Param1 is the initial guess on the first QualifiedCurv.
0130   //! Param2 is the initial guess on the first QualifiedCurv.
0131   //! Tolerance is used for the limit cases.
0132   Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const Geom2dGcc_QCurve& Qualified1,
0133                                              const Geom2dGcc_QCurve& Qualified2,
0134                                              const gp_Circ2d&        OnCirc,
0135                                              const double            Param1,
0136                                              const double            Param2,
0137                                              const double            Param3,
0138                                              const double            Tolerance);
0139 
0140   //! This method implements the algorithms used to
0141   //! create 2d circles TANgent to a 2d point and a curve and
0142   //! having the center ON a 2d circle.
0143   //! Param2 is the initial guess on the curve QualifiedCurv.
0144   //! Tolerance is used for the limit cases.
0145   Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const Geom2dGcc_QCurve& Qualified1,
0146                                              const gp_Pnt2d&         Point2,
0147                                              const gp_Circ2d&        OnCirc,
0148                                              const double            Param1,
0149                                              const double            Param2,
0150                                              const double            Tolerance);
0151 
0152   //! This method implements the algorithms used to
0153   //! create 2d circles TANgent to a 2d circle and a curve and
0154   //! having the center ON a 2d curve.
0155   //! Param2 is the initial guess on the curve QualifiedCurv.
0156   //! ParamOn is the initial guess on the center curve OnCurv.
0157   //! Tolerance is used for the limit cases.
0158   Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const GccEnt_QualifiedCirc& Qualified1,
0159                                              const Geom2dGcc_QCurve&     Qualified2,
0160                                              const Geom2dAdaptor_Curve&  OnCurv,
0161                                              const double                Param1,
0162                                              const double                Param2,
0163                                              const double                ParamOn,
0164                                              const double                Tolerance);
0165 
0166   //! This method implements the algorithms used to
0167   //! create 2d circles TANgent to a 2d line and a curve and
0168   //! having the center ON a 2d curve.
0169   //! Param2 is the initial guess on the curve QualifiedCurv.
0170   //! ParamOn is the initial guess on the center curve OnCurv.
0171   //! Tolerance is used for the limit cases.
0172   Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const GccEnt_QualifiedLin& Qualified1,
0173                                              const Geom2dGcc_QCurve&    Qualified2,
0174                                              const Geom2dAdaptor_Curve& OnCurve,
0175                                              const double               Param1,
0176                                              const double               Param2,
0177                                              const double               ParamOn,
0178                                              const double               Tolerance);
0179 
0180   //! This method implements the algorithms used to
0181   //! create 2d circles TANgent to a 2d Point and a curve and
0182   //! having the center ON a 2d curve.
0183   //! Param1 is the initial guess on the curve QualifiedCurv.
0184   //! ParamOn is the initial guess on the center curve OnCurv.
0185   //! Tolerance is used for the limit cases.
0186   Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const Geom2dGcc_QCurve&    Qualified1,
0187                                              const gp_Pnt2d&            Point2,
0188                                              const Geom2dAdaptor_Curve& OnCurve,
0189                                              const double               Param1,
0190                                              const double               ParamOn,
0191                                              const double               Tolerance);
0192 
0193   //! This method implements the algorithms used to
0194   //! create 2d circles TANgent to two curves and
0195   //! having the center ON a 2d curve.
0196   //! Param1 is the initial guess on the first curve QualifiedCurv.
0197   //! Param1 is the initial guess on the second curve QualifiedCurv.
0198   //! ParamOn is the initial guess on the center curve OnCurv.
0199   //! Tolerance is used for the limit cases.
0200   Standard_EXPORT Geom2dGcc_Circ2d2TanOnIter(const Geom2dGcc_QCurve&    Qualified1,
0201                                              const Geom2dGcc_QCurve&    Qualified2,
0202                                              const Geom2dAdaptor_Curve& OnCurve,
0203                                              const double               Param1,
0204                                              const double               Param2,
0205                                              const double               ParamOn,
0206                                              const double               Tolerance);
0207 
0208   //! This method returns True if the construction
0209   //! algorithm succeeded.
0210   Standard_EXPORT bool IsDone() const;
0211 
0212   //! Returns the solution.
0213   //! It raises NotDone if the construction algorithm
0214   //! didn't succeed.
0215   Standard_EXPORT gp_Circ2d ThisSolution() const;
0216 
0217   Standard_EXPORT void WhichQualifier(GccEnt_Position& Qualif1, GccEnt_Position& Qualif2) const;
0218 
0219   //! Returns information about the tangency point between
0220   //! the result and the first argument.
0221   //! ParSol is the intrinsic parameter of the point PntSol
0222   //! on the solution curv.
0223   //! ParArg is the intrinsic parameter of the point PntSol
0224   //! on the argument curv.
0225   //! It raises NotDone if the construction algorithm
0226   //! didn't succeed.
0227   Standard_EXPORT void Tangency1(double& ParSol, double& ParArg, gp_Pnt2d& PntSol) const;
0228 
0229   //! Returns information about the tangency point between
0230   //! the result and the second argument.
0231   //! ParSol is the intrinsic parameter of the point PntSol
0232   //! on the solution curv.
0233   //! ParArg is the intrinsic parameter of the point PntSol
0234   //! on the argument curv.
0235   //! It raises NotDone if the construction algorithm
0236   //! didn't succeed.
0237   Standard_EXPORT void Tangency2(double& ParSol, double& ParArg, gp_Pnt2d& PntSol) const;
0238 
0239   //! Returns information about the center (on the curv) of the
0240   //! result and the third argument.
0241   //! It raises NotDone if the construction algorithm
0242   //! didn't succeed.
0243   Standard_EXPORT void CenterOn3(double& ParArg, gp_Pnt2d& PntSol) const;
0244 
0245   //! It raises NotDone if the construction algorithm
0246   //! didn't succeed.
0247   Standard_EXPORT bool IsTheSame1() const;
0248 
0249   //! It raises NotDone if the construction algorithm
0250   //! didn't succeed.
0251   Standard_EXPORT bool IsTheSame2() const;
0252 
0253 private:
0254   bool            WellDone;
0255   gp_Circ2d       cirsol;
0256   GccEnt_Position qualifier1;
0257   GccEnt_Position qualifier2;
0258   bool            TheSame1;
0259   bool            TheSame2;
0260   gp_Pnt2d        pnttg1sol;
0261   gp_Pnt2d        pnttg2sol;
0262   gp_Pnt2d        pntcen;
0263   double          par1sol;
0264   double          par2sol;
0265   double          pararg1;
0266   double          pararg2;
0267   double          parcen3;
0268 };
0269 
0270 #endif // _Geom2dGcc_Circ2d2TanOnIter_HeaderFile