3 def BuildGroupLyingOn(theMesh, theElemType, theName, theShape):
4 aMeshGen = salome.lcc.FindOrLoadComponent("FactoryServer", "SMESH")
6 aFilterMgr = aMeshGen.CreateFilterManager()
7 aFilter = aFilterMgr.CreateFilter()
9 aLyingOnGeom = aFilterMgr.CreateLyingOnGeom()
10 aLyingOnGeom.SetGeom(theShape)
11 aLyingOnGeom.SetElementType(theElemType)
13 aFilter.SetPredicate(aLyingOnGeom)
14 anIds = aFilter.GetElementsId(theMesh)
16 aGroup = theMesh.CreateGroup(theElemType, theName)
20 ## from SMESH_test1 import *
22 ## smesh.Compute(mesh, box)
23 ## BuildGroupLyingOn(mesh, SMESH.FACE, "Group of faces lying on edge", edge )
25 ## salome.sg.updateObjBrowser(1);