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