]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/GeomAlgoAPI/GeomAlgoAPI_FaceBuilder.cpp
Salome HOME
Issue #555 - Make a number of shifted/rotated copies - selected object does not appea...
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_FaceBuilder.cpp
index c197873082d41d554107f2006be01495ce820bd6..9e687d6d296aa65d1b726313f7338747d5cecaab 100644 (file)
@@ -31,14 +31,18 @@ std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_FaceBuilder::square(
 
 std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_FaceBuilder::square(
     std::shared_ptr<GeomAPI_Pln> thePlane,
-    const double theSize)
+    const double theSize,
+    const bool theInfinite)
 {
   // 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_Shape> aRes(new GeomAPI_Shape);
-  aRes->setImpl(new TopoDS_Shape(aFaceBuilder.Face()));
+  TopoDS_Shape aFace = aFaceBuilder.Face();
+  if (theInfinite)
+    aFace.Infinite(Standard_True);
+  aRes->setImpl(new TopoDS_Shape(aFace/*aFaceBuilder.Face()*/));
   return aRes;
 }