예제 #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())
예제 #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())