X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fexamples%2Fcreating_meshes_ex08.py;fp=doc%2Fexamples%2Fcreating_meshes_ex08.py;h=aa671433975f3a8cd6684824793d0c9050975307;hb=1ade5b188481247c04b3cecbe8405588f78c6803;hp=71fdff73b2b8bdc127b36db231f23baecd8e22f2;hpb=d1392dc0345fb940899baa1121b9230843e47346;p=modules%2Fsmesh.git diff --git a/doc/examples/creating_meshes_ex08.py b/doc/examples/creating_meshes_ex08.py index 71fdff73b..aa6714339 100644 --- a/doc/examples/creating_meshes_ex08.py +++ b/doc/examples/creating_meshes_ex08.py @@ -20,7 +20,7 @@ localAlgo = mesh.Triangle(face) mesh.Segment().NumberOfSegments( 3 ) mesh.Quadrangle() mesh.Prism() -mesh.Compute() +if not mesh.Compute(): raise Exception("Error when computing Mesh") # objects to copy fGroup = mesh.GroupOnGeom( face, "2D on face") @@ -56,4 +56,4 @@ smallBox = geom_builder.MakeScaleAlongAxes( box, None, 1, 0.5, 0.5 ) cutBox = geom_builder.MakeCut( box, smallBox, theName="box - smallBox" ) ok, newMesh, groups, submehses, hyps, invIDs = smesh_builder.CopyMeshWithGeom( mesh, cutBox, "cutBox" ) -newMesh.Compute() +if not newMesh.Compute(): raise Exception("Error when computing Mesh")