From: eap Date: Fri, 24 Dec 2021 09:34:27 +0000 (+0300) Subject: Set mesh name at mesh creation: mesh = smesh.Mesh( geo, NAME ) X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ee8a2759a55d5dc5c684647719579bfd30a241ac;p=modules%2Fsmesh.git Set mesh name at mesh creation: mesh = smesh.Mesh( geo, NAME ) --- diff --git a/src/SMESH_I/SMESH_2smeshpy.cxx b/src/SMESH_I/SMESH_2smeshpy.cxx index 07b3d3399..f69c70eef 100644 --- a/src/SMESH_I/SMESH_2smeshpy.cxx +++ b/src/SMESH_I/SMESH_2smeshpy.cxx @@ -1013,6 +1013,11 @@ void _pyGen::Process( const Handle(_pyCommand)& theCommand ) { Handle(_pyMesh) mesh = new _pyMesh( theCommand ); AddObject( mesh ); + // set mesh name + _pyID id = mesh->GetID(), comma("'"); + if ( myObjectNames.IsBound( id )) + theCommand->SetArg( theCommand->GetNbArgs() + 1, + comma + myObjectNames( id ) + comma); return; } if ( method == "CreateMeshesFromUNV" ||