Salome HOME
Add the primitive 3D "Box".
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_Box.h
1 // Copyright (C) 2014-2016 CEA/DEN, EDF R&D
2
3 // File:        GeomAlgoAPI_Box.h
4 // Created:     17 Mar 2016
5 // Author:      Clarisse Genrault (CEA)
6
7 #ifndef GeomAlgoAPI_Box_H_
8 #define GeomAlgoAPI_Box_H_
9
10 #include <GeomAPI_Pnt.h>
11 #include <GeomAlgoAPI_MakeShape.h>
12
13 /**\class GeomAlgoAPI_Box
14  * \ingroup DataAlgo
15  * \brief Allows to create Box Primitives
16  */
17 class GeomAlgoAPI_Box : public GeomAlgoAPI_MakeShape
18 {
19  public: 
20   GEOMALGOAPI_EXPORT GeomAlgoAPI_Box();
21   
22   /// Creates a box using the dimensions.
23   /// \param theDx The dimension on X
24   /// \param theDy The dimension on Y
25   /// \param theDz The dimension on Z
26   GEOMALGOAPI_EXPORT GeomAlgoAPI_Box(const double theDx, const double theDy, const double theDz);
27   
28   /// Checks if each dimension "Dx", Dy" and "Dz" for the box construction is OK.
29   GEOMALGOAPI_EXPORT bool check();
30   
31   /// Builds the box with the dimensions "Dx", "Dy" and "Dz".
32   GEOMALGOAPI_EXPORT void build();
33   
34   /// Prepare the naming (redifined because it is specific for a box).
35   GEOMALGOAPI_EXPORT void prepareNamingFaces();
36   
37  private:
38   double myDx; /// Dimension on X to create a box.
39   double myDy; /// Dimension on Y to create a box.
40   double myDz; /// Dimension Z to create a box.
41 };
42
43
44 #endif