meshlabxml/remesh.py
def voronoi(script, hole_num=50, target_layer=None, sample_layer=None, thickness=0.5, backward=True):
    """ Turn a model into a surface with Voronoi style holes in it

    References:
    http://meshlabstuff.blogspot.com/2009/03/creating-voronoi-sphere.html
    http://meshlabstuff.blogspot.com/2009/04/creating-voronoi-sphere-2.html

    Requires FilterScript object

    Args:
        script: the FilterScript object to write the filter to. Does not
            work with a script filename.

    Layer stack:
        No impacts

    MeshLab versions:
        2016.12
        1.3.4BETA
    """

    if target_layer is None:
        target_layer = script.current_layer()
    if sample_layer is None:
        # Current layer is currently not changed after poisson_disk is run
        sampling.poisson_disk(script, sample_num=hole_num)
        sample_layer = script.last_layer()

    vert_color.voronoi(script, target_layer=target_layer, source_layer=sample_layer, backward=backward)
    select.vert_quality(script, min_quality=0.0, max_quality=thickness)
    if backward:
        select.invert(script)
    delete.selected(script)
    smooth.laplacian(script, iterations=3)

    return None
def voronoi(script, hole_num=50, target_layer=None, sample_layer=None, thickness=0.5, backward=True):
    if target_layer is None:
        target_layer = script.current_layer()
    if sample_layer is None:
        # Current layer is currently not changed after poisson_disk is run
        sampling.poisson_disk(script, sample_num=hole_num)
        sample_layer = script.last_layer()

    vert_color.voronoi(script, target_layer=target_layer, source_layer=sample_layer, backward=backward)
    select.vert_quality(script, min_quality=0.0, max_quality=thickness)
    if backward:
        select.invert(script)
    delete.selected(script)
    smooth.laplacian(script, iterations=3)

    return None
def voronoi ( script , hole_num = 50 , target_layer = None , sample_layer = None , thickness = 0.5 , backward = True ) : if target_layer is None : target_layer = script . current_layer ( ) if sample_layer is None : # Current layer is currently not changed after poisson_disk is run sampling . poisson_disk ( script , sample_num = hole_num ) sample_layer = script . last_layer ( ) vert_color . voronoi ( script , target_layer = target_layer , source_layer = sample_layer , backward = backward ) select . vert_quality ( script , min_quality = 0.0 , max_quality = thickness ) if backward : select . invert ( script ) delete . selected ( script ) smooth . laplacian ( script , iterations = 3 ) return None
Turn a model into a surface with Voronoi style holes in it

    References:
    http://meshlabstuff.blogspot.com/2009/03/creating-voronoi-sphere.html
    http://meshlabstuff.blogspot.com/2009/04/creating-voronoi-sphere-2.html

    Requires FilterScript object

    Args:
        script: the FilterScript object to write the filter to. Does not
            work with a script filename.

    Layer stack:
        No impacts

    MeshLab versions:
        2016.12
        1.3.4BETA
Turn a model into a surface with Voronoi style holes in it