1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAlgoAPI_FaceBuilder.h
4 // Created: 23 Apr 2014
5 // Author: Mikhail PONIKAROV
7 #ifndef GeomAlgoAPI_FaceBuilder_H_
8 #define GeomAlgoAPI_FaceBuilder_H_
10 #include <GeomAlgoAPI.h>
11 #include <GeomAPI_Shape.h>
12 #include <GeomAPI_Pnt.h>
13 #include <GeomAPI_Pln.h>
14 #include <GeomAPI_Dir.h>
17 /**\class GeomAlgoAPI_FaceBuilder
19 * \brief Allows to create face-shapes by different parameters
22 class GEOMALGOAPI_EXPORT GeomAlgoAPI_FaceBuilder
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);
35 /// Returns the plane of the planar face. If it is not planar, returns empty ptr.
36 static std::shared_ptr<GeomAPI_Pln> plane(std::shared_ptr<GeomAPI_Shape> theFace);
38 /// Creates the planar face by given point of the center and normal to the plane.
39 static std::shared_ptr<GeomAPI_Shape> planarFace(std::shared_ptr<GeomAPI_Pnt> theCenter,
40 std::shared_ptr<GeomAPI_Dir> theNormal);
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);