Salome HOME
Merge from PHASE_25_BR 14/11/2010
[modules/smesh.git] / doc / salome / gui / SMESH / input / tui_filters.doc
index ad6dd5929348854032739ab2051f0c6e923a0461..a736158086d12fc9c523ea6e2fcfd44542cf60aa 100755 (executable)
@@ -2,8 +2,8 @@
 
 \page tui_filters_page Filters usage
 
-Filters allows to pick only those mesh elements which satisfy to
-specific condition or set of conditions. Filters can be used to create
+Filters allow picking only the mesh elements satisfying to a
+specific condition or set of conditions. Filters can be used to create
 or edit mesh groups, remove elements from the mesh object, control
 mesh quality by different parameters, etc.
 
@@ -12,10 +12,10 @@ AND and \a OR. In addition, applied filter criterion can be reverted
 using logical operator \a NOT.
 
 Mesh filters use the functionality of mesh quality controls to filter
-mesh nodes / elements by specific characteristic (Area, Length, etc).
+mesh nodes / elements by specific characteristic (Area, Length, etc).
 
 This page provides a short description of the existing mesh filters,
-describing required parameters and gives simple examples of usage in
+describes required parameters and gives simple examples of usage in
 Python scripts.
 
 \sa \ref tui_quality_controls_page
@@ -337,6 +337,46 @@ print "Number of faces with maximum edge length > 14:", len(ids)
 
 \sa \ref tui_length_2d
 
+\section filter_max_element_length_2d Max Element Length 2D
+
+Filter 2D mesh elements (faces) corresponding to the maximum length
+value of its edges and diagonals:
+- element type should be \a smesh.FACE
+- functor type should be \a smesh.FT_MaxElementLength2D
+- threshold is floating point value (edge/diagonal length)
+
+\code
+# create mesh
+from SMESH_mechanic import *
+# get all faces that have elements with length > 10
+filter = smesh.GetFilter(smesh.FACE, smesh.FT_MaxElementLength2D, smesh.FT_MoreThan, 10)
+ids = mesh.GetIdsFromFilter(filter)
+print "Number of faces with maximum element length > 10:", len(ids)
+\endcode
+
+\sa \ref tui_max_element_length_2d
+
+\section filter_max_element_length_3d Max Element Length 3D
+
+Filter 3D mesh elements (volumes) corresponding to the maximum length
+value of its edges and diagonals:
+- element type should be \a smesh.VOLUME
+- functor type should be \a smesh.FT_MaxElementLength3D
+- threshold is floating point value (edge/diagonal length)
+
+\code
+# create mesh with volumes
+from SMESH_mechanic import *
+mesh.Tetrahedron( algo=smesh.NETGEN )
+mesh.Compute()
+# get all volumes that have elements with length > 10
+filter = smesh.GetFilter(smesh.VOLUME, smesh.FT_MaxElementLength3D, smesh.FT_MoreThan, 10)
+ids = mesh.GetIdsFromFilter(filter)
+print "Number of volumes with maximum element length > 10:", len(ids)
+\endcode
+
+\sa \ref tui_max_element_length_3d
+
 \section filter_belong_to_geom Belong to Geom
 
 Filter mesh entities (nodes or elements) which all nodes lie on the