1 // Copyright (C) 2017-20xx CEA/DEN, EDF R&D
3 // File: GeomAPI_Ellipse2d.h
4 // Created: 26 April 2017
5 // Author: Artem ZHIDKOV
7 #ifndef GeomAPI_Ellipse2d_H_
8 #define GeomAPI_Ellipse2d_H_
10 #include <GeomAPI_Interface.h>
15 /**\class GeomAPI_Ellipse2d
17 * \brief Ellipse in 2D
19 class GeomAPI_Ellipse2d : public GeomAPI_Interface
22 /// \brief Constructs ellipse by center, X-axis and given radii
23 GEOMAPI_EXPORT GeomAPI_Ellipse2d(const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
24 const std::shared_ptr<GeomAPI_Dir2d>& theXAxis,
25 const double theMajorRadius,
26 const double theMinorRadius);
28 /// \brief Constructs ellipse by center and two points lying on the ellipse:
29 /// first of them defines an axis of the ellipse
30 /// and another is just placed on the ellipse.
31 GEOMAPI_EXPORT GeomAPI_Ellipse2d(const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
32 const std::shared_ptr<GeomAPI_Pnt2d>& theAxisPoint,
33 const std::shared_ptr<GeomAPI_Pnt2d>& thePassingPoint);
35 /// Returns center of the ellipse
36 GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Pnt2d> center() const;
38 /// Returns first focus of the ellipse
39 GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Pnt2d> firstFocus() const;
41 /// Returns second focus of the ellipse
42 GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Pnt2d> secondFocus() const;
44 /// Returns minor radius of the ellipse
45 GEOMAPI_EXPORT double minorRadius() const;
47 /// Returns major radius of the ellipse
48 GEOMAPI_EXPORT double majorRadius() const;