Salome HOME
Check result of Compute in examples
[modules/smesh.git] / doc / examples / transforming_meshes_ex06.py
index 2600cb7347fa476bc36113324da7419e07616912..72fd27d4037fd8de971c6665206f5bcadcec8ccc 100644 (file)
@@ -40,7 +40,7 @@ algo1D.NumberOfSegments(6)
 algo2D = trias.Triangle()
 algo2D.LengthFromEdges()
 
-trias.Compute()
+if not trias.Compute(): raise Exception("Error when computing Mesh")
 
 # create a group of all triangles currently present in the mesh
 faceTriGroup = trias.Group( face1, "face triangles" )
@@ -49,7 +49,7 @@ faceTriGroup = trias.Group( face1, "face triangles" )
 circlemesh = smesh_builder.Mesh(circle, "Path mesh")
 algo = circlemesh.Segment()
 algo.NumberOfSegments(10)
-circlemesh.Compute()
+if not circlemesh.Compute(): raise Exception("Error when computing Mesh")
 
 # extrusion of the mesh
 trias.ExtrusionAlongPath([], circlemesh, circle, 1, MakeGroups=True )