]> SALOME platform Git repositories - modules/shaper.git/blob - src/GeomAPI/GeomAPI_Ellipse2d.h
Salome HOME
Task 2.1. Creation of ellipses and arcs of ellipse.
[modules/shaper.git] / src / GeomAPI / GeomAPI_Ellipse2d.h
1 // Copyright (C) 2017-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAPI_Ellipse2d.h
4 // Created:     26 April 2017
5 // Author:      Artem ZHIDKOV
6
7 #ifndef GeomAPI_Ellipse2d_H_
8 #define GeomAPI_Ellipse2d_H_
9
10 #include <GeomAPI_Interface.h>
11
12 class GeomAPI_Pnt2d;
13 class GeomAPI_Dir2d;
14
15 /**\class GeomAPI_Ellipse2d
16  * \ingroup DataModel
17  * \brief Ellipse in 2D
18  */
19 class GeomAPI_Ellipse2d : public GeomAPI_Interface
20 {
21 public:
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);
27
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);
34
35   /// Returns center of the ellipse
36   GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Pnt2d> center() const;
37
38   /// Returns first focus of the ellipse
39   GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Pnt2d> firstFocus() const;
40
41   /// Returns second focus of the ellipse
42   GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Pnt2d> secondFocus() const;
43
44   /// Returns minor radius of the ellipse
45   GEOMAPI_EXPORT double minorRadius() const;
46
47   /// Returns major radius of the ellipse
48   GEOMAPI_EXPORT double majorRadius() const;
49 };
50
51 #endif