X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fexamples%2Fcreating_meshes_ex02.py;h=bb03588378d392f487a3a938f83ac4f9874387e2;hb=796122663b68ea1cee8c90033398a34d93518d39;hp=676708c68e51b46b630c0b4b56aad2d5f576abc6;hpb=7fe1146f763ec80776fca02aac97bec8c3997b87;p=modules%2Fsmesh.git diff --git a/doc/examples/creating_meshes_ex02.py b/doc/examples/creating_meshes_ex02.py index 676708c68..bb0358837 100644 --- a/doc/examples/creating_meshes_ex02.py +++ b/doc/examples/creating_meshes_ex02.py @@ -52,11 +52,11 @@ mesh.Hexahedron() surfaces = geom_builder.SubShapeAll(box, geom_builder.ShapeType["FACE"]) # method 1: no sub-mesh is created -mesh.Compute( surfaces[0] ) +if not mesh.Compute( surfaces[0] ): raise Exception("Error when computing Mesh") # method 2: a sub-mesh is created submesh = mesh.GetSubMesh( surfaces[2], "submesh 2" ) -submesh.Compute() +if not submesh.Compute(): raise Exception("Error when computing Mesh") # compute the whole mesh -mesh.Compute() +if not mesh.Compute(): raise Exception("Error when computing Mesh")