]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Call a not published shape to mesh by name of the mesh if provided
authoreap <eap@opencascade.com>
Fri, 7 Sep 2012 14:12:35 +0000 (14:12 +0000)
committereap <eap@opencascade.com>
Fri, 7 Sep 2012 14:12:35 +0000 (14:12 +0000)
src/SMESH_SWIG/smeshDC.py

index 381d765f8c4cc16fe804ff1a74955a02d8ed8f4a..05e122a273d02ab68362a2cc5748ef2ca52c2db7 100644 (file)
@@ -975,7 +975,10 @@ class Mesh:
                     if studyID != geompyD.myStudyId:
                         geompyD.init_geom( smeshpyD.GetCurrentStudy())
                         pass
-                    geo_name = "%s_%s_for_meshing"%(self.geom.GetShapeType(), id(self.geom)%100)
+                    if name:
+                        geo_name = name
+                    else:
+                        geo_name = "%s_%s_for_meshing"%(self.geom.GetShapeType(), id(self.geom)%100)
                     geompyD.addToStudy( self.geom, geo_name )
                 self.mesh = self.smeshpyD.CreateMesh(self.geom)