From 43f06c83878240e7c9bdc9aa33b84115c6a56022 Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Mon, 8 Feb 2016 14:14:37 +0100 Subject: [PATCH] Python message when groups of nodes are missing --- src/HYDROTools/interpolZ.py | 7 +++++++ 1 file changed, 7 insertions(+) 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() -- 2.39.2