X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=doc%2Fsalome%2Fexamples%2Fmodifying_meshes_ex21.py;h=6aa3f230de64dfffd3db54dbbf4fa0c4c58bfbb3;hb=d9f4b53e489dd5857db264ede6acded7b076c9f1;hp=650d998e5e8014792c80e71f53add61d01bffefb;hpb=e18c7bf13376458fb15a7866f246fe376702c9fb;p=modules%2Fsmesh.git diff --git a/doc/salome/examples/modifying_meshes_ex21.py b/doc/salome/examples/modifying_meshes_ex21.py index 650d998e5..6aa3f230d 100644 --- a/doc/salome/examples/modifying_meshes_ex21.py +++ b/doc/salome/examples/modifying_meshes_ex21.py @@ -2,14 +2,14 @@ import salome -salome.salome_init() +salome.salome_init_without_session() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import SMESH_mechanic @@ -28,8 +28,8 @@ GroupSmooth = mesh.GroupOnGeom(face, "Group of faces (smooth)", SMESH.FACE) # boolean SmoothObject(Object, IDsOfFixedNodes, MaxNbOfIterations, MaxAspectRatio, Method) res = mesh.SmoothObject(GroupSmooth, [], 20, 2., smesh.CENTROIDAL_SMOOTH) -print "\nSmoothing ... ", -if not res: print "failed!" -else: print "done." +print("\nSmoothing ... ", end=' ') +if not res: print("failed!") +else: print("done.") -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser()