Salome HOME
Comment out the example.
[modules/smesh.git] / src / SMESH_SWIG / SMESH_GroupLyingOnGeom.py
1 import SMESH
2
3 def BuildGroupLyingOn(theMesh, theElemType, theName, theShape):
4     aMeshGen = salome.lcc.FindOrLoadComponent("FactoryServer", "SMESH")
5
6     aFilterMgr = aMeshGen.CreateFilterManager()
7     aFilter = aFilterMgr.CreateFilter()
8    
9     aLyingOnGeom = aFilterMgr.CreateLyingOnGeom()
10     aLyingOnGeom.SetGeom(theShape)
11     aLyingOnGeom.SetElementType(theElemType)
12     
13     aFilter.SetPredicate(aLyingOnGeom)
14     anIds = aFilter.GetElementsId(theMesh)
15
16     aGroup = theMesh.CreateGroup(theElemType, theName)
17     aGroup.Add(anIds)
18
19 #Example
20 ## from SMESH_test1 import *
21
22 ## smesh.Compute(mesh, box)
23 ## BuildGroupLyingOn(mesh, SMESH.FACE, "Group of faces lying on edge", edge )
24
25 ## salome.sg.updateObjBrowser(1);