Salome HOME
Fix for the issue #2753 : error when dump/load script
[modules/shaper.git] / src / ModelHighAPI / ModelHighAPI_Dumper.cpp
index 7e33d61fea254dd264a0e249f7b433ff07f18ddf..62e3327e2c60320c088041c198cf6e2278bc38c4 100644 (file)
@@ -1097,15 +1097,18 @@ ModelHighAPI_Dumper& ModelHighAPI_Dumper::operator<<(
       anIndex = anOutput.str();
     }
 
-    myDumpBuffer << anIndex << "\", ";
-    *this << aMiddlePoint;
+    myDumpBuffer << anIndex << "\", ("
+                 << aMiddlePoint->x() << ", "
+                 << aMiddlePoint->y() << ", "
+                 << aMiddlePoint->z() << ")";
     aStandardDump = false;
-  } if (myWeakNamingSelection && aShape.get() && theAttrSelect->context().get() &&
+  } else if (myWeakNamingSelection && aShape.get() && theAttrSelect->context().get() &&
        aShape != theAttrSelect->context()->shape()) { // weak naming for local selection only
     GeomAlgoAPI_NExplode aNExplode(theAttrSelect->context()->shape(), aShape->shapeType());
     int anIndex = aNExplode.index(aShape);
     if (anIndex != 0) { // found a week-naming index, so, export it
-      myDumpBuffer<<"\", \""<<theAttrSelect->context()->data()->name()<<"\", "<<anIndex;
+      myDumpBuffer<<"\", \""<<
+        theAttrSelect->contextName(theAttrSelect->context())<<"\", "<<anIndex;
       aStandardDump = false;
     }
   }