2013-02-12 20:37:44 +06:00
|
|
|
# Area
|
|
|
|
|
|
|
|
import SMESH_mechanic
|
2013-04-04 13:08:19 +06:00
|
|
|
import SMESH
|
2013-02-12 20:37:44 +06:00
|
|
|
|
|
|
|
smesh = SMESH_mechanic.smesh
|
|
|
|
mesh = SMESH_mechanic.mesh
|
|
|
|
salome = SMESH_mechanic.salome
|
|
|
|
|
|
|
|
# Criterion : AREA > 100.
|
|
|
|
area_margin = 100.
|
|
|
|
|
2013-04-04 13:08:19 +06:00
|
|
|
aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Area, SMESH.FT_MoreThan, area_margin)
|
2013-02-12 20:37:44 +06:00
|
|
|
|
|
|
|
anIds = mesh.GetIdsFromFilter(aFilter)
|
|
|
|
|
|
|
|
# print the result
|
|
|
|
print "Criterion: Area > ", area_margin, " Nb = ", len(anIds)
|
|
|
|
j = 1
|
|
|
|
for i in range(len(anIds)):
|
|
|
|
if j > 20: j = 1; print ""
|
|
|
|
print anIds[i],
|
|
|
|
j = j + 1
|
|
|
|
pass
|
|
|
|
print ""
|
|
|
|
|
|
|
|
# create a group
|
2013-04-04 13:08:19 +06:00
|
|
|
aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Area > " + `area_margin`)
|
2013-02-12 20:37:44 +06:00
|
|
|
aGroup.Add(anIds)
|
|
|
|
|
2016-10-06 13:20:14 +05:00
|
|
|
salome.sg.updateObjBrowser(True)
|