Salome HOME
Fix wrong comments indentation
[modules/smesh.git] / src / SMESH_SWIG / SMESH_BelongToGeom.py
1 import SMESH
2 from SMESH_test1 import *
3
4 def CheckBelongToGeomFilter(theMeshGen, theMesh, theShape, theSubShape, theElemType):
5     import geompy
6     if theShape != theSubShape:
7         aName = str(theSubShape)
8         geompy.addToStudyInFather(theShape,theSubShape,aName)
9
10     theMeshGen.Compute(theMesh,theShape)
11
12     aFilterMgr = theMeshGen.CreateFilterManager()
13     aFilter = aFilterMgr.CreateFilter()
14    
15     aBelongToGeom = aFilterMgr.CreateBelongToGeom()
16     aBelongToGeom.SetGeom(theSubShape)
17     aBelongToGeom.SetElementType(theElemType)
18     
19     aFilter.SetPredicate(aBelongToGeom)
20     return aFilter.GetElementsId(theMesh)
21
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
27
28 salome.sg.updateObjBrowser(1);