Salome HOME
Merge from V6_main 28/02/2013
[modules/smesh.git] / doc / salome / examples / filters_ex36.py
1 # Combine filters with Criterion structures using of "criteria".
2
3 # create mesh
4 from SMESH_mechanic import *
5 # get all the quadrangle faces ...
6 criterion1 = smesh.GetCriterion(smesh.FACE, smesh.FT_ElemGeomType, smesh.Geom_QUADRANGLE, smesh.FT_LogicalAND)
7 # ... AND do NOT get those from sub_face3
8 criterion2 = smesh.GetCriterion(smesh.FACE, smesh.FT_BelongToGeom, sub_face3, smesh.FT_LogicalNOT)
9 filter = smesh.CreateFilterManager().CreateFilter()
10 filter.SetCriteria([criterion1,criterion2])
11 ids = mesh.GetIdsFromFilter(filter)
12
13 myGroup = mesh.MakeGroupByIds("Quads_on_cylindrical_faces",smesh.FACE,ids)