Salome HOME
Set mesh name at mesh creation: mesh = smesh.Mesh( geo, NAME )
authoreap <eap@opencascade.com>
Fri, 24 Dec 2021 09:34:27 +0000 (12:34 +0300)
committereap <eap@opencascade.com>
Fri, 24 Dec 2021 09:34:27 +0000 (12:34 +0300)
src/SMESH_I/SMESH_2smeshpy.cxx

index 07b3d3399823699e3d26274f3b75a5e16b942b1b..f69c70eef5c606baa4691bdfb280b2fe8b59b91d 100644 (file)
@@ -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" ||