Salome HOME
Check result of Compute() in test and examples
[modules/smesh.git] / doc / examples / creating_meshes_ex04.py
index 3298e971c0f0bc5e3d214c568fa74507fc6dcddd..405fcd9eeb6af828a92f036f22c7c9b130a4511e 100644 (file)
@@ -41,19 +41,19 @@ hyp3 = algo_local.Arithmetic1D(1, 6)
 hyp4 = algo_local.Propagation()
 
 # compute the mesh
-tria.Compute()
+if not tria.Compute(): raise Exception("Error when computing Mesh")
 PrintMeshInfo(tria)
 
 # remove a local hypothesis
 tria.RemoveHypothesis(hyp4, edge)
 
 # compute the mesh
-tria.Compute()
+if not tria.Compute(): raise Exception("Error when computing Mesh")
 PrintMeshInfo(tria)
 
 # change the value of the 2D hypothesis
 hyp2.SetMaxElementArea(2.)
 
 # compute the mesh
-tria.Compute()
+if not tria.Compute(): raise Exception("Error when computing Mesh")
 PrintMeshInfo(tria)