+//==================================================================================================
+std::shared_ptr<GeomAPI_Face> GeomAlgoAPI_FaceBuilder::squareFace(
+ const std::shared_ptr<GeomAPI_Pln> thePlane,
+ const double theSize)
+{
+ // half of the size in each direction from the center
+ BRepBuilderAPI_MakeFace aFaceBuilder(thePlane->impl<gp_Pln>(),
+ -theSize / 2., theSize / 2.,
+ -theSize / 2., theSize / 2.);
+ std::shared_ptr<GeomAPI_Face> aRes(new GeomAPI_Face());
+ const TopoDS_Face& aFace = aFaceBuilder.Face();
+ aRes->setImpl(new TopoDS_Face(aFace));
+ return aRes;
+}
+
+//==================================================================================================
+std::shared_ptr<GeomAPI_Face> GeomAlgoAPI_FaceBuilder::planarFace(
+ const std::shared_ptr<GeomAPI_Pnt> theCenter,
+ const std::shared_ptr<GeomAPI_Dir> theNormal)
+{
+ const gp_Pnt& aCenter = theCenter->impl<gp_Pnt>();
+ const gp_Dir& aDir = theNormal->impl<gp_Dir>();
+ gp_Pln aPlane(aCenter, aDir);
+ BRepBuilderAPI_MakeFace aFaceBuilder(aPlane);
+ std::shared_ptr<GeomAPI_Face> aRes(new GeomAPI_Face());
+ aRes->setImpl(new TopoDS_Face(aFaceBuilder.Face()));
+ return aRes;
+}
+
+//==================================================================================================
+std::shared_ptr<GeomAPI_Face> GeomAlgoAPI_FaceBuilder::planarFace(
+ const std::shared_ptr<GeomAPI_Pln> thePlane,
+ const double theX, const double theY,
+ const double theWidth, const double theHeight)