1 // Created on: 1992-03-04
2 // Created by: Laurent BUCHARD
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _IntCurve_PConic_HeaderFile
18 #define _IntCurve_PConic_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <gp_Ax22d.hxx>
25 #include <Standard_Real.hxx>
26 #include <Standard_Integer.hxx>
27 #include <GeomAbs_CurveType.hxx>
35 //! This class represents a conic from gp as a
36 //! parametric curve ( in order to be used by the
37 //! class PConicTool from IntCurve).
45 Standard_EXPORT IntCurve_PConic(const IntCurve_PConic& PC);
47 Standard_EXPORT IntCurve_PConic(const gp_Elips2d& E);
49 Standard_EXPORT IntCurve_PConic(const gp_Circ2d& C);
51 Standard_EXPORT IntCurve_PConic(const gp_Parab2d& P);
53 Standard_EXPORT IntCurve_PConic(const gp_Hypr2d& H);
55 Standard_EXPORT IntCurve_PConic(const gp_Lin2d& L);
57 //! EpsX is a internal tolerance used in math
58 //! algorithms, usually about 1e-10
59 //! (See FunctionAllRoots for more details)
60 Standard_EXPORT void SetEpsX (const Standard_Real EpsDist);
62 //! Accuracy is the number of samples used to
63 //! approximate the parametric curve on its domain.
64 Standard_EXPORT void SetAccuracy (const Standard_Integer Nb);
66 Standard_Integer Accuracy() const;
68 Standard_Real EpsX() const;
70 //! The Conics are manipulated as objects which only
71 //! depend on three parameters : Axis and two Real from Standards.
72 //! Type Curve is used to select the correct Conic.
73 GeomAbs_CurveType TypeCurve() const;
75 const gp_Ax22d& Axis2() const;
77 Standard_Real Param1() const;
79 Standard_Real Param2() const;
97 Standard_Real TheEpsX;
98 Standard_Integer TheAccuracy;
99 GeomAbs_CurveType type;
105 #include <IntCurve_PConic.lxx>
111 #endif // _IntCurve_PConic_HeaderFile