From ee8a2759a55d5dc5c684647719579bfd30a241ac Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 24 Dec 2021 12:34:27 +0300 Subject: [PATCH] Set mesh name at mesh creation: mesh = smesh.Mesh( geo, NAME ) --- src/SMESH_I/SMESH_2smeshpy.cxx | 5 +++++ 1 file changed, 5 insertions(+) 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" || -- 2.39.2