Salome HOME
159715f21c10167ed54ffcf89e89366af0a481b7
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_BoxPoints.h
1 // Copyright (C) 2014-2016 CEA/DEN, EDF R&D
2
3 // File:        GeomAlgoAPI_BoxPoints.h
4 // Created:     17 Mar 2016
5 // Author:      Clarisse Genrault (CEA)
6
7 #ifndef GeomAlgoAPI_BoxPoints_H_
8 #define GeomAlgoAPI_BoxPoints_H_
9
10 #include <GeomAPI_Pnt.h>
11 #include <GeomAlgoAPI_Box.h>
12
13 /**\class GeomAlgoAPI_BoxPoints
14  * \ingroup DataAlgo
15  * \brief Allows to create Box Primitives using the two points that defined a diagonal.
16  */
17 class GeomAlgoAPI_BoxPoints : public GeomAlgoAPI_Box
18 {
19  public: 
20   /// Creates a box using the two points that defined a diagonal.
21   /// \param theFirstPoint One extermity of the diagonal
22   /// \param theSecondPoint The other extremity of the diagonal
23   GEOMALGOAPI_EXPORT GeomAlgoAPI_BoxPoints(std::shared_ptr<GeomAPI_Pnt> theFirstPoint,
24                                            std::shared_ptr<GeomAPI_Pnt> theSecondPoint);
25   
26   /// \return true if the data of the construction of the box were correct.
27   GEOMALGOAPI_EXPORT bool check();
28   
29   /// Builds the box.
30   GEOMALGOAPI_EXPORT void build();
31   
32  private:
33   std::shared_ptr<GeomAPI_Pnt> myFirstPoint; /// First point to create a box.
34   std::shared_ptr<GeomAPI_Pnt> mySecondPoint; /// Second point to create a box.
35 };
36
37
38 #endif