X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fsalome%2Fexamples%2Fquality_controls_ex02.py;h=c0394201033018c47d67b852512effdb516b76eb;hb=63879abd44911e419cdfe602c837c8884f3fbe12;hp=491c81eb49216c352769511ade77c1805dbab91a;hpb=54182913fbb9df65a3f4cc96f55db3618835ecd8;p=modules%2Fsmesh.git diff --git a/doc/salome/examples/quality_controls_ex02.py b/doc/salome/examples/quality_controls_ex02.py index 491c81eb4..c03942010 100644 --- a/doc/salome/examples/quality_controls_ex02.py +++ b/doc/salome/examples/quality_controls_ex02.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() # create open shell: a box without one plane box = geompy.MakeBox(0., 0., 0., 20., 20., 15.) @@ -33,17 +33,17 @@ aFilter = smesh.GetFilter(SMESH.EDGE, SMESH.FT_MultiConnection, SMESH.FT_EqualTo anIds = mesh.GetIdsFromFilter(aFilter) # print the result -print "Criterion: Borders at multi-connections Nb = ", len(anIds) +print("Criterion: Borders at multi-connections Nb = ", len(anIds)) j = 1 for i in range(len(anIds)): - if j > 20: j = 1; print "" - print anIds[i], + if j > 20: j = 1; print("") + print(anIds[i], end=' ') j = j + 1 pass -print "" +print("") # create a group aGroup = mesh.GetMesh().CreateGroup(SMESH.EDGE, "Borders at multi-connections") aGroup.Add(anIds) -salome.sg.updateObjBrowser(1) +salome.sg.updateObjBrowser()