def decimateMesh(polyData, targetReduction=0.1):
    f = vtk.vtkDecimatePro()
    f.SetInput(polyData)
    f.SetTargetReduction(targetReduction)
    f.Update()
    return shallowCopy(f.GetOutput())
Reduce the number of  triangles in the input mesh by targetReduction.
dataset/ETHPy150Open RobotLocomotion/director/src/python/director/filterUtils.py/decimateMesh