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_Ax1.h>
12 #include <GeomAPI_Shape.h>
13 #include <GeomAPI_Pnt.h>
14 #include <GeomAPI_Pln.h>
15 #include <GeomAPI_Dir.h>
18 /**\class GeomAlgoAPI_FaceBuilder
20 * \brief Allows to create face-shapes by different parameters
23 class GEOMALGOAPI_EXPORT GeomAlgoAPI_FaceBuilder
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);
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);
39 /// Creates the planar face by given axis.
40 static std::shared_ptr<GeomAPI_Shape> planarFace(std::shared_ptr<GeomAPI_Ax1> theAxis);
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);
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);