X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=doc%2Fsalome%2Fexamples%2Fquality_controls_ex18.py;h=9f6f7a3f333829dfd0e9f80f205ea364d7cc0a83;hp=42e4b30e8aa2c6635edd8348cffea3d8a109fb2c;hb=8d297d6698f361d4f2dde723050bcfbaea050920;hpb=9a54694a0ab1e5cbc558a35c4606ceea4f7af2ef diff --git a/doc/salome/examples/quality_controls_ex18.py b/doc/salome/examples/quality_controls_ex18.py index 42e4b30e8..9f6f7a3f3 100644 --- a/doc/salome/examples/quality_controls_ex18.py +++ b/doc/salome/examples/quality_controls_ex18.py @@ -1,6 +1,7 @@ # Skew import SMESH_mechanic +import SMESH smesh = SMESH_mechanic.smesh mesh = SMESH_mechanic.mesh @@ -9,22 +10,22 @@ salome = SMESH_mechanic.salome # Criterion : Skew > 38. skew_margin = 38. -aFilter = smesh.GetFilter(smesh.FACE, smesh.FT_Skew, smesh.FT_MoreThan, skew_margin) +aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Skew, SMESH.FT_MoreThan, skew_margin) anIds = mesh.GetIdsFromFilter(aFilter) # print the result -print "Criterion: Skew > ", skew_margin, " Nb = ", len(anIds) +print("Criterion: Skew > ", skew_margin, " 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.CreateEmptyGroup(smesh.FACE, "Skew > " + `skew_margin`) +aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Skew > " + repr(skew_margin)) aGroup.Add(anIds) -salome.sg.updateObjBrowser(1) +salome.sg.updateObjBrowser()