Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:06

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 
0033 //! This class represents a conic from gp as a
0034 //! parametric curve ( in order to be used by the
0035 //! class PConicTool from IntCurve).
0036 class IntCurve_PConic 
0037 {
0038 public:
0039 
0040   DEFINE_STANDARD_ALLOC
0041 
0042   
0043   Standard_EXPORT IntCurve_PConic(const IntCurve_PConic& PC);
0044   
0045   Standard_EXPORT IntCurve_PConic(const gp_Elips2d& E);
0046   
0047   Standard_EXPORT IntCurve_PConic(const gp_Circ2d& C);
0048   
0049   Standard_EXPORT IntCurve_PConic(const gp_Parab2d& P);
0050   
0051   Standard_EXPORT IntCurve_PConic(const gp_Hypr2d& H);
0052   
0053   Standard_EXPORT IntCurve_PConic(const gp_Lin2d& L);
0054   
0055   //! EpsX is a internal tolerance used in math
0056   //! algorithms, usually about 1e-10
0057   //! (See FunctionAllRoots for more details)
0058   Standard_EXPORT void SetEpsX (const Standard_Real EpsDist);
0059   
0060   //! Accuracy is the number of samples used to
0061   //! approximate the parametric curve on its domain.
0062   Standard_EXPORT void SetAccuracy (const Standard_Integer Nb);
0063   
0064     Standard_Integer Accuracy() const;
0065   
0066     Standard_Real EpsX() const;
0067   
0068   //! The Conics are manipulated as objects which only
0069   //! depend on three parameters : Axis and two Real from Standards.
0070   //! Type Curve is used to select the correct Conic.
0071     GeomAbs_CurveType TypeCurve() const;
0072   
0073     const gp_Ax22d& Axis2() const;
0074   
0075     Standard_Real Param1() const;
0076   
0077     Standard_Real Param2() const;
0078 
0079 
0080 
0081 
0082 protected:
0083 
0084 
0085 
0086 
0087 
0088 private:
0089 
0090 
0091 
0092   gp_Ax22d axe;
0093   Standard_Real prm1;
0094   Standard_Real prm2;
0095   Standard_Real TheEpsX;
0096   Standard_Integer TheAccuracy;
0097   GeomAbs_CurveType type;
0098 
0099 
0100 };
0101 
0102 
0103 #include <IntCurve_PConic.lxx>
0104 
0105 
0106 
0107 
0108 
0109 #endif // _IntCurve_PConic_HeaderFile