6 smesh = SMESH_mechanic.smesh
7 mesh = SMESH_mechanic.mesh
8 salome = SMESH_mechanic.salome
10 aFilterMgr = smesh.CreateFilterManager()
12 # Remove some elements to obtain free edges
13 # Criterion : AREA > 95.
16 aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Area, SMESH.FT_MoreThan, area_margin)
18 anIds = mesh.GetIdsFromFilter(aFilter)
20 mesh.RemoveElements(anIds)
22 # Criterion : Free Edges
23 aBorders = mesh.GetFreeBorders()
26 aGroupF = mesh.CreateEmptyGroup(SMESH.FACE, "Faces with free edges")
27 aGroupN = mesh.CreateEmptyGroup(SMESH.NODE, "Nodes on free edges")
29 # fill groups with elements, corresponding to the criterion
31 print "Criterion: Free edges Nb = ", len(aBorders)
32 for i in range(len(aBorders)):
34 print "Face # ", aBorder.myElemId, " : Edge between nodes (",
35 print aBorder.myPnt1, ", ", aBorder.myPnt2, ")"
37 aGroupF.Add([aBorder.myElemId])
38 aGroupN.Add([aBorder.myPnt1, aBorder.myPnt2])
40 salome.sg.updateObjBrowser(1)