meshlabxml/remesh.py
def surface_poisson(script, octree_depth=10, solver_divide=8,
                    samples_per_node=1.0, offset=1.0):
    """ Use the points and normals to build a surface using the Poisson
        Surface reconstruction approach.

    Args:
        script: the FilterScript object or script filename to write
            the filter to.
        octree_depth (int): Set the depth of the Octree used for extracting the
            final surface. Suggested range 5..10. Higher numbers mean higher
            precision in the reconstruction but also higher processing times.
            Be patient.
        solver_divide (int): This integer argument specifies the depth at which
            a block Gauss-Seidel solver is used to solve the Laplacian
            equation. Using this parameter helps reduce the memory overhead at
            the cost of a small increase in reconstruction time. In practice,
            the authors have found that for reconstructions of depth 9 or
            higher a subdivide depth of 7 or 8 can reduce the memory usage. The
            default value is 8.
        samples_per_node (float): This floating point value specifies the
            minimum number of sample points that should fall within an octree
            node as the octree&#xa;construction is adapted to sampling density.
            For noise-free samples, small values in the range [1.0 - 5.0] can
            be used. For more noisy samples, larger values in the range
            [15.0 - 20.0] may be needed to provide a smoother, noise-reduced,
            reconstruction. The default value is 1.0.
        offset (float): This floating point value specifies a correction value
            for the isosurface threshold that is chosen. Values less than 1
            mean internal offsetting, greater than 1 mean external offsetting.
            Good values are in the range 0.5 .. 2. The default value is 1.0
            (no offsetting).

    Layer stack:
        Creates 1 new layer 'Poisson mesh'
        Current layer is changed to new layer

    MeshLab versions:
        1.3.4BETA
    """
    filter_xml = ''.join([
        '  <filter name="Surface Reconstruction: Poisson">\n',
        '    <Param name="OctDepth" ',
        'value="{:d}" '.format(octree_depth),
        'description="Octree Depth" ',
        'type="RichInt" ',
        '/>\n',
        '    <Param name="SolverDivide" ',
        'value="{:d}" '.format(solver_divide),
        'description="Solver Divide" ',
        'type="RichInt" ',
        '/>\n',
        '    <Param name="SamplesPerNode" ',
        'value="{}" '.format(samples_per_node),
        'description="Samples per Node" ',
        'type="RichFloat" ',
        '/>\n',
        '    <Param name="Offset" ',
        'value="{}" '.format(offset),
        'description="Surface offsetting" ',
        'type="RichFloat" ',
        '/>\n',
        '  </filter>\n'])
    util.write_filter(script, filter_xml)
    if isinstance(script, FilterScript):
        script.add_layer('Poisson mesh', change_layer=True)
    return None
def surface_poisson(script, octree_depth=10, solver_divide=8,
                    samples_per_node=1.0, offset=1.0):
    """ Use the points and normals to build a surface using the Poisson
        Surface reconstruction approach.

    Args:
        script: the FilterScript object or script filename to write
            the filter to.
        octree_depth (int): Set the depth of the Octree used for extracting the
            final surface. Suggested range 5..10. Higher numbers mean higher
            precision in the reconstruction but also higher processing times.
            Be patient.
        solver_divide (int): This integer argument specifies the depth at which
            a block Gauss-Seidel solver is used to solve the Laplacian
            equation. Using this parameter helps reduce the memory overhead at
            the cost of a small increase in reconstruction time. In practice,
            the authors have found that for reconstructions of depth 9 or
            higher a subdivide depth of 7 or 8 can reduce the memory usage. The
            default value is 8.
        samples_per_node (float): This floating point value specifies the
            minimum number of sample points that should fall within an octree
            node as the octree&#xa;construction is adapted to sampling density.
            For noise-free samples, small values in the range [1.0 - 5.0] can
            be used. For more noisy samples, larger values in the range
            [15.0 - 20.0] may be needed to provide a smoother, noise-reduced,
            reconstruction. The default value is 1.0.
        offset (float): This floating point value specifies a correction value
            for the isosurface threshold that is chosen. Values less than 1
            mean internal offsetting, greater than 1 mean external offsetting.
            Good values are in the range 0.5 .. 2. The default value is 1.0
            (no offsetting).

    Layer stack:
        Creates 1 new layer 'Poisson mesh'
        Current layer is changed to new layer

    MeshLab versions:
        1.3.4BETA
    """
    filter_xml = ''.join([
        '  <filter name="Surface Reconstruction: Poisson">\n',
        '    <Param name="OctDepth" ',
        'value="{:d}" '.format(octree_depth),
        'description="Octree Depth" ',
        'type="RichInt" ',
        '/>\n',
        '    <Param name="SolverDivide" ',
        'value="{:d}" '.format(solver_divide),
        'description="Solver Divide" ',
        'type="RichInt" ',
        '/>\n',
        '    <Param name="SamplesPerNode" ',
        'value="{}" '.format(samples_per_node),
        'description="Samples per Node" ',
        'type="RichFloat" ',
        '/>\n',
        '    <Param name="Offset" ',
        'value="{}" '.format(offset),
        'description="Surface offsetting" ',
        'type="RichFloat" ',
        '/>\n',
        '  </filter>\n'])
    util.write_filter(script, filter_xml)
    if isinstance(script, FilterScript):
        script.add_layer('Poisson mesh', change_layer=True)
    return None
def surface_poisson ( script , octree_depth = 10 , solver_divide = 8 , samples_per_node = 1.0 , offset = 1.0 ) : filter_xml = '' . join ( [ '  <filter name="Surface Reconstruction: Poisson">\n' , '    <Param name="OctDepth" ' , 'value="{:d}" ' . format ( octree_depth ) , 'description="Octree Depth" ' , 'type="RichInt" ' , '/>\n' , '    <Param name="SolverDivide" ' , 'value="{:d}" ' . format ( solver_divide ) , 'description="Solver Divide" ' , 'type="RichInt" ' , '/>\n' , '    <Param name="SamplesPerNode" ' , 'value="{}" ' . format ( samples_per_node ) , 'description="Samples per Node" ' , 'type="RichFloat" ' , '/>\n' , '    <Param name="Offset" ' , 'value="{}" ' . format ( offset ) , 'description="Surface offsetting" ' , 'type="RichFloat" ' , '/>\n' , '  </filter>\n' ] ) util . write_filter ( script , filter_xml ) if isinstance ( script , FilterScript ) : script . add_layer ( 'Poisson mesh' , change_layer = True ) return None
Use the points and normals to build a surface using the Poisson
        Surface reconstruction approach.

    Args:
        script: the FilterScript object or script filename to write
            the filter to.
        octree_depth (int): Set the depth of the Octree used for extracting the
            final surface. Suggested range 5..10. Higher numbers mean higher
            precision in the reconstruction but also higher processing times.
            Be patient.
        solver_divide (int): This integer argument specifies the depth at which
            a block Gauss-Seidel solver is used to solve the Laplacian
            equation. Using this parameter helps reduce the memory overhead at
            the cost of a small increase in reconstruction time. In practice,
            the authors have found that for reconstructions of depth 9 or
            higher a subdivide depth of 7 or 8 can reduce the memory usage. The
            default value is 8.
        samples_per_node (float): This floating point value specifies the
            minimum number of sample points that should fall within an octree
            node as the octree&#xa;construction is adapted to sampling density.
            For noise-free samples, small values in the range [1.0 - 5.0] can
            be used. For more noisy samples, larger values in the range
            [15.0 - 20.0] may be needed to provide a smoother, noise-reduced,
            reconstruction. The default value is 1.0.
        offset (float): This floating point value specifies a correction value
            for the isosurface threshold that is chosen. Values less than 1
            mean internal offsetting, greater than 1 mean external offsetting.
            Good values are in the range 0.5 .. 2. The default value is 1.0
            (no offsetting).

    Layer stack:
        Creates 1 new layer 'Poisson mesh'
        Current layer is changed to new layer

    MeshLab versions:
        1.3.4BETA
Use the points and normals to build a surface using the Poisson Surface reconstruction approach .