From c8b155a155cbb4507a24343747ad820819e6aa02 Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 18 Dec 2012 17:49:25 +0000 Subject: [PATCH] Add an arg to Concatenate() specifying a name of a new mesh --- src/SMESH_SWIG/smeshDC.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/SMESH_SWIG/smeshDC.py b/src/SMESH_SWIG/smeshDC.py index 4f0040c70..04b801399 100644 --- a/src/SMESH_SWIG/smeshDC.py +++ b/src/SMESH_SWIG/smeshDC.py @@ -520,8 +520,10 @@ class smeshDC(SMESH._objref_SMESH_Gen): # @param mergeNodesAndElements if true, equal nodes and elements aremerged # @param mergeTolerance tolerance for merging nodes # @param allGroups forces creation of groups of all elements + # @param name name of a new mesh def Concatenate( self, meshes, uniteIdenticalGroups, - mergeNodesAndElements = False, mergeTolerance = 1e-5, allGroups = False): + mergeNodesAndElements = False, mergeTolerance = 1e-5, allGroups = False, + name = ""): if not meshes: return None for i,m in enumerate(meshes): if isinstance(m, Mesh): @@ -534,7 +536,7 @@ class smeshDC(SMESH._objref_SMESH_Gen): else: aSmeshMesh = SMESH._objref_SMESH_Gen.Concatenate( self,meshes,uniteIdenticalGroups,mergeNodesAndElements,mergeTolerance) - aMesh = Mesh(self, self.geompyD, aSmeshMesh) + aMesh = Mesh(self, self.geompyD, aSmeshMesh, name=name) return aMesh ## Create a mesh by copying a part of another mesh. @@ -1003,7 +1005,7 @@ class Mesh: self.SetMesh(obj) else: self.mesh = self.smeshpyD.CreateEmptyMesh() - if name != 0: + if name: self.smeshpyD.SetName(self.mesh, name) elif obj != 0 and objHasName: self.smeshpyD.SetName(self.mesh, GetName(obj)) -- 2.39.2