Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-17 09:21:03

0001 // Created on: 1992-03-04
0002 // Created by: Laurent BUCHARD
0003 // Copyright (c) 1992-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 _IntCurve_PConic_HeaderFile
0018 #define _IntCurve_PConic_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <gp_Ax22d.hxx>
0024 #include <Standard_Integer.hxx>
0025 #include <GeomAbs_CurveType.hxx>
0026 class gp_Elips2d;
0027 class gp_Circ2d;
0028 class gp_Parab2d;
0029 class gp_Hypr2d;
0030 class gp_Lin2d;
0031 
0032 //! This class represents a conic from gp as a
0033 //! parametric curve ( in order to be used by the
0034 //! class PConicTool from IntCurve).
0035 class IntCurve_PConic
0036 {
0037 public:
0038   DEFINE_STANDARD_ALLOC
0039 
0040   Standard_EXPORT IntCurve_PConic(const IntCurve_PConic& PC);
0041 
0042   Standard_EXPORT IntCurve_PConic(const gp_Elips2d& E);
0043 
0044   Standard_EXPORT IntCurve_PConic(const gp_Circ2d& C);
0045 
0046   Standard_EXPORT IntCurve_PConic(const gp_Parab2d& P);
0047 
0048   Standard_EXPORT IntCurve_PConic(const gp_Hypr2d& H);
0049 
0050   Standard_EXPORT IntCurve_PConic(const gp_Lin2d& L);
0051 
0052   //! EpsX is a internal tolerance used in math
0053   //! algorithms, usually about 1e-10
0054   //! (See FunctionAllRoots for more details)
0055   Standard_EXPORT void SetEpsX(const double EpsDist);
0056 
0057   //! Accuracy is the number of samples used to
0058   //! approximate the parametric curve on its domain.
0059   Standard_EXPORT void SetAccuracy(const int Nb);
0060 
0061   int Accuracy() const;
0062 
0063   double EpsX() const;
0064 
0065   //! The Conics are manipulated as objects which only
0066   //! depend on three parameters : Axis and two Real from Standards.
0067   //! Type Curve is used to select the correct Conic.
0068   GeomAbs_CurveType TypeCurve() const;
0069 
0070   const gp_Ax22d& Axis2() const;
0071 
0072   double Param1() const;
0073 
0074   double Param2() const;
0075 
0076 private:
0077   gp_Ax22d          axe;
0078   double            prm1;
0079   double            prm2;
0080   double            TheEpsX;
0081   int               TheAccuracy;
0082   GeomAbs_CurveType type;
0083 };
0084 
0085 #include <IntCurve_PConic.lxx>
0086 
0087 #endif // _IntCurve_PConic_HeaderFile