Salome HOME
Merge branch 'master' into gni/evolution
[modules/smesh.git] / src / Tools / blocFissure / gmu / mailleAretesEtJonction.py
index e208c0364b10b9aa6917f856c0edcb88b4ff347c..55e52f13441128311b8df3a5ed4dfc82292e742e 100644 (file)
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-# Copyright (C) 2014-2020  EDF R&D
+# Copyright (C) 2014-2021  EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -50,7 +50,8 @@ def mailleAretesEtJonction(internalBoundary, aretesVivesCoupees, lgAretesVives):
   # --- maillage des Ă©ventuelles arĂȘtes vives entre faces reconstruites
 
   grpAretesVives = None
-  if len(aretesVivesCoupees) > 0:
+  if aretesVivesCoupees:
+
     aretesVivesC = geompy.MakeCompound(aretesVivesCoupees)
     meshAretesVives = smesh.Mesh(aretesVivesC)
     algo1d = meshAretesVives.Segment()
@@ -58,6 +59,7 @@ def mailleAretesEtJonction(internalBoundary, aretesVivesCoupees, lgAretesVives):
     putName(algo1d.GetSubMesh(), "aretesVives")
     putName(algo1d, "algo1d_aretesVives")
     putName(hypo1d, "hypo1d_aretesVives")
+
     is_done = meshAretesVives.Compute()
     text = "meshAretesVives.Compute"
     if is_done:
@@ -66,6 +68,7 @@ def mailleAretesEtJonction(internalBoundary, aretesVivesCoupees, lgAretesVives):
       text = "Erreur au calcul du maillage.\n" + text
       logging.info(text)
       raise Exception(text)
+
     grpAretesVives = meshAretesVives.CreateEmptyGroup( SMESH.EDGE, 'grpAretesVives' )
     nbAdd = grpAretesVives.AddFrom( meshAretesVives.GetMesh() )