Salome HOME
Issue #1620: Fixed orientation of revolution
[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
12 #include <memory>
13
14 class GeomAPI_Dir;
15 class GeomAPI_Face;
16 class GeomAPI_Pln;
17 class GeomAPI_Pnt;
18 class GeomAPI_Vertex;
19
20 /// \class GeomAlgoAPI_FaceBuilder
21 /// \ingroup DataAlgo
22 /// \brief Allows to create face-shapes by different parameters
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_Face> squareFace(const std::shared_ptr<GeomAPI_Pnt> theCenter,
29                                                   const 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_Face> squareFace(const std::shared_ptr<GeomAPI_Pln> thePlane,
34                                                   const double theSize);
35
36   /// Creates the planar face by given point of the center and normal to the plane.
37   static std::shared_ptr<GeomAPI_Face> planarFace(const std::shared_ptr<GeomAPI_Pnt> theCenter,
38                                                   const std::shared_ptr<GeomAPI_Dir> theNormal);
39
40   /// Creates a planar face by given plane, left lower point and size.
41   static std::shared_ptr<GeomAPI_Face> planarFace(const std::shared_ptr<GeomAPI_Pln> thePlane,
42                                                   const double theX, const double theY,
43                                                   const double theWidth, const double theHeight);
44
45   /// Creates a planar face by three vertices.
46   static std::shared_ptr<GeomAPI_Face> planarFaceByThreeVertices(const std::shared_ptr<GeomAPI_Vertex> theVertex1,
47                                                                  const std::shared_ptr<GeomAPI_Vertex> theVertex2,
48                                                                  const std::shared_ptr<GeomAPI_Vertex> theVertex3);
49
50   /// Creates a planar face parallel to theFace and passing through theVertex.
51   static std::shared_ptr<GeomAPI_Face> planarFaceByFaceAndVertex(const std::shared_ptr<GeomAPI_Face> theFace,
52                                                                  const std::shared_ptr<GeomAPI_Vertex> theVertex);
53 };
54
55 #endif