1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAPI_Ellipse.h
4 // Created: 25 April 2017
5 // Author: Vitaly Smetannikov
7 #ifndef GeomAPI_Ellipse_H_
8 #define GeomAPI_Ellipse_H_
10 #include <GeomAPI_Interface.h>
17 /**\class GeomAPI_Ellipse
19 * \brief Ellipse in 3D
21 class GeomAPI_Ellipse : public GeomAPI_Interface
25 /// \brief Constructs an epty ellipse
26 GEOMAPI_EXPORT GeomAPI_Ellipse() : GeomAPI_Interface() {}
28 /** \brief Constructs an ellipse with major and minor radiuses,
29 * where theAx2 locates the ellipse and defines its orientation in 3D space such that:\n
30 * - the center of the circle is the origin of theAx2;\n
31 * - the origin, "X Direction" and "Y Direction" of theAx2 define the plane of the circle;\n
32 * - theAx2 is the local coordinate system of the circle.\n
33 * Note: It is possible to create a circle where Radius is equal to 0.0. raised if Radius < 0.
35 GEOMAPI_EXPORT GeomAPI_Ellipse(const std::shared_ptr<GeomAPI_Ax2>& theAx2,
36 double theMajorRadius, double theMinorRadius);
38 /// Returns center of the ellipse
39 GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Pnt> center() const;
41 /// Returns first focus of the ellipse
42 GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Pnt> firstFocus() const;
44 /// Returns second focus of the ellipse
45 GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Pnt> secondFocus() const;
47 /// Returns minor radius of the ellipse
48 GEOMAPI_EXPORT double minorRadius() const;
50 /// Returns major radius of the ellipse
51 GEOMAPI_EXPORT double majorRadius() const;
55 //! Pointer on the object
56 typedef std::shared_ptr<GeomAPI_Ellipse> GeomEllipsePtr;