X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fsalome%2Fexamples%2Fquality_controls_ex22.py;h=131091f8cc5ff0e787bf11bbfd97c0ad077d0b6c;hb=48b83422af7a5230409e39f4f2ece322b199128b;hp=5264b1ade63072cd3985f8ed5d95e8b7f82e7601;hpb=9a54694a0ab1e5cbc558a35c4606ceea4f7af2ef;p=modules%2Fsmesh.git diff --git a/doc/salome/examples/quality_controls_ex22.py b/doc/salome/examples/quality_controls_ex22.py index 5264b1ade..131091f8c 100644 --- a/doc/salome/examples/quality_controls_ex22.py +++ b/doc/salome/examples/quality_controls_ex22.py @@ -1,6 +1,7 @@ # Element Diameter 3D import SMESH_mechanic_tetra +import SMESH smesh = SMESH_mechanic_tetra.smesh mesh = SMESH_mechanic_tetra.mesh @@ -9,22 +10,22 @@ salome = SMESH_mechanic_tetra.salome # Criterion : ELEMENT DIAMETER 3D > 10 mel_3d_margin = 10 -aFilter = smesh.GetFilter(smesh.FACE, smesh.FT_MaxElementLength3D, smesh.FT_MoreThan, mel_3d_margin) +aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_MaxElementLength3D, SMESH.FT_MoreThan, mel_3d_margin) anIds = mesh.GetIdsFromFilter(aFilter) # print the result -print "Criterion: Element Diameter 3D Ratio > ", mel_3d_margin, " Nb = ", len(anIds) +print("Criterion: Element Diameter 3D Ratio > ", mel_3d_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, "Element Diameter 3D > " + `mel_3d_margin`) +aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Element Diameter 3D > " + repr(mel_3d_margin)) aGroup.Add(anIds) -salome.sg.updateObjBrowser(1) +salome.sg.updateObjBrowser()