From: Paul RASCLE Date: Mon, 8 Feb 2016 13:14:37 +0000 (+0100) Subject: Python message when groups of nodes are missing X-Git-Tag: SALOME_HYDRO_V1.0~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=43f06c83878240e7c9bdc9aa33b84115c6a56022;p=modules%2Fhydro.git Python message when groups of nodes are missing --- diff --git a/src/HYDROTools/interpolZ.py b/src/HYDROTools/interpolZ.py index d803355b..268c0e35 100644 --- a/src/HYDROTools/interpolZ.py +++ b/src/HYDROTools/interpolZ.py @@ -190,6 +190,13 @@ def interpolZ(nomCas, fichierMaillage, dicoGroupeRegion, zUndef): ([maillagePlat], status) = smesh.CreateMeshesFromMED(fichierMaillage) groups = maillagePlat.GetGroups() + grpns = [grp for grp in groups if grp.GetType() == SMESH.NODE] + if len(grpns) == 0: + print "Problem! There are no groups of nodes in the mesh!" + print "Please create at least the groups of nodes corresponding to each region of the HYDRO case" + return {} + + for grp in groups: if grp.GetType() == SMESH.NODE: grpName = grp.GetName()