From f312847d16a17aa0406ce11c2b0244fe6d407eda Mon Sep 17 00:00:00 2001 From: gdd Date: Thu, 4 Oct 2012 09:21:50 +0000 Subject: [PATCH] Fix dump of ExportCGNS, ExportGMF, CreateMeshesFromUNV and CreateMeshesFromGMF --- src/SMESH_I/SMESH_Gen_i.cxx | 4 ++-- src/SMESH_I/SMESH_Mesh_i.cxx | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index 5463bbc1f..dc47f8a84 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -961,7 +961,7 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CreateMeshesFromUNV( const char* theFileName aStudyBuilder->CommitCommand(); if ( !aSO->_is_nil() ) { // Update Python script - TPythonDump() << aSO << " = smeshgen.CreateMeshesFromUNV(r'" << theFileName << "')"; + TPythonDump() << aSO << " = " << this << ".CreateMeshesFromUNV(r'" << theFileName << "')"; } } @@ -1253,7 +1253,7 @@ SMESH_Gen_i::CreateMeshesFromGMF( const char* theFileName, aStudyBuilder->CommitCommand(); if ( !aSO->_is_nil() ) { // Update Python script - TPythonDump() << aSO << " = " << this << ".CreateMeshesFromGMF(r'" << theFileName << "')"; + TPythonDump() << "("<< aSO << ", error) = " << this << ".CreateMeshesFromGMF(r'" << theFileName << "')"; } } SMESH_Mesh_i* aServant = dynamic_cast( GetServant( aMesh ).in() ); diff --git a/src/SMESH_I/SMESH_Mesh_i.cxx b/src/SMESH_I/SMESH_Mesh_i.cxx index 2f9c47727..3bcdb181c 100644 --- a/src/SMESH_I/SMESH_Mesh_i.cxx +++ b/src/SMESH_I/SMESH_Mesh_i.cxx @@ -3025,8 +3025,8 @@ void SMESH_Mesh_i::ExportCGNS(::SMESH::SMESH_IDSource_ptr meshPart, SMESH_MeshPartDS partDS( meshPart ); _impl->ExportCGNS(file, &partDS); - TPythonDump() << _this() << ".ExportCGNS( " - << meshPart<< ", r'" << file << "', " << overwrite << ")"; + TPythonDump() << _this() << ".ExportCGNS( r'" + << file << "', " << overwrite << ", "<< meshPart<< ")"; #else THROW_SALOME_CORBA_EXCEPTION("CGNS library is unavailable", SALOME::INTERNAL_ERROR); #endif @@ -3051,7 +3051,8 @@ void SMESH_Mesh_i::ExportGMF(::SMESH::SMESH_IDSource_ptr meshPart, SMESH_MeshPartDS partDS( meshPart ); _impl->ExportGMF(file, &partDS); - TPythonDump() << _this() << ".ExportGMF( " << meshPart<< ", r'" << file << "')"; + TPythonDump() << _this() << ".ExportGMF( r'" + << file << "', "<< meshPart<< ")"; } //============================================================================= -- 2.39.2