From: eap Date: Fri, 11 Jan 2013 12:54:18 +0000 (+0000) Subject: improve default naming of meshes and geometry to mesh X-Git-Tag: pluginMGCleaner~180 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ab3feed3ba3950c7b50508e39d2037d8e82d9b64;p=modules%2Fsmesh.git improve default naming of meshes and geometry to mesh --- diff --git a/src/SMESH_SWIG/smeshDC.py b/src/SMESH_SWIG/smeshDC.py index 1431ff6f3..3db5c77d8 100644 --- a/src/SMESH_SWIG/smeshDC.py +++ b/src/SMESH_SWIG/smeshDC.py @@ -998,9 +998,9 @@ class Mesh: geompyD.init_geom( smeshpyD.GetCurrentStudy()) pass if name: - geo_name = name + geo_name = name + " shape" else: - geo_name = "%s_%s_for_meshing"%(self.geom.GetShapeType(), id(self.geom)%100) + geo_name = "%s_%s to mesh"%(self.geom.GetShapeType(), id(self.geom)%100) geompyD.addToStudy( self.geom, geo_name ) self.mesh = self.smeshpyD.CreateMesh(self.geom) @@ -1010,8 +1010,8 @@ class Mesh: self.mesh = self.smeshpyD.CreateEmptyMesh() if name: self.smeshpyD.SetName(self.mesh, name) - elif obj != 0 and objHasName: - self.smeshpyD.SetName(self.mesh, GetName(obj)) + elif objHasName: + self.smeshpyD.SetName(self.mesh, GetName(obj) + " mesh") if not self.geom: self.geom = self.mesh.GetShapeToMesh()