Salome HOME
Merge branch 'BR_PYTHON_PLUGIN' of newgeom:newgeom.git into Dev_0.6.1
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_FaceBuilder.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAlgoAPI_FaceBuilder.h
4 // Created:     23 Apr 2014
5 // Author:      Mikhail PONIKAROV
6
7 #ifndef GeomAlgoAPI_FaceBuilder_H_
8 #define GeomAlgoAPI_FaceBuilder_H_
9
10 #include <GeomAlgoAPI.h>
11 #include <GeomAPI_Shape.h>
12 #include <GeomAPI_Pnt.h>
13 #include <GeomAPI_Pln.h>
14 #include <GeomAPI_Dir.h>
15 #include <memory>
16
17 /**\class GeomAlgoAPI_FaceBuilder
18  * \ingroup DataAlgo
19  * \brief Allows to create face-shapes by different parameters
20  */
21
22 class GEOMALGOAPI_EXPORT GeomAlgoAPI_FaceBuilder
23 {
24  public:
25   /// Creates square planar face by given point of the center,
26   /// normal to the plane and size of square
27   static std::shared_ptr<GeomAPI_Shape> square(std::shared_ptr<GeomAPI_Pnt> theCenter,
28                                                  std::shared_ptr<GeomAPI_Dir> theNormal,
29                                                  const double theSize);
30
31   /// Returns the plane of the planar face. If it is not planar, returns empty ptr.
32   static std::shared_ptr<GeomAPI_Pln> plane(std::shared_ptr<GeomAPI_Shape> theFace);
33
34   /// Creates a planar face by given plane, left lower point and size.
35   static std::shared_ptr<GeomAPI_Shape> planarFace(std::shared_ptr<GeomAPI_Pln> thePlane,
36                                                    double theX, double theY,
37                                                    double theWidth, double theHeight);
38 };
39
40 #endif