Exemple #1
0
def decimateMesh(polyData, targetReduction=0.1):
    '''
    Reduce the number of  triangles in the input mesh by targetReduction.
    0.1 = 10% reduction (if there was 100 triangles, now there will be 90)
    '''
    f = vtk.vtkDecimatePro()
    f.SetInput(polyData)
    f.SetTargetReduction(targetReduction)
    f.Update()
    return shallowCopy(f.GetOutput())
Exemple #2
0
def decimateMesh(polyData, targetReduction=0.1):
    """
    Reduce the number of  triangles in the input mesh by targetReduction.
    0.1 = 10% reduction (if there was 100 triangles, now there will be 90)
    """
    f = vtk.vtkDecimatePro()
    f.SetInputData(polyData)
    f.SetTargetReduction(targetReduction)
    f.Update()
    return shallowCopy(f.GetOutput())