Salome HOME
Check result of Compute in examples
[modules/smesh.git] / doc / examples / viewing_meshes_ex02.py
index a2f2ed17a4298b9ddc9d14d742dd264950f50b2d..ddaba327bdeb77910595b05fdf05aec4fdfcb4f5 100644 (file)
@@ -16,7 +16,7 @@ box = geom_builder.MakeBoxDXDYDZ(100,100,100)
 # Create a mesh
 mesh = smesh_builder.Mesh(box,"Mesh")
 mesh.AutomaticHexahedralization()
-mesh.Compute()
+if not mesh.Compute(): raise Exception("Error when computing Mesh")
 
 # Create a point
 x,y,z = 0, 0, 1