Salome HOME
Issue #2324: Update all indexes on show/hide
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_Cone.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAlgoAPI_Cone.h
4 // Created:     20 Mar 2017
5 // Author:      Clarisse Genrault (CEA)
6
7 #ifndef GEOMALGOAPI_CONE_H_
8 #define GEOMALGOAPI_CONE_H_
9
10 #include <GeomAlgoAPI_MakeShape.h>
11
12 #include <GeomAPI_Ax2.h>
13
14 /**\class GeomAlgoAPI_Cone
15  * \ingroup DataAlgo
16  * \brief Allows to create Cone Primitives
17  */
18 class GeomAlgoAPI_Cone : public GeomAlgoAPI_MakeShape
19 {
20  public:
21   GEOMALGOAPI_EXPORT GeomAlgoAPI_Cone();
22
23   /// Creates a cone.
24   /// \param theAxis The axis of the cone
25   /// \param theBaseRadius The base radius of the cone
26   /// \param theTopRadius The top radius of the cone
27   /// \param theHeight The height of the cone
28   GEOMALGOAPI_EXPORT GeomAlgoAPI_Cone(std::shared_ptr<GeomAPI_Ax2> theAxis,
29                                       const double theBaseRadius,
30                                       const double theTopRadius,
31                                       const double theHeight);
32
33   /// Checks if data for the cone construction is OK.
34   GEOMALGOAPI_EXPORT bool check();
35
36   /// Builds the cone.
37   GEOMALGOAPI_EXPORT void build();
38
39  private:
40   std::shared_ptr<GeomAPI_Ax2> myAxis; /// Axis of the cone.
41   double myBaseRadius; /// Base radius of the cone.
42   double myTopRadius; /// Top radius of the cone.
43   double myHeight; /// Height of the cone.
44 };
45
46 #endif // GEOMALGOAPI_CONE_H_