Salome HOME
bos #29171 Refactor testing procedure
[modules/smesh.git] / doc / examples / filters_ex29.py
diff --git a/doc/examples/filters_ex29.py b/doc/examples/filters_ex29.py
new file mode 100644 (file)
index 0000000..5b2b9db
--- /dev/null
@@ -0,0 +1,9 @@
+# Belong to Cylinder
+
+# create mesh
+from mechanic import *
+
+# get all faces which lie on the cylindrical face \a sub_face1
+filter = smesh_builder.GetFilter(SMESH.FACE, SMESH.FT_BelongToCylinder, sub_face1)
+ids = mesh.GetIdsFromFilter(filter)
+print("Number of faces which lie on the cylindrical surface sub_face1:", len(ids))