X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fsalome%2Fexamples%2Ffilters_ex01.py;h=9ee7ce8521df9a58c1bc95032ece239dac750433;hb=9655cb578db3659e41763af22c9de67724bdd66d;hp=7de1cd33addd6c138fb1a2d1abced051f20de470;hpb=1a88a8f6658e4663f7bacfd6be57b7a3cbaa7248;p=modules%2Fsmesh.git diff --git a/doc/salome/examples/filters_ex01.py b/doc/salome/examples/filters_ex01.py index 7de1cd33a..9ee7ce852 100644 --- a/doc/salome/examples/filters_ex01.py +++ b/doc/salome/examples/filters_ex01.py @@ -15,7 +15,7 @@ ids = filter.GetIDs() print "Number of faces with aspect ratio > 1.5:", len(ids) # copy the faces with aspect ratio > 1.5 to another mesh; -# this demostrates that a filter can be used where usually a group or sub-mesh is acceptable +# this demonstrates that a filter can be used where usually a group or sub-mesh is acceptable filter.SetMesh( mesh.GetMesh() ) # - actually non necessary as mesh is set at filter creation mesh2 = smesh.CopyMesh( filter, "AR > 1.5" ) print "Number of copied faces with aspect ratio > 1.5:", mesh2.NbFaces() @@ -38,3 +38,7 @@ 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] + +# get Aspect Ratio of an element +aspect = mesh.FunctorValue( SMESH.FT_AspectRatio, ids[0] ) +print "Aspect ratio of the face %s = %s" % ( ids[0], aspect )