From 2caaea5924c7e67fa927f12b643173226ee57b7a Mon Sep 17 00:00:00 2001 From: fps Date: Fri, 15 Nov 2013 12:30:32 +0000 Subject: [PATCH] Fix ImportXAO and ExportXAO python dump --- src/GEOMImpl/GEOMImpl_IInsertOperations.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/GEOMImpl/GEOMImpl_IInsertOperations.cxx b/src/GEOMImpl/GEOMImpl_IInsertOperations.cxx index 9e5998fe7..e48760f56 100644 --- a/src/GEOMImpl/GEOMImpl_IInsertOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IInsertOperations.cxx @@ -1094,7 +1094,7 @@ bool GEOMImpl_IInsertOperations::ExportXAO(Handle(GEOM_Object) shape, pd << ", " << (*itGroup++); } } - + // list of fields pd << "], ["; if (fieldList.size() > 0) @@ -1107,7 +1107,7 @@ bool GEOMImpl_IInsertOperations::ExportXAO(Handle(GEOM_Object) shape, } } pd << "], "; - pd << author << ", \"" << fileName << "\")"; + pd << "\"" << author << "\", \"" << fileName << "\")"; SetErrorCode(OK); delete xaoObject; @@ -1384,6 +1384,14 @@ bool GEOMImpl_IInsertOperations::ImportXAO(const char* fileName, pd << "], ["; // list of fields + if (nbFields > 0) + { + for (int i = 1; i <= nbFields; i++) + { + Handle(GEOM_Field) obj = Handle(GEOM_Field)::DownCast(fields->Value(i)); + pd << obj << ((i < nbFields) ? ", " : ""); + } + } pd << "]"; pd << ") = geompy.ImportXAO(\"" << fileName << "\")"; -- 2.39.2