Salome HOME
Merge remote-tracking branch 'origin/Toolbars_Management'
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_Torus.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAlgoAPI_Torus.h
4 // Created:     20 Mar 2017
5 // Author:      Clarisse Genrault (CEA)
6
7 #ifndef GEOMALGOAPI_TORUS_H_
8 #define GEOMALGOAPI_TORUS_H_
9
10 #include <GeomAlgoAPI_MakeShape.h>
11
12 #include <GeomAPI_Ax2.h>
13
14 /**\class GeomAlgoAPI_Torus
15  * \ingroup DataAlgo
16  * \brief Allows to create Torus Primitives
17  */
18 class GeomAlgoAPI_Torus : public GeomAlgoAPI_MakeShape
19 {
20  public:
21   /// Creates a torus.
22   /// \param theAxis The axis of the torus
23   /// \param theRadius The radius of the torus
24   /// \param theRingRadius The ring radius of the torus
25   GEOMALGOAPI_EXPORT GeomAlgoAPI_Torus(std::shared_ptr<GeomAPI_Ax2> theAxis,
26                                        const double theRadius,
27                                        const double theRingRadius);
28
29   /// Checks if data for the torus construction is OK.
30   GEOMALGOAPI_EXPORT bool check();
31
32   /// Builds the torus.
33   GEOMALGOAPI_EXPORT void build();
34
35  private:
36   std::shared_ptr<GeomAPI_Ax2> myAxis; /// Axis of the torus.
37   double myRadius; /// Radius of the torus.
38   double myRingRadius; /// Ring radius of the torus.
39 };
40
41 #endif // GEOMALGOAPI_TORUS_H_