Salome HOME
204e0f36c7877e6dd92dcb6ccd55e95582983415
[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_Ax1.h>
12 #include <GeomAPI_Shape.h>
13 #include <GeomAPI_Pnt.h>
14 #include <GeomAPI_Pln.h>
15 #include <GeomAPI_Dir.h>
16 #include <memory>
17
18 /**\class GeomAlgoAPI_FaceBuilder
19  * \ingroup DataAlgo
20  * \brief Allows to create face-shapes by different parameters
21  */
22
23 class GEOMALGOAPI_EXPORT GeomAlgoAPI_FaceBuilder
24 {
25  public:
26   /// Creates square planar face by given point of the center,
27   /// normal to the plane and size of square
28   static std::shared_ptr<GeomAPI_Shape> square(std::shared_ptr<GeomAPI_Pnt> theCenter,
29                                                  std::shared_ptr<GeomAPI_Dir> theNormal,
30                                                  const double theSize);
31   /// Creates square planar face by given point of the center,
32   /// normal to the plane and size of square
33   static std::shared_ptr<GeomAPI_Shape> square(std::shared_ptr<GeomAPI_Pln> thePlane,
34                                                const double theSize);
35
36   /// Returns the plane of the planar face. If it is not planar, returns empty ptr.
37   static std::shared_ptr<GeomAPI_Pln> plane(std::shared_ptr<GeomAPI_Shape> theFace);
38
39   /// Creates the planar face by given axis.
40   static std::shared_ptr<GeomAPI_Shape> planarFace(std::shared_ptr<GeomAPI_Ax1> theAxis);
41
42   /// Creates the planar face by given point of the center and normal to the plane.
43   static std::shared_ptr<GeomAPI_Shape> planarFace(std::shared_ptr<GeomAPI_Pnt> theCenter,
44                                                    std::shared_ptr<GeomAPI_Dir> theNormal);
45
46   /// Creates a planar face by given plane, left lower point and size.
47   static std::shared_ptr<GeomAPI_Shape> planarFace(std::shared_ptr<GeomAPI_Pln> thePlane,
48                                                    double theX, double theY,
49                                                    double theWidth, double theHeight);
50 };
51
52 #endif