Salome HOME
Fix for the issue #2753 : error when dump/load script
[modules/shaper.git] / src / BuildPlugin / BuildPlugin_Polyline.cpp
index 7d2369c20897f2ea51f28a8bbbf4da0b885b4c88..17702ae33c452b2cf6c756cf35ec4e0bf8434072 100644 (file)
@@ -107,7 +107,7 @@ void BuildPlugin_Polyline::execute()
   ResultBodyPtr aResultBody = document()->createBody(data());
   std::set<GeomShapePtr>::const_iterator aContextIt = aContexts.begin();
   for (; aContextIt != aContexts.end(); aContextIt++) {
-    aResultBody->storeModified(*aContextIt, aWire, aContextIt == aContexts.begin() ? 0 : -2);
+    aResultBody->storeModified(*aContextIt, aWire, aContextIt == aContexts.begin());
   }
 
   aPointsIt = aPoints.cbegin();
@@ -115,7 +115,7 @@ void BuildPlugin_Polyline::execute()
   for (; anExp.more() && aPointsIt != aPoints.cend(); anExp.next(), ++aPointsIt) {
     GeomShapePtr aPoint = *aPointsIt;
     GeomShapePtr anEdge = anExp.current();
-    aResultBody->generated(aPoint, anEdge, "Edge", 1);
+    aResultBody->generated(aPoint, anEdge);
   }
 
   if (!isClosed) {
@@ -125,8 +125,8 @@ void BuildPlugin_Polyline::execute()
       aResPoints.push_back(anExp.current());
     }
 
-    aResultBody->generated(aResPoints.front(), "FirstVertex", 2);
-    aResultBody->generated(aResPoints.back(), "LastVertex", 3);
+    aResultBody->generated(aResPoints.front(), "FirstVertex");
+    aResultBody->generated(aResPoints.back(), "LastVertex");
   }
 
   setResult(aResultBody);