Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 import salome
00025 import smesh
00026
00027 smesh.SetCurrentStudy(salome.myStudy)
00028
00029 def BuildGroupLyingOn(theMesh, theElemType, theName, theShape):
00030 aFilterMgr = smesh.smesh.CreateFilterManager()
00031 aFilter = aFilterMgr.CreateFilter()
00032
00033 aLyingOnGeom = aFilterMgr.CreateLyingOnGeom()
00034 aLyingOnGeom.SetGeom(theShape)
00035 aLyingOnGeom.SetElementType(theElemType)
00036
00037 aFilter.SetPredicate(aLyingOnGeom)
00038 anIds = aFilter.GetElementsId(theMesh)
00039 aFilterMgr.UnRegister()
00040
00041 aGroup = theMesh.CreateGroup(theElemType, theName)
00042 aGroup.Add(anIds)
00043
00044
00045 from SMESH_test1 import *
00046
00047 mesh.Compute()
00048
00049
00050 BuildGroupLyingOn(mesh.GetMesh(), smesh.FACE, "Group of faces lying on edge #1", edge )
00051
00052
00053 mesh.MakeGroup("Group of faces lying on edge #2", smesh.FACE, smesh.FT_LyingOnGeom, edge)
00054
00055 salome.sg.updateObjBrowser(1);