code: def meshQuality(actor, measure=6):
      
  
      mesh = actor.GetMapper().GetInput()
  
      qf = vtk.vtkMeshQuality()
      qf.SetInputData(mesh)
      qf.SetTriangleQualityMeasure(measure)
      qf.SaveCellQualityOn()
      qf.Update()
  
      pd = vtk.vtkPolyData()
      pd.ShallowCopy(qf.GetOutput())
  
      qactor = Actor(pd, c=None, alpha=1)
      qactor.mapper.SetScalarRange(pd.GetScalarRange())
      return qactor
docs: Calculate functions of quality of the elements of a triangular mesh.
      See class `vtkMeshQuality <https://vtk.org/doc/nightly/html/classvtkMeshQuality.html>`_
      for explaination.
  
      :param int measure: type of estimator
  
          - EDGE_RATIO, 0
          - ASPECT_RATIO, 1
          - RADIUS_RATIO, 2
          - ASPECT_FROBENIUS, 3
          - MED_ASPECT_FROBENIUS, 4
          - MAX_ASPECT_FROBENIUS, 5
          - MIN_ANGLE, 6
          - COLLAPSE_RATIO, 7
          - MAX_ANGLE, 8
          - CONDITION, 9
          - SCALED_JACOBIAN, 10
          - SHEAR, 11
          - RELATIVE_SIZE_SQUARED, 12
          - SHAPE, 13
          - SHAPE_AND_SIZE, 14
          - DISTORTION, 15
          - MAX_EDGE_RATIO, 16
          - SKEW, 17
          - TAPER, 18
          - VOLUME, 19
          - STRETCH, 20
          - DIAGONAL, 21
          - DIMENSION, 22
          - ODDY, 23
          - SHEAR_AND_SIZE, 24
          - JACOBIAN, 25
          - WARPAGE, 26
          - ASPECT_GAMMA, 27
          - AREA, 28
          - ASPECT_BETA, 29
  
      .. hint:: |meshquality| |meshquality.py|_