Salome HOME
Merge branch 'Dev_1.1.1' of newgeom:newgeom into Dev_1.2.0
[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   /// Creates square planar face by given point of the center,
31   /// normal to the plane and size of square
32   static std::shared_ptr<GeomAPI_Shape> square(std::shared_ptr<GeomAPI_Pln> thePlane,
33                                                const double theSize);
34
35   /// Creates the plane by given point of the center and normal to the plane.
36   static std::shared_ptr<GeomAPI_Shape> plane(std::shared_ptr<GeomAPI_Pnt> theCenter,
37                                             std::shared_ptr<GeomAPI_Dir> theNormal);
38
39   /// Returns the plane of the planar face. If it is not planar, returns empty ptr.
40   static std::shared_ptr<GeomAPI_Pln> plane(std::shared_ptr<GeomAPI_Shape> theFace);
41
42   /// Creates a planar face by given plane, left lower point and size.
43   static std::shared_ptr<GeomAPI_Shape> planarFace(std::shared_ptr<GeomAPI_Pln> thePlane,
44                                                    double theX, double theY,
45                                                    double theWidth, double theHeight);
46 };
47
48 #endif