X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fsalome%2Fexamples%2Fgrouping_elements_ex07.py;h=891ed889a7189f4793f531c76f03d80fee3c6950;hb=b582abf7fad6880971653f3764d643f6c9805b53;hp=5bcccd0c77b9f68bd57588780876a99a3e922519;hpb=9a54694a0ab1e5cbc558a35c4606ceea4f7af2ef;p=modules%2Fsmesh.git diff --git a/doc/salome/examples/grouping_elements_ex07.py b/doc/salome/examples/grouping_elements_ex07.py index 5bcccd0c7..891ed889a 100644 --- a/doc/salome/examples/grouping_elements_ex07.py +++ b/doc/salome/examples/grouping_elements_ex07.py @@ -1,30 +1,31 @@ # Cut of groups import SMESH_mechanic +import SMESH smesh = SMESH_mechanic.smesh mesh = SMESH_mechanic.mesh salome = SMESH_mechanic.salome # Criterion : AREA > 20 -aFilter = smesh.GetFilter(smesh.FACE, smesh.FT_Area, smesh.FT_MoreThan, 20.) +aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Area, SMESH.FT_MoreThan, 20.) anIds = mesh.GetIdsFromFilter(aFilter) print "Criterion: Area > 20, Nb = ", len(anIds) # create a group by adding elements with area > 20 -aGroupMain = mesh.MakeGroupByIds("Area > 20", smesh.FACE, anIds) +aGroupMain = mesh.MakeGroupByIds("Area > 20", SMESH.FACE, anIds) # Criterion : AREA < 60 -aFilter = smesh.GetFilter(smesh.FACE, smesh.FT_Area, smesh.FT_LessThan, 60.) +aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Area, SMESH.FT_LessThan, 60.) anIds = mesh.GetIdsFromFilter(aFilter) print "Criterion: Area < 60, Nb = ", len(anIds) # create a group by adding elements with area < 60 -aGroupTool = mesh.MakeGroupByIds("Area < 60", smesh.FACE, anIds) +aGroupTool = mesh.MakeGroupByIds("Area < 60", SMESH.FACE, anIds) # create a cut of groups : area >= 60 aGroupRes = mesh.CutGroups(aGroupMain, aGroupTool, "Area >= 60")