X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fsalome%2Fexamples%2Fgrouping_elements_ex01.py;h=013332766144e40577810032d3cf215f79bf48c4;hb=1821a9c35f90be93d3d55b1e1db9114902eaf6f8;hp=d0971d621fe0070ef946914e2ab35c0cf7862fa8;hpb=9a54694a0ab1e5cbc558a35c4606ceea4f7af2ef;p=modules%2Fsmesh.git diff --git a/doc/salome/examples/grouping_elements_ex01.py b/doc/salome/examples/grouping_elements_ex01.py index d0971d621..013332766 100644 --- a/doc/salome/examples/grouping_elements_ex01.py +++ b/doc/salome/examples/grouping_elements_ex01.py @@ -1,21 +1,22 @@ # Create a Standalone Group import SMESH_mechanic +import SMESH smesh = SMESH_mechanic.smesh mesh = SMESH_mechanic.mesh salome = SMESH_mechanic.salome # Get ids of all faces with area > 100 -aFilter = smesh.GetFilter(smesh.FACE, smesh.FT_Area, smesh.FT_MoreThan, 100.) +aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Area, SMESH.FT_MoreThan, 100.) anIds = mesh.GetIdsFromFilter(aFilter) # create a group consisting of faces with area > 100 -aGroup1 = mesh.MakeGroupByIds("Area > 100", smesh.FACE, anIds) +aGroup1 = mesh.MakeGroupByIds("Area > 100", SMESH.FACE, anIds) # create a group that contains all nodes from the mesh -aGroup2 = mesh.CreateEmptyGroup(smesh.NODE, "all nodes") +aGroup2 = mesh.CreateEmptyGroup(SMESH.NODE, "all nodes") aGroup2.AddFrom(mesh.mesh) salome.sg.updateObjBrowser(1)