2013-02-12 20:37:44 +06:00
|
|
|
# Create a Standalone Group
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
# Get ids of all faces with area > 100
|
2013-04-04 13:08:19 +06:00
|
|
|
aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Area, SMESH.FT_MoreThan, 100.)
|
2013-02-12 20:37:44 +06:00
|
|
|
|
|
|
|
anIds = mesh.GetIdsFromFilter(aFilter)
|
|
|
|
|
|
|
|
# create a group consisting of faces with area > 100
|
2013-04-04 13:08:19 +06:00
|
|
|
aGroup1 = mesh.MakeGroupByIds("Area > 100", SMESH.FACE, anIds)
|
2013-02-12 20:37:44 +06:00
|
|
|
|
|
|
|
# create a group that contains all nodes from the mesh
|
2013-04-04 13:08:19 +06:00
|
|
|
aGroup2 = mesh.CreateEmptyGroup(SMESH.NODE, "all nodes")
|
2013-02-12 20:37:44 +06:00
|
|
|
aGroup2.AddFrom(mesh.mesh)
|
|
|
|
|
|
|
|
salome.sg.updateObjBrowser(1)
|