Salome HOME
52976: Find Elements by Point - All does not find Ball element
[modules/smesh.git] / doc / salome / examples / filters_ex01.py
index 233b699a9fae0aed51653378aaed73861670cbdd..8af735e71aaed8ecfc5dc037c417d4bba0d52c94 100644 (file)
@@ -1,4 +1,5 @@
 # Aspect ratio
+# This script demonstrates various usages of filters
 
 # create mesh
 from SMESH_mechanic import *
@@ -25,3 +26,10 @@ crit = [ smesh.GetCriterion( SMESH.FACE, SMESH.FT_AspectRatio, '<', 1.5, BinaryO
 triaGroup = mesh.MakeGroupByCriteria( "Tria AR < 1.5", crit )
 print "Number of triangles with aspect ratio < 1.5:", triaGroup.Size()
 
+# get range of values of Aspect Ratio of all faces in the mesh
+aspects = mesh.GetMinMax( SMESH.FT_AspectRatio )
+print "MESH: Min aspect = %s, Max aspect = %s" % ( aspects[0], aspects[1] )
+
+# get max value of Aspect Ratio of faces in triaGroup
+grAspects = mesh.GetMinMax( SMESH.FT_AspectRatio, triaGroup )
+print "GROUP: Max aspect = %s" % grAspects[1]