Salome HOME
Meet the coding style (line length <= 100)
[modules/shaper.git] / src / GeomAPI / GeomAPI_Ellipse.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAPI_Ellipse.h
4 // Created:     25 April 2017
5 // Author:      Vitaly Smetannikov
6
7 #ifndef GeomAPI_Ellipse_H_
8 #define GeomAPI_Ellipse_H_
9
10 #include <GeomAPI_Interface.h>
11 #include <memory>
12
13 class GeomAPI_Pnt;
14 class GeomAPI_Ax2;
15
16
17 /**\class GeomAPI_Ellipse
18  * \ingroup DataModel
19  * \brief Ellipse in 3D
20  */
21 class GeomAPI_Ellipse : public GeomAPI_Interface
22 {
23 public:
24
25   /// \brief Constructs an epty ellipse
26   GEOMAPI_EXPORT GeomAPI_Ellipse() : GeomAPI_Interface() {}
27
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.
34    */
35   GEOMAPI_EXPORT GeomAPI_Ellipse(const std::shared_ptr<GeomAPI_Ax2>& theAx2,
36                                  double theMajorRadius, double theMinorRadius);
37
38   /// Returns first center of the ellipse
39   GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Pnt> firstFocus() const;
40
41   /// Returns second center of the ellipse
42   GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Pnt> 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
52 //! Pointer on the object
53 typedef std::shared_ptr<GeomAPI_Ellipse> GeomEllipsePtr;
54
55 #endif