Salome HOME
Issue #904 - Fatal error aftre delete sketch from dataset used in extrusion in part
[modules/shaper.git] / src / ConstructionPlugin / ConstructionPlugin_Plane.cpp
index 13ae2b36d65cb7fe6ca22bcdeb2f398b22172352..adcd4c1229bdf34e622cc1adaa0a629994f60515 100644 (file)
@@ -54,6 +54,7 @@ void ConstructionPlugin_Plane::execute()
   if (!aPlaneFace.get())
     return;
   ResultConstructionPtr aConstr = document()->createConstruction(data());
+  aConstr->setInfinite(true);
   aConstr->setShape(aPlaneFace);
   setResult(aConstr);
 }
@@ -95,6 +96,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();