2 from SMESH_test1 import *
4 def CheckBelongToGeomFilter(theMeshGen, theMesh, theShape, theSubShape, theElemType):
6 if theShape != theSubShape:
7 aName = str(theSubShape)
8 geompy.addToStudyInFather(theShape,theSubShape,aName)
10 theMeshGen.Compute(theMesh,theShape)
12 aFilterMgr = theMeshGen.CreateFilterManager()
13 aFilter = aFilterMgr.CreateFilter()
15 aBelongToGeom = aFilterMgr.CreateBelongToGeom()
16 aBelongToGeom.SetGeom(theSubShape)
17 aBelongToGeom.SetElementType(theElemType)
19 aFilter.SetPredicate(aBelongToGeom)
20 return aFilter.GetElementsId(theMesh)
22 anElemType = SMESH.ALL;
23 print "anElemType =", anElemType
24 #anIds = CheckBelongToGeomFilter(smesh,mesh,box,subShapeList[1],SMESH.FACE)
25 anIds = CheckBelongToGeomFilter(smesh,mesh,box,box,SMESH.FACE)
26 print "anIds = ", anIds
28 salome.sg.updateObjBrowser(1);