Salome HOME
Movement group uses solids, which are defined in extrusion/revolution/boolean. So...
[modules/shaper.git] / src / ConstructionPlugin / ConstructionPlugin_Plane.cpp
index 13ae2b36d65cb7fe6ca22bcdeb2f398b22172352..549773ab7a2902a3b041d02770e09f5fc0697bbc 100644 (file)
@@ -95,6 +95,10 @@ std::shared_ptr<GeomAPI_Shape>  ConstructionPlugin_Plane::createPlaneByFaceAndDi
 
     double aDist = aDistAttr->value();
     GeomShapePtr aShape = aFaceAttr->value();
+    if (!aShape.get()) {
+      aShape = aFaceAttr->context()->shape();
+    }
+
     if (aShape.get() != NULL) {
       std::shared_ptr<GeomAPI_Pln> aPln = GeomAlgoAPI_FaceBuilder::plane(aShape);
       std::shared_ptr<GeomAPI_Pnt> aOrig = aPln->location();
@@ -149,7 +153,7 @@ std::shared_ptr<GeomAPI_Shape> ConstructionPlugin_Plane::createPlaneByGeneralEqu
     std::string kDefaultPlaneSize = "200";
     double aSize = Config_PropManager::integer("Sketch planes", "planes_size", kDefaultPlaneSize);
     aSize *= 4.;
-    aPlaneFace = GeomAlgoAPI_FaceBuilder::square(aPlane, aSize);
+    aPlaneFace = GeomAlgoAPI_FaceBuilder::square(aPlane, aSize, true);
   }
   return aPlaneFace;
 }