X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH_SWIG%2FsmeshBuilder.py;h=77481578f21ba152fe2820dc5776aa8ddd3569b9;hp=dbbbe973b86b997aef913ba520c1968e4255f6ba;hb=ee4749bf4c09bcdf042d119912d8db447ece5a26;hpb=2246612bb539348da223b1249c65f628c2acf022 diff --git a/src/SMESH_SWIG/smeshBuilder.py b/src/SMESH_SWIG/smeshBuilder.py index dbbbe973b..77481578f 100644 --- a/src/SMESH_SWIG/smeshBuilder.py +++ b/src/SMESH_SWIG/smeshBuilder.py @@ -1596,7 +1596,7 @@ class Mesh: AssureGeomPublished( self, geom, "shape for %s" % hyp.GetName()) status = self.mesh.AddHypothesis(geom, hyp) else: - status = HYP_BAD_GEOMETRY + status = HYP_BAD_GEOMETRY,"" hyp_name = GetName( hyp ) geom_name = "" if geom: @@ -1876,7 +1876,12 @@ class Mesh: # @ingroup l2_grps_create def MakeGroupByIds(self, groupName, elementType, elemIDs): group = self.mesh.CreateGroup(elementType, groupName) - group.Add(elemIDs) + if hasattr( elemIDs, "GetIDs" ): + if hasattr( elemIDs, "SetMesh" ): + elemIDs.SetMesh( self.GetMesh() ) + group.AddFrom( elemIDs ) + else: + group.Add(elemIDs) return group ## Creates a mesh group by the given conditions @@ -3451,7 +3456,7 @@ class Mesh: ## # @brief Creates missing boundary elements around either the whole mesh or - # groups of 2D elements + # groups of elements # @param dimension - defines type of boundary elements to create # @param groupName - a name of group to store all boundary elements in, # "" means not to create the group @@ -3459,7 +3464,7 @@ class Mesh: # mesh + created boundary elements; "" means not to create the new mesh # @param toCopyAll - if true, the whole initial mesh will be copied into # the new mesh else only boundary elements will be copied into the new mesh - # @param groups - groups of 2D elements to make boundary around + # @param groups - groups of elements to make boundary around # @retval tuple( long, mesh, groups ) # long - number of added boundary elements # mesh - the mesh where elements were added to