X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FXAOPlugin%2FXAOPlugin_IOperations.cxx;h=91c0c3e4f028b94e33212c7719a2a3327c1f6861;hb=ee3393d541fb26cc63b332cb538b8c67a0067a96;hp=f77a29aae7869facb1ee759ab2627232aae642c7;hpb=001d93f1ef3a53aa9df53b3589a0c72849b22a4e;p=modules%2Fgeom.git diff --git a/src/XAOPlugin/XAOPlugin_IOperations.cxx b/src/XAOPlugin/XAOPlugin_IOperations.cxx index f77a29aae..91c0c3e4f 100644 --- a/src/XAOPlugin/XAOPlugin_IOperations.cxx +++ b/src/XAOPlugin/XAOPlugin_IOperations.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2014-2019 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -23,6 +23,7 @@ #include "XAOPlugin_IImportExport.hxx" // KERNEL includes +#include #include #include @@ -353,6 +354,7 @@ bool XAOPlugin_IOperations::ExportXAO( Handle(GEOM_Object) shape, // make a Python command GEOM::TPythonDump pd(exportFunction); + std::string convFileName = Kernel_Utils::BackSlashToSlash(fileName); pd << "exported = geompy.ExportXAO(" << shape; // list of groups @@ -379,7 +381,7 @@ bool XAOPlugin_IOperations::ExportXAO( Handle(GEOM_Object) shape, } } pd << "], "; - pd << "\"" << author << "\", \"" << fileName << "\", \"" << shapeFileName << "\")"; + pd << "\"" << author << "\", \"" << convFileName.c_str() << "\", \"" << shapeFileName << "\")"; SetErrorCode(OK); delete xaoObject; @@ -527,8 +529,6 @@ bool XAOPlugin_IOperations::ImportXAO( const char* fileName, TDF_Label freeLabel = group->GetFreeLabel(); TDataStd_Integer::Set(freeLabel, (Standard_Integer) getGroupDimension(xaoGroup)); groups->Append(group); - - function = group->GetLastFunction(); } // create the fields @@ -666,8 +666,9 @@ bool XAOPlugin_IOperations::ImportXAO( const char* fileName, pd << obj << ((i < nbFields) ? ", " : ""); } } + std::string convFileName = Kernel_Utils::BackSlashToSlash( fileName ); pd << "]"; - pd << ") = geompy.ImportXAO(\"" << fileName << "\")"; + pd << ") = geompy.ImportXAO(\"" << convFileName.c_str() << "\")"; delete xaoObject; SetErrorCode(OK);