Back to index

salome-smesh  6.5.0
Functions
SMESH_GroupLyingOnGeom Namespace Reference

Functions

def BuildGroupLyingOn

Function Documentation

def SMESH_GroupLyingOnGeom.BuildGroupLyingOn (   theMesh,
  theElemType,
  theName,
  theShape 
)

Definition at line 29 of file SMESH_GroupLyingOnGeom.py.

00029 
00030 def BuildGroupLyingOn(theMesh, theElemType, theName, theShape):
00031     aFilterMgr = smesh.smesh.CreateFilterManager()
00032     aFilter = aFilterMgr.CreateFilter()
00033    
00034     aLyingOnGeom = aFilterMgr.CreateLyingOnGeom()
00035     aLyingOnGeom.SetGeom(theShape)
00036     aLyingOnGeom.SetElementType(theElemType)
00037     
00038     aFilter.SetPredicate(aLyingOnGeom)
00039     anIds = aFilter.GetElementsId(theMesh)
00040     aFilterMgr.UnRegister()
00041 
00042     aGroup = theMesh.CreateGroup(theElemType, theName)
00043     aGroup.Add(anIds)
00044 
#Example