Salome HOME
Fix for the issue #2753 : error when dump/load script
[modules/shaper.git] / src / ConstructionPlugin / ConstructionPlugin_Plane.cpp
index 52e2920353d9dc3709d4b6e3d9ecf746ea94bd60..1189cb761d6e390b590593171d25912eafb57a6c 100644 (file)
@@ -46,6 +46,7 @@
 #include <ModelAPI_Session.h>
 #include <ModelAPI_Validator.h>
 
+
 static GeomShapePtr faceByThreeVertices(const std::shared_ptr<GeomAPI_Vertex> theV1,
                                         const std::shared_ptr<GeomAPI_Vertex> theV2,
                                         const std::shared_ptr<GeomAPI_Vertex> theV3);
@@ -181,7 +182,9 @@ std::shared_ptr<GeomAPI_Shape> ConstructionPlugin_Plane::createByGeneralEquation
            aC = anAttrC->value(), aD = anAttrD->value();
     std::shared_ptr<GeomAPI_Pln> aPlane =
       std::shared_ptr<GeomAPI_Pln>(new GeomAPI_Pln(aA, aB, aC, aD));
-    double aSize = Config_PropManager::integer(SKETCH_TAB_NAME, "planes_size");
+    double aSize = Config_PropManager::real(SKETCH_TAB_NAME, "planes_size");
+    if (aSize <= 1.e-7)
+      aSize = 200;  // Set default value
     aSize *= 4.;
     aPlaneFace = GeomAlgoAPI_FaceBuilder::squareFace(aPlane, aSize);
   }