Salome HOME
Contrôle des calculs de maillage
[modules/smesh.git] / src / Tools / blocFissure / gmu / mailleAretesEtJonction.py
index 479d8bf2d329548c369498d673d2b69643b62044..e208c0364b10b9aa6917f856c0edcb88b4ff347c 100644 (file)
@@ -25,7 +25,7 @@ from .geomsmesh import smesh
 import SMESH
 
 from .putName import putName
-  
+
 def mailleAretesEtJonction(internalBoundary, aretesVivesCoupees, lgAretesVives):
   """
   edges de bord, faces défaut à respecter
@@ -48,7 +48,7 @@ def mailleAretesEtJonction(internalBoundary, aretesVivesCoupees, lgAretesVives):
   nbAdd = skinFaces.AddFrom( internalBoundary.GetMesh() )
 
   # --- maillage des éventuelles arêtes vives entre faces reconstruites
-  
+
   grpAretesVives = None
   if len(aretesVivesCoupees) > 0:
     aretesVivesC = geompy.MakeCompound(aretesVivesCoupees)
@@ -58,9 +58,15 @@ def mailleAretesEtJonction(internalBoundary, aretesVivesCoupees, lgAretesVives):
     putName(algo1d.GetSubMesh(), "aretesVives")
     putName(algo1d, "algo1d_aretesVives")
     putName(hypo1d, "hypo1d_aretesVives")
-    isDone = meshAretesVives.Compute()
-    logging.info("aretesVives fini")
+    is_done = meshAretesVives.Compute()
+    text = "meshAretesVives.Compute"
+    if is_done:
+      logging.info(text+" OK")
+    else:
+      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() )
 
-  return (internalBoundary, bordsLibres, grpAretesVives)
\ No newline at end of file
+  return (internalBoundary, bordsLibres, grpAretesVives)