partition
stringclasses
3 values
func_name
stringlengths
1
134
docstring
stringlengths
1
46.9k
path
stringlengths
4
223
original_string
stringlengths
75
104k
code
stringlengths
75
104k
docstring_tokens
listlengths
1
1.97k
repo
stringlengths
7
55
language
stringclasses
1 value
url
stringlengths
87
315
code_tokens
listlengths
19
28.4k
sha
stringlengths
40
40
test
plane_hires_edges
Creates a plane with a specified number of vertices on it sides, but no vertices on the interior. Currently used to create a simpler bottom for cube_hires.
meshlabxml/create.py
def plane_hires_edges(script, size=1.0, x_segments=1, y_segments=1, center=False, color=None): """ Creates a plane with a specified number of vertices on it sides, but no vertices on the interior. Currently used to create a simpler bottom for cube_hires. """ size = util.make_...
def plane_hires_edges(script, size=1.0, x_segments=1, y_segments=1, center=False, color=None): """ Creates a plane with a specified number of vertices on it sides, but no vertices on the interior. Currently used to create a simpler bottom for cube_hires. """ size = util.make_...
[ "Creates", "a", "plane", "with", "a", "specified", "number", "of", "vertices", "on", "it", "sides", "but", "no", "vertices", "on", "the", "interior", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/create.py#L510-L583
[ "def", "plane_hires_edges", "(", "script", ",", "size", "=", "1.0", ",", "x_segments", "=", "1", ",", "y_segments", "=", "1", ",", "center", "=", "False", ",", "color", "=", "None", ")", ":", "size", "=", "util", ".", "make_list", "(", "size", ",", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
cube_hires
Create a box with user defined number of segments in each direction. Grid spacing is the same as its dimensions (spacing = 1) and its thickness is one. Intended to be used for e.g. deforming using functions or a height map (lithopanes) and can be resized after creation. Warnings: function uses layers....
meshlabxml/create.py
def cube_hires(script, size=1.0, x_segments=1, y_segments=1, z_segments=1, simple_bottom=True, center=False, color=None): """Create a box with user defined number of segments in each direction. Grid spacing is the same as its dimensions (spacing = 1) and its thickness is one. Intended to be ...
def cube_hires(script, size=1.0, x_segments=1, y_segments=1, z_segments=1, simple_bottom=True, center=False, color=None): """Create a box with user defined number of segments in each direction. Grid spacing is the same as its dimensions (spacing = 1) and its thickness is one. Intended to be ...
[ "Create", "a", "box", "with", "user", "defined", "number", "of", "segments", "in", "each", "direction", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/create.py#L590-L648
[ "def", "cube_hires", "(", "script", ",", "size", "=", "1.0", ",", "x_segments", "=", "1", ",", "y_segments", "=", "1", ",", "z_segments", "=", "1", ",", "simple_bottom", "=", "True", ",", "center", "=", "False", ",", "color", "=", "None", ")", ":", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
annulus_hires
Create a cylinder with user defined number of segments
meshlabxml/create.py
def annulus_hires(script, radius=None, radius1=None, radius2=None, diameter=None, diameter1=None, diameter2=None, cir_segments=48, rad_segments=1, color=None): """Create a cylinder with user defined number of segments """ if radius is not None and diameter is None: ...
def annulus_hires(script, radius=None, radius1=None, radius2=None, diameter=None, diameter1=None, diameter2=None, cir_segments=48, rad_segments=1, color=None): """Create a cylinder with user defined number of segments """ if radius is not None and diameter is None: ...
[ "Create", "a", "cylinder", "with", "user", "defined", "number", "of", "segments" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/create.py#L651-L685
[ "def", "annulus_hires", "(", "script", ",", "radius", "=", "None", ",", "radius1", "=", "None", ",", "radius2", "=", "None", ",", "diameter", "=", "None", ",", "diameter1", "=", "None", ",", "diameter2", "=", "None", ",", "cir_segments", "=", "48", ","...
177cce21e92baca500f56a932d66bd9a33257af8
test
tube_hires
Create a cylinder with user defined number of segments
meshlabxml/create.py
def tube_hires(script, height=1.0, radius=None, radius1=None, radius2=None, diameter=None, diameter1=None, diameter2=None, cir_segments=32, rad_segments=1, height_segments=1, center=False, simple_bottom=False, color=None): """Create a cylinder with user defined number of...
def tube_hires(script, height=1.0, radius=None, radius1=None, radius2=None, diameter=None, diameter1=None, diameter2=None, cir_segments=32, rad_segments=1, height_segments=1, center=False, simple_bottom=False, color=None): """Create a cylinder with user defined number of...
[ "Create", "a", "cylinder", "with", "user", "defined", "number", "of", "segments" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/create.py#L688-L758
[ "def", "tube_hires", "(", "script", ",", "height", "=", "1.0", ",", "radius", "=", "None", ",", "radius1", "=", "None", ",", "radius2", "=", "None", ",", "diameter", "=", "None", ",", "diameter1", "=", "None", ",", "diameter2", "=", "None", ",", "cir...
177cce21e92baca500f56a932d66bd9a33257af8
test
color_values
Read color_names.txt and find the red, green, and blue values for a named color.
meshlabxml/util.py
def color_values(color): """Read color_names.txt and find the red, green, and blue values for a named color. """ # Get the directory where this script file is located: this_dir = os.path.dirname( os.path.realpath( inspect.getsourcefile( lambda: 0))) color_...
def color_values(color): """Read color_names.txt and find the red, green, and blue values for a named color. """ # Get the directory where this script file is located: this_dir = os.path.dirname( os.path.realpath( inspect.getsourcefile( lambda: 0))) color_...
[ "Read", "color_names", ".", "txt", "and", "find", "the", "red", "green", "and", "blue", "values", "for", "a", "named", "color", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/util.py#L41-L66
[ "def", "color_values", "(", "color", ")", ":", "# Get the directory where this script file is located:", "this_dir", "=", "os", ".", "path", ".", "dirname", "(", "os", ".", "path", ".", "realpath", "(", "inspect", ".", "getsourcefile", "(", "lambda", ":", "0", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
check_list
Check if a variable is a list and is the correct length. If variable is not a list it will make it a list of the correct length with all terms identical.
meshlabxml/util.py
def check_list(var, num_terms): """ Check if a variable is a list and is the correct length. If variable is not a list it will make it a list of the correct length with all terms identical. """ if not isinstance(var, list): if isinstance(var, tuple): var = list(var) else...
def check_list(var, num_terms): """ Check if a variable is a list and is the correct length. If variable is not a list it will make it a list of the correct length with all terms identical. """ if not isinstance(var, list): if isinstance(var, tuple): var = list(var) else...
[ "Check", "if", "a", "variable", "is", "a", "list", "and", "is", "the", "correct", "length", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/util.py#L69-L87
[ "def", "check_list", "(", "var", ",", "num_terms", ")", ":", "if", "not", "isinstance", "(", "var", ",", "list", ")", ":", "if", "isinstance", "(", "var", ",", "tuple", ")", ":", "var", "=", "list", "(", "var", ")", "else", ":", "var", "=", "[", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
make_list
Make a variable a list if it is not already If variable is not a list it will make it a list of the correct length with all terms identical.
meshlabxml/util.py
def make_list(var, num_terms=1): """ Make a variable a list if it is not already If variable is not a list it will make it a list of the correct length with all terms identical. """ if not isinstance(var, list): if isinstance(var, tuple): var = list(var) else: ...
def make_list(var, num_terms=1): """ Make a variable a list if it is not already If variable is not a list it will make it a list of the correct length with all terms identical. """ if not isinstance(var, list): if isinstance(var, tuple): var = list(var) else: ...
[ "Make", "a", "variable", "a", "list", "if", "it", "is", "not", "already" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/util.py#L90-L104
[ "def", "make_list", "(", "var", ",", "num_terms", "=", "1", ")", ":", "if", "not", "isinstance", "(", "var", ",", "list", ")", ":", "if", "isinstance", "(", "var", ",", "tuple", ")", ":", "var", "=", "list", "(", "var", ")", "else", ":", "var", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
write_filter
Write filter to FilterScript object or filename Args: script (FilterScript object or filename str): the FilterScript object or script filename to write the filter to. filter_xml (str): the xml filter string
meshlabxml/util.py
def write_filter(script, filter_xml): """ Write filter to FilterScript object or filename Args: script (FilterScript object or filename str): the FilterScript object or script filename to write the filter to. filter_xml (str): the xml filter string """ if isinstance(script,...
def write_filter(script, filter_xml): """ Write filter to FilterScript object or filename Args: script (FilterScript object or filename str): the FilterScript object or script filename to write the filter to. filter_xml (str): the xml filter string """ if isinstance(script,...
[ "Write", "filter", "to", "FilterScript", "object", "or", "filename" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/util.py#L107-L124
[ "def", "write_filter", "(", "script", ",", "filter_xml", ")", ":", "if", "isinstance", "(", "script", ",", "mlx", ".", "FilterScript", ")", ":", "script", ".", "filters", ".", "append", "(", "filter_xml", ")", "elif", "isinstance", "(", "script", ",", "s...
177cce21e92baca500f56a932d66bd9a33257af8
test
ls3loop
Apply LS3 Subdivision Surface algorithm using Loop's weights. This refinement method take normals into account. See: Boye', S. Guennebaud, G. & Schlick, C. "Least squares subdivision surfaces" Computer Graphics Forum, 2010. Alternatives weighting schemes are based on the paper: Barthe, L. & Ko...
meshlabxml/subdivide.py
def ls3loop(script, iterations=1, loop_weight=0, edge_threshold=0, selected=False): """ Apply LS3 Subdivision Surface algorithm using Loop's weights. This refinement method take normals into account. See: Boye', S. Guennebaud, G. & Schlick, C. "Least squares subdivision surfaces" Comput...
def ls3loop(script, iterations=1, loop_weight=0, edge_threshold=0, selected=False): """ Apply LS3 Subdivision Surface algorithm using Loop's weights. This refinement method take normals into account. See: Boye', S. Guennebaud, G. & Schlick, C. "Least squares subdivision surfaces" Comput...
[ "Apply", "LS3", "Subdivision", "Surface", "algorithm", "using", "Loop", "s", "weights", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/subdivide.py#L67-L136
[ "def", "ls3loop", "(", "script", ",", "iterations", "=", "1", ",", "loop_weight", "=", "0", ",", "edge_threshold", "=", "0", ",", "selected", "=", "False", ")", ":", "filter_xml", "=", "''", ".", "join", "(", "[", "' <filter name=\"Subdivision Surfaces: LS3...
177cce21e92baca500f56a932d66bd9a33257af8
test
merge_vert
Merge together all the vertices that are nearer than the specified threshold. Like a unify duplicate vertices but with some tolerance. Args: script: the FilterScript object or script filename to write the filter to. threshold (float): Merging distance. All the vertices that are clos...
meshlabxml/clean.py
def merge_vert(script, threshold=0.0): """ Merge together all the vertices that are nearer than the specified threshold. Like a unify duplicate vertices but with some tolerance. Args: script: the FilterScript object or script filename to write the filter to. threshold (float): M...
def merge_vert(script, threshold=0.0): """ Merge together all the vertices that are nearer than the specified threshold. Like a unify duplicate vertices but with some tolerance. Args: script: the FilterScript object or script filename to write the filter to. threshold (float): M...
[ "Merge", "together", "all", "the", "vertices", "that", "are", "nearer", "than", "the", "specified", "threshold", ".", "Like", "a", "unify", "duplicate", "vertices", "but", "with", "some", "tolerance", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/clean.py#L8-L37
[ "def", "merge_vert", "(", "script", ",", "threshold", "=", "0.0", ")", ":", "filter_xml", "=", "''", ".", "join", "(", "[", "' <filter name=\"Merge Close Vertices\">\\n'", ",", "' <Param name=\"Threshold\" '", ",", "'value=\"{}\" '", ".", "format", "(", "thresho...
177cce21e92baca500f56a932d66bd9a33257af8
test
close_holes
Close holes smaller than a given threshold Args: script: the FilterScript object or script filename to write the filter to. hole_max_edge (int): The size is expressed as number of edges composing the hole boundary. selected (bool): Only the holes with at least one of...
meshlabxml/clean.py
def close_holes(script, hole_max_edge=30, selected=False, sel_new_face=True, self_intersection=True): """ Close holes smaller than a given threshold Args: script: the FilterScript object or script filename to write the filter to. hole_max_edge (int): The size is expr...
def close_holes(script, hole_max_edge=30, selected=False, sel_new_face=True, self_intersection=True): """ Close holes smaller than a given threshold Args: script: the FilterScript object or script filename to write the filter to. hole_max_edge (int): The size is expr...
[ "Close", "holes", "smaller", "than", "a", "given", "threshold" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/clean.py#L40-L90
[ "def", "close_holes", "(", "script", ",", "hole_max_edge", "=", "30", ",", "selected", "=", "False", ",", "sel_new_face", "=", "True", ",", "self_intersection", "=", "True", ")", ":", "filter_xml", "=", "''", ".", "join", "(", "[", "' <filter name=\"Close H...
177cce21e92baca500f56a932d66bd9a33257af8
test
split_vert_on_nonmanifold_face
Split non-manifold vertices until it becomes two-manifold. Args: script: the FilterScript object or script filename to write the filter to. vert_displacement_ratio (float): When a vertex is split it is moved along the average vector going from its position to the centroid ...
meshlabxml/clean.py
def split_vert_on_nonmanifold_face(script, vert_displacement_ratio=0.0): """ Split non-manifold vertices until it becomes two-manifold. Args: script: the FilterScript object or script filename to write the filter to. vert_displacement_ratio (float): When a vertex is split it is move...
def split_vert_on_nonmanifold_face(script, vert_displacement_ratio=0.0): """ Split non-manifold vertices until it becomes two-manifold. Args: script: the FilterScript object or script filename to write the filter to. vert_displacement_ratio (float): When a vertex is split it is move...
[ "Split", "non", "-", "manifold", "vertices", "until", "it", "becomes", "two", "-", "manifold", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/clean.py#L93-L119
[ "def", "split_vert_on_nonmanifold_face", "(", "script", ",", "vert_displacement_ratio", "=", "0.0", ")", ":", "filter_xml", "=", "''", ".", "join", "(", "[", "' <filter name=\"Split Vertexes Incident on Non Manifold Faces\">\\n'", ",", "' <Param name=\"VertDispRatio\" '", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
snap_mismatched_borders
Try to snap together adjacent borders that are slightly mismatched. This situation can happen on badly triangulated adjacent patches defined by high order surfaces. For each border vertex the filter snaps it onto the closest boundary edge only if it is closest of edge_legth*threshold. When vertex is sn...
meshlabxml/clean.py
def snap_mismatched_borders(script, edge_dist_ratio=0.01, unify_vert=True): """ Try to snap together adjacent borders that are slightly mismatched. This situation can happen on badly triangulated adjacent patches defined by high order surfaces. For each border vertex the filter snaps it onto the closes...
def snap_mismatched_borders(script, edge_dist_ratio=0.01, unify_vert=True): """ Try to snap together adjacent borders that are slightly mismatched. This situation can happen on badly triangulated adjacent patches defined by high order surfaces. For each border vertex the filter snaps it onto the closes...
[ "Try", "to", "snap", "together", "adjacent", "borders", "that", "are", "slightly", "mismatched", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/clean.py#L145-L186
[ "def", "snap_mismatched_borders", "(", "script", ",", "edge_dist_ratio", "=", "0.01", ",", "unify_vert", "=", "True", ")", ":", "filter_xml", "=", "''", ".", "join", "(", "[", "' <filter name=\"Snap Mismatched Borders\">\\n'", ",", "' <Param name=\"EdgeDistRatio\" '...
177cce21e92baca500f56a932d66bd9a33257af8
test
translate
An alternative translate implementation that uses a geometric function. This is more accurate than the built-in version.
meshlabxml/transform.py
def translate(script, value=(0.0, 0.0, 0.0)): """An alternative translate implementation that uses a geometric function. This is more accurate than the built-in version.""" # Convert value to list if it isn't already if not isinstance(value, list): value = list(value) vert_function(script, ...
def translate(script, value=(0.0, 0.0, 0.0)): """An alternative translate implementation that uses a geometric function. This is more accurate than the built-in version.""" # Convert value to list if it isn't already if not isinstance(value, list): value = list(value) vert_function(script, ...
[ "An", "alternative", "translate", "implementation", "that", "uses", "a", "geometric", "function", ".", "This", "is", "more", "accurate", "than", "the", "built", "-", "in", "version", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/transform.py#L72-L82
[ "def", "translate", "(", "script", ",", "value", "=", "(", "0.0", ",", "0.0", ",", "0.0", ")", ")", ":", "# Convert value to list if it isn't already", "if", "not", "isinstance", "(", "value", ",", "list", ")", ":", "value", "=", "list", "(", "value", ")...
177cce21e92baca500f56a932d66bd9a33257af8
test
rotate
An alternative rotate implementation that uses a geometric function. This is more accurate than the built-in version.
meshlabxml/transform.py
def rotate(script, axis='z', angle=0.0): """An alternative rotate implementation that uses a geometric function. This is more accurate than the built-in version.""" angle = math.radians(angle) if axis.lower() == 'x': vert_function(script, x_func='x', y_func='y*c...
def rotate(script, axis='z', angle=0.0): """An alternative rotate implementation that uses a geometric function. This is more accurate than the built-in version.""" angle = math.radians(angle) if axis.lower() == 'x': vert_function(script, x_func='x', y_func='y*c...
[ "An", "alternative", "rotate", "implementation", "that", "uses", "a", "geometric", "function", ".", "This", "is", "more", "accurate", "than", "the", "built", "-", "in", "version", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/transform.py#L198-L220
[ "def", "rotate", "(", "script", ",", "axis", "=", "'z'", ",", "angle", "=", "0.0", ")", ":", "angle", "=", "math", ".", "radians", "(", "angle", ")", "if", "axis", ".", "lower", "(", ")", "==", "'x'", ":", "vert_function", "(", "script", ",", "x_...
177cce21e92baca500f56a932d66bd9a33257af8
test
scale
An alternative scale implementation that uses a geometric function. This is more accurate than the built-in version.
meshlabxml/transform.py
def scale(script, value=1.0): """An alternative scale implementation that uses a geometric function. This is more accurate than the built-in version.""" """# Convert value to list if it isn't already if not isinstance(value, list): value = list(value) # If a single value was supplied use it ...
def scale(script, value=1.0): """An alternative scale implementation that uses a geometric function. This is more accurate than the built-in version.""" """# Convert value to list if it isn't already if not isinstance(value, list): value = list(value) # If a single value was supplied use it ...
[ "An", "alternative", "scale", "implementation", "that", "uses", "a", "geometric", "function", ".", "This", "is", "more", "accurate", "than", "the", "built", "-", "in", "version", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/transform.py#L320-L334
[ "def", "scale", "(", "script", ",", "value", "=", "1.0", ")", ":", "\"\"\"# Convert value to list if it isn't already\n if not isinstance(value, list):\n value = list(value)\n # If a single value was supplied use it for all 3 axes\n if len(value) == 1:\n value = [value[0],...
177cce21e92baca500f56a932d66bd9a33257af8
test
freeze_matrix
Freeze the current transformation matrix into the coordinates of the vertices of the mesh (and set this matrix to the identity). In other words it applies in a definitive way the current matrix to the vertex coordinates. Args: script: the FilterScript object or script filename to write ...
meshlabxml/transform.py
def freeze_matrix(script, all_layers=False): """ Freeze the current transformation matrix into the coordinates of the vertices of the mesh (and set this matrix to the identity). In other words it applies in a definitive way the current matrix to the vertex coordinates. Args: script: th...
def freeze_matrix(script, all_layers=False): """ Freeze the current transformation matrix into the coordinates of the vertices of the mesh (and set this matrix to the identity). In other words it applies in a definitive way the current matrix to the vertex coordinates. Args: script: th...
[ "Freeze", "the", "current", "transformation", "matrix", "into", "the", "coordinates", "of", "the", "vertices", "of", "the", "mesh", "(", "and", "set", "this", "matrix", "to", "the", "identity", ")", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/transform.py#L337-L360
[ "def", "freeze_matrix", "(", "script", ",", "all_layers", "=", "False", ")", ":", "filter_xml", "=", "''", ".", "join", "(", "[", "' <filter name=\"Freeze Current Matrix\">\\n'", ",", "' <Param name=\"allLayers\" '", ",", "'value=\"%s\" '", "%", "str", "(", "all...
177cce21e92baca500f56a932d66bd9a33257af8
test
function
Geometric function using muparser lib to generate new Coordinates You can change x, y, z for every vertex according to the function specified. See help(mlx.muparser_ref) for muparser reference documentation. It's possible to use the following per-vertex variables in the expression: Variables (per ver...
meshlabxml/transform.py
def function(script, x_func='x', y_func='y', z_func='z'): """Geometric function using muparser lib to generate new Coordinates You can change x, y, z for every vertex according to the function specified. See help(mlx.muparser_ref) for muparser reference documentation. It's possible to use the followin...
def function(script, x_func='x', y_func='y', z_func='z'): """Geometric function using muparser lib to generate new Coordinates You can change x, y, z for every vertex according to the function specified. See help(mlx.muparser_ref) for muparser reference documentation. It's possible to use the followin...
[ "Geometric", "function", "using", "muparser", "lib", "to", "generate", "new", "Coordinates" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/transform.py#L363-L413
[ "def", "function", "(", "script", ",", "x_func", "=", "'x'", ",", "y_func", "=", "'y'", ",", "z_func", "=", "'z'", ")", ":", "filter_xml", "=", "''", ".", "join", "(", "[", "' <filter name=\"Geometric Function\">\\n'", ",", "' <Param name=\"x\" '", ",", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
vert_function
Geometric function using muparser lib to generate new Coordinates You can change x, y, z for every vertex according to the function specified. See help(mlx.muparser_ref) for muparser reference documentation. It's possible to use the following per-vertex variables in the expression: Variables (per ver...
meshlabxml/transform.py
def vert_function(script, x_func='x', y_func='y', z_func='z', selected=False): """Geometric function using muparser lib to generate new Coordinates You can change x, y, z for every vertex according to the function specified. See help(mlx.muparser_ref) for muparser reference documentation. It's possibl...
def vert_function(script, x_func='x', y_func='y', z_func='z', selected=False): """Geometric function using muparser lib to generate new Coordinates You can change x, y, z for every vertex according to the function specified. See help(mlx.muparser_ref) for muparser reference documentation. It's possibl...
[ "Geometric", "function", "using", "muparser", "lib", "to", "generate", "new", "Coordinates" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/transform.py#L416-L493
[ "def", "vert_function", "(", "script", ",", "x_func", "=", "'x'", ",", "y_func", "=", "'y'", ",", "z_func", "=", "'z'", ",", "selected", "=", "False", ")", ":", "if", "script", ".", "ml_version", "==", "'1.3.4BETA'", ":", "filter_xml", "=", "''", ".", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
function_cyl_co
Geometric function using cylindrical coordinates. Define functions in Z up cylindrical coordinates, with radius 'r', angle 'theta', and height 'z' See "function" docs for additional usage info and accepted parameters. Args: r_func (str): function to generate new coordinates for radius ...
meshlabxml/transform.py
def function_cyl_co(script, r_func='r', theta_func='theta', z_func='z'): """Geometric function using cylindrical coordinates. Define functions in Z up cylindrical coordinates, with radius 'r', angle 'theta', and height 'z' See "function" docs for additional usage info and accepted parameters. Arg...
def function_cyl_co(script, r_func='r', theta_func='theta', z_func='z'): """Geometric function using cylindrical coordinates. Define functions in Z up cylindrical coordinates, with radius 'r', angle 'theta', and height 'z' See "function" docs for additional usage info and accepted parameters. Arg...
[ "Geometric", "function", "using", "cylindrical", "coordinates", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/transform.py#L496-L535
[ "def", "function_cyl_co", "(", "script", ",", "r_func", "=", "'r'", ",", "theta_func", "=", "'theta'", ",", "z_func", "=", "'z'", ")", ":", "r", "=", "'sqrt(x^2+y^2)'", "# In newer MeshLab atan2 is builtin to muparser", "if", "isinstance", "(", "script", ",", "F...
177cce21e92baca500f56a932d66bd9a33257af8
test
radial_flare2
flare_radius must be >= end_height (height) end_radius max = flare_radius + r end_radius (num): radius of mesh at end of flare +15 r= 8.8205 -15 r= 1.1795 z=10, 5 +/-15 - +/-15*0.74535599249992989880305788957709
meshlabxml/transform.py
def radial_flare2(script, flare_radius=None, start_radius=None, end_radius=None, end_height=None): """ flare_radius must be >= end_height (height) end_radius max = flare_radius + r end_radius (num): radius of mesh at end of flare +15 r= 8.8205 -15 r= 1.1795 z...
def radial_flare2(script, flare_radius=None, start_radius=None, end_radius=None, end_height=None): """ flare_radius must be >= end_height (height) end_radius max = flare_radius + r end_radius (num): radius of mesh at end of flare +15 r= 8.8205 -15 r= 1.1795 z...
[ "flare_radius", "must", "be", ">", "=", "end_height", "(", "height", ")", "end_radius", "max", "=", "flare_radius", "+", "r", "end_radius", "(", "num", ")", ":", "radius", "of", "mesh", "at", "end", "of", "flare", "+", "15", "r", "=", "8", ".", "8205...
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/transform.py#L538-L567
[ "def", "radial_flare2", "(", "script", ",", "flare_radius", "=", "None", ",", "start_radius", "=", "None", ",", "end_radius", "=", "None", ",", "end_height", "=", "None", ")", ":", "# TODO: set radius limit, make it so flare continues to expand linearly after radius limit...
177cce21e92baca500f56a932d66bd9a33257af8
test
radial_flare
flare_radius must be >= z2 (height) r2 max = flare_radius + r r2 (num): radius of mesh at end of flare +15 r= 8.8205 -15 r= 1.1795 z=10, 5 +/-15 - +/-15*0.74535599249992989880305788957709
meshlabxml/transform.py
def radial_flare(script, flare_radius=None, start_radius=None, end_radius=None, end_height=None): """ flare_radius must be >= z2 (height) r2 max = flare_radius + r r2 (num): radius of mesh at end of flare +15 r= 8.8205 -15 r= 1.1795 z=10, 5 +/-15 - +/-15*0.745...
def radial_flare(script, flare_radius=None, start_radius=None, end_radius=None, end_height=None): """ flare_radius must be >= z2 (height) r2 max = flare_radius + r r2 (num): radius of mesh at end of flare +15 r= 8.8205 -15 r= 1.1795 z=10, 5 +/-15 - +/-15*0.745...
[ "flare_radius", "must", "be", ">", "=", "z2", "(", "height", ")", "r2", "max", "=", "flare_radius", "+", "r", "r2", "(", "num", ")", ":", "radius", "of", "mesh", "at", "end", "of", "flare", "+", "15", "r", "=", "8", ".", "8205", "-", "15", "r",...
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/transform.py#L569-L594
[ "def", "radial_flare", "(", "script", ",", "flare_radius", "=", "None", ",", "start_radius", "=", "None", ",", "end_radius", "=", "None", ",", "end_height", "=", "None", ")", ":", "# TODO: set radius limit, make it so flare continues to expand linearly after radius limit"...
177cce21e92baca500f56a932d66bd9a33257af8
test
curl_rim
flare_radius must be >= z2 (height) r2 max = flare_radius + r r2 (num): radius of mesh at end of flare +15 r= 8.8205 -15 r= 1.1795 z=10, 5 +/-15 - +/-15*0.74535599249992989880305788957709
meshlabxml/transform.py
def curl_rim(script, curl_radius=None, start_radius=None, end_radius=None, end_height=None): """ flare_radius must be >= z2 (height) r2 max = flare_radius + r r2 (num): radius of mesh at end of flare +15 r= 8.8205 -15 r= 1.1795 z=10, 5 +/-15 - +/-15*0.745355992499...
def curl_rim(script, curl_radius=None, start_radius=None, end_radius=None, end_height=None): """ flare_radius must be >= z2 (height) r2 max = flare_radius + r r2 (num): radius of mesh at end of flare +15 r= 8.8205 -15 r= 1.1795 z=10, 5 +/-15 - +/-15*0.745355992499...
[ "flare_radius", "must", "be", ">", "=", "z2", "(", "height", ")", "r2", "max", "=", "flare_radius", "+", "r", "r2", "(", "num", ")", ":", "radius", "of", "mesh", "at", "end", "of", "flare", "+", "15", "r", "=", "8", ".", "8205", "-", "15", "r",...
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/transform.py#L596-L621
[ "def", "curl_rim", "(", "script", ",", "curl_radius", "=", "None", ",", "start_radius", "=", "None", ",", "end_radius", "=", "None", ",", "end_height", "=", "None", ")", ":", "# TODO: set radius limit, make it so flare continues to expand linearly after radius limit", "...
177cce21e92baca500f56a932d66bd9a33257af8
test
wrap2cylinder
Deform mesh around cylinder of radius and axis z y = 0 will be on the surface of radius "radius" pitch != 0 will create a helix, with distance "pitch" traveled in z for each rotation taper = change in r over z. E.g. a value of 0.5 will shrink r by 0.5 for every z length of 1
meshlabxml/transform.py
def wrap2cylinder(script, radius=1, pitch=0, taper=0, pitch_func=None, taper_func=None): """Deform mesh around cylinder of radius and axis z y = 0 will be on the surface of radius "radius" pitch != 0 will create a helix, with distance "pitch" traveled in z for each rotation taper = ch...
def wrap2cylinder(script, radius=1, pitch=0, taper=0, pitch_func=None, taper_func=None): """Deform mesh around cylinder of radius and axis z y = 0 will be on the surface of radius "radius" pitch != 0 will create a helix, with distance "pitch" traveled in z for each rotation taper = ch...
[ "Deform", "mesh", "around", "cylinder", "of", "radius", "and", "axis", "z" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/transform.py#L623-L655
[ "def", "wrap2cylinder", "(", "script", ",", "radius", "=", "1", ",", "pitch", "=", "0", ",", "taper", "=", "0", ",", "pitch_func", "=", "None", ",", "taper_func", "=", "None", ")", ":", "\"\"\"vert_function(s=s, x='(%s+y-taper)*sin(x/(%s+y))' % (radius, radius),\n...
177cce21e92baca500f56a932d66bd9a33257af8
test
bend
Bends mesh around cylinder of radius radius and axis z to a certain angle straight_ends: Only apply twist (pitch) over the area that is bent outside_limit_end (bool): should values outside of the bend radius_limit be considered part of the end (True) or the start (False)?
meshlabxml/transform.py
def bend(script, radius=1, pitch=0, taper=0, angle=0, straght_start=True, straght_end=False, radius_limit=None, outside_limit_end=True): """Bends mesh around cylinder of radius radius and axis z to a certain angle straight_ends: Only apply twist (pitch) over the area that is bent outside_limit_en...
def bend(script, radius=1, pitch=0, taper=0, angle=0, straght_start=True, straght_end=False, radius_limit=None, outside_limit_end=True): """Bends mesh around cylinder of radius radius and axis z to a certain angle straight_ends: Only apply twist (pitch) over the area that is bent outside_limit_en...
[ "Bends", "mesh", "around", "cylinder", "of", "radius", "radius", "and", "axis", "z", "to", "a", "certain", "angle" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/transform.py#L699-L814
[ "def", "bend", "(", "script", ",", "radius", "=", "1", ",", "pitch", "=", "0", ",", "taper", "=", "0", ",", "angle", "=", "0", ",", "straght_start", "=", "True", ",", "straght_end", "=", "False", ",", "radius_limit", "=", "None", ",", "outside_limit_...
177cce21e92baca500f56a932d66bd9a33257af8
test
deform2curve
Deform a mesh along a parametric curve function Provide a parametric curve function with z as the parameter. This will deform the xy cross section of the mesh along the curve as z increases. Source: http://blackpawn.com/texts/pqtorus/ Methodology: T = P' - P N1 = P' + P B = T x N1 N...
meshlabxml/transform.py
def deform2curve(script, curve=mp_func.torus_knot('t'), step=0.001): """ Deform a mesh along a parametric curve function Provide a parametric curve function with z as the parameter. This will deform the xy cross section of the mesh along the curve as z increases. Source: http://blackpawn.com/texts/pqt...
def deform2curve(script, curve=mp_func.torus_knot('t'), step=0.001): """ Deform a mesh along a parametric curve function Provide a parametric curve function with z as the parameter. This will deform the xy cross section of the mesh along the curve as z increases. Source: http://blackpawn.com/texts/pqt...
[ "Deform", "a", "mesh", "along", "a", "parametric", "curve", "function" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/transform.py#L817-L850
[ "def", "deform2curve", "(", "script", ",", "curve", "=", "mp_func", ".", "torus_knot", "(", "'t'", ")", ",", "step", "=", "0.001", ")", ":", "curve_step", "=", "[", "]", "for", "idx", ",", "val", "in", "enumerate", "(", "curve", ")", ":", "curve", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
vc2tex
Transfer vertex colors to texture colors Args: script: the FilterScript object or script filename to write the filter to. tex_name (str): The texture file to be created tex_width (int): The texture width tex_height (int): The texture height overwrite_tex (bool): ...
meshlabxml/transfer.py
def vc2tex(script, tex_name='TEMP3D_texture.png', tex_width=1024, tex_height=1024, overwrite_tex=False, assign_tex=False, fill_tex=True): """Transfer vertex colors to texture colors Args: script: the FilterScript object or script filename to write the filter to. ...
def vc2tex(script, tex_name='TEMP3D_texture.png', tex_width=1024, tex_height=1024, overwrite_tex=False, assign_tex=False, fill_tex=True): """Transfer vertex colors to texture colors Args: script: the FilterScript object or script filename to write the filter to. ...
[ "Transfer", "vertex", "colors", "to", "texture", "colors" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/transfer.py#L20-L69
[ "def", "vc2tex", "(", "script", ",", "tex_name", "=", "'TEMP3D_texture.png'", ",", "tex_width", "=", "1024", ",", "tex_height", "=", "1024", ",", "overwrite_tex", "=", "False", ",", "assign_tex", "=", "False", ",", "fill_tex", "=", "True", ")", ":", "filte...
177cce21e92baca500f56a932d66bd9a33257af8
test
mesh2fc
Transfer mesh colors to face colors Args: script: the FilterScript object or script filename to write the filter to. all_visible_layers (bool): If true the color mapping is applied to all the meshes
meshlabxml/transfer.py
def mesh2fc(script, all_visible_layers=False): """Transfer mesh colors to face colors Args: script: the FilterScript object or script filename to write the filter to. all_visible_layers (bool): If true the color mapping is applied to all the meshes """ filter_xml = ''.join([...
def mesh2fc(script, all_visible_layers=False): """Transfer mesh colors to face colors Args: script: the FilterScript object or script filename to write the filter to. all_visible_layers (bool): If true the color mapping is applied to all the meshes """ filter_xml = ''.join([...
[ "Transfer", "mesh", "colors", "to", "face", "colors" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/transfer.py#L96-L113
[ "def", "mesh2fc", "(", "script", ",", "all_visible_layers", "=", "False", ")", ":", "filter_xml", "=", "''", ".", "join", "(", "[", "' <filter name=\"Transfer Color: Mesh to Face\">\\n'", ",", "' <Param name=\"allVisibleMesh\" '", ",", "'value=\"%s\" '", "%", "str",...
177cce21e92baca500f56a932d66bd9a33257af8
test
vert_attr_2_meshes
Vertex Attribute Transfer (between 2 meshes) Transfer the chosen per-vertex attributes from one mesh to another. Useful to transfer attributes to different representations of the same object. For each vertex of the target mesh the closest point (not vertex!) on the source mesh is computed, and the requested interp...
meshlabxml/transfer.py
def vert_attr_2_meshes(script, source_mesh=0, target_mesh=1, geometry=False, normal=False, color=True, quality=False, selection=False, quality_distance=False, max_distance=0.5): """Vertex Attribute Transfer (between 2 meshes) ...
def vert_attr_2_meshes(script, source_mesh=0, target_mesh=1, geometry=False, normal=False, color=True, quality=False, selection=False, quality_distance=False, max_distance=0.5): """Vertex Attribute Transfer (between 2 meshes) ...
[ "Vertex", "Attribute", "Transfer", "(", "between", "2", "meshes", ")" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/transfer.py#L116-L193
[ "def", "vert_attr_2_meshes", "(", "script", ",", "source_mesh", "=", "0", ",", "target_mesh", "=", "1", ",", "geometry", "=", "False", ",", "normal", "=", "False", ",", "color", "=", "True", ",", "quality", "=", "False", ",", "selection", "=", "False", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
vert_attr2tex_2_meshes
Transfer Vertex Attributes to Texture (between 2 meshes) Args: script: the FilterScript object or script filename to write the filter to. source_mesh (int): The mesh that contains the source data that we want to transfer target_mesh (int): The mesh whose texture will be filled a...
meshlabxml/transfer.py
def vert_attr2tex_2_meshes(script, source_mesh=0, target_mesh=1, attribute=0, max_distance=0.5, tex_name='TEMP3D_texture.png', tex_width=1024, tex_height=1024, overwrite_tex=True, assign_tex=False, fill_tex=True)...
def vert_attr2tex_2_meshes(script, source_mesh=0, target_mesh=1, attribute=0, max_distance=0.5, tex_name='TEMP3D_texture.png', tex_width=1024, tex_height=1024, overwrite_tex=True, assign_tex=False, fill_tex=True)...
[ "Transfer", "Vertex", "Attributes", "to", "Texture", "(", "between", "2", "meshes", ")" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/transfer.py#L196-L289
[ "def", "vert_attr2tex_2_meshes", "(", "script", ",", "source_mesh", "=", "0", ",", "target_mesh", "=", "1", ",", "attribute", "=", "0", ",", "max_distance", "=", "0.5", ",", "tex_name", "=", "'TEMP3D_texture.png'", ",", "tex_width", "=", "1024", ",", "tex_he...
177cce21e92baca500f56a932d66bd9a33257af8
test
tex2vc_2_meshes
Transfer texture colors to vertex colors (between 2 meshes) Args: script: the FilterScript object or script filename to write the filter to. source_mesh (int): The mesh with associated texture that we want to sample from target_mesh (int): The mesh whose vertex color will be fil...
meshlabxml/transfer.py
def tex2vc_2_meshes(script, source_mesh=0, target_mesh=1, max_distance=0.5): """Transfer texture colors to vertex colors (between 2 meshes) Args: script: the FilterScript object or script filename to write the filter to. source_mesh (int): The mesh with associated texture that we wa...
def tex2vc_2_meshes(script, source_mesh=0, target_mesh=1, max_distance=0.5): """Transfer texture colors to vertex colors (between 2 meshes) Args: script: the FilterScript object or script filename to write the filter to. source_mesh (int): The mesh with associated texture that we wa...
[ "Transfer", "texture", "colors", "to", "vertex", "colors", "(", "between", "2", "meshes", ")" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/transfer.py#L292-L334
[ "def", "tex2vc_2_meshes", "(", "script", ",", "source_mesh", "=", "0", ",", "target_mesh", "=", "1", ",", "max_distance", "=", "0.5", ")", ":", "if", "script", ".", "ml_version", "==", "'1.3.4BETA'", ":", "filter_name", "=", "'Texture to Vertex Color (between 2 ...
177cce21e92baca500f56a932d66bd9a33257af8
test
simplify
Simplify a mesh using a Quadric based Edge Collapse Strategy, better than clustering but slower. Optionally tries to preserve UV parametrization for textured meshes. Args: script: the FilterScript object or script filename to write the filter to. texture (bool): ...
meshlabxml/remesh.py
def simplify(script, texture=True, faces=25000, target_perc=0.0, quality_thr=0.3, preserve_boundary=False, boundary_weight=1.0, optimal_placement=True, preserve_normal=False, planar_quadric=False, selected=False, extra_tex_coord_weight=1.0, preserve_topology=True, qua...
def simplify(script, texture=True, faces=25000, target_perc=0.0, quality_thr=0.3, preserve_boundary=False, boundary_weight=1.0, optimal_placement=True, preserve_normal=False, planar_quadric=False, selected=False, extra_tex_coord_weight=1.0, preserve_topology=True, qua...
[ "Simplify", "a", "mesh", "using", "a", "Quadric", "based", "Edge", "Collapse", "Strategy", "better", "than", "clustering", "but", "slower", ".", "Optionally", "tries", "to", "preserve", "UV", "parametrization", "for", "textured", "meshes", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/remesh.py#L12-L159
[ "def", "simplify", "(", "script", ",", "texture", "=", "True", ",", "faces", "=", "25000", ",", "target_perc", "=", "0.0", ",", "quality_thr", "=", "0.3", ",", "preserve_boundary", "=", "False", ",", "boundary_weight", "=", "1.0", ",", "optimal_placement", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
uniform_resampling
Create a new mesh that is a resampled version of the current one. The resampling is done by building a uniform volumetric representation where each voxel contains the signed distance from the original surface. The resampled surface is reconstructed using the marching cube algorithm over this volume. ...
meshlabxml/remesh.py
def uniform_resampling(script, voxel=1.0, offset=0.0, merge_vert=True, discretize=False, multisample=False, thicken=False): """ Create a new mesh that is a resampled version of the current one. The resampling is done by building a uniform volumetric representation where each voxel co...
def uniform_resampling(script, voxel=1.0, offset=0.0, merge_vert=True, discretize=False, multisample=False, thicken=False): """ Create a new mesh that is a resampled version of the current one. The resampling is done by building a uniform volumetric representation where each voxel co...
[ "Create", "a", "new", "mesh", "that", "is", "a", "resampled", "version", "of", "the", "current", "one", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/remesh.py#L162-L247
[ "def", "uniform_resampling", "(", "script", ",", "voxel", "=", "1.0", ",", "offset", "=", "0.0", ",", "merge_vert", "=", "True", ",", "discretize", "=", "False", ",", "multisample", "=", "False", ",", "thicken", "=", "False", ")", ":", "filter_xml", "=",...
177cce21e92baca500f56a932d66bd9a33257af8
test
hull
Calculate the convex hull with Qhull library http://www.qhull.org/html/qconvex.htm The convex hull of a set of points is the boundary of the minimal convex set containing the given non-empty finite set of points. Args: script: the FilterScript object or script filename to write ...
meshlabxml/remesh.py
def hull(script, reorient_normal=True): """ Calculate the convex hull with Qhull library http://www.qhull.org/html/qconvex.htm The convex hull of a set of points is the boundary of the minimal convex set containing the given non-empty finite set of points. Args: script: the FilterScrip...
def hull(script, reorient_normal=True): """ Calculate the convex hull with Qhull library http://www.qhull.org/html/qconvex.htm The convex hull of a set of points is the boundary of the minimal convex set containing the given non-empty finite set of points. Args: script: the FilterScrip...
[ "Calculate", "the", "convex", "hull", "with", "Qhull", "library", "http", ":", "//", "www", ".", "qhull", ".", "org", "/", "html", "/", "qconvex", ".", "htm" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/remesh.py#L250-L282
[ "def", "hull", "(", "script", ",", "reorient_normal", "=", "True", ")", ":", "filter_xml", "=", "''", ".", "join", "(", "[", "' <filter name=\"Convex Hull\">\\n'", ",", "' <Param name=\"reorient\" '", ",", "'value=\"{}\" '", ".", "format", "(", "str", "(", "...
177cce21e92baca500f56a932d66bd9a33257af8
test
surface_poisson
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. Su...
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 ...
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 ...
[ "Use", "the", "points", "and", "normals", "to", "build", "a", "surface", "using", "the", "Poisson", "Surface", "reconstruction", "approach", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/remesh.py#L285-L350
[ "def", "surface_poisson", "(", "script", ",", "octree_depth", "=", "10", ",", "solver_divide", "=", "8", ",", "samples_per_node", "=", "1.0", ",", "offset", "=", "1.0", ")", ":", "filter_xml", "=", "''", ".", "join", "(", "[", "' <filter name=\"Surface Reco...
177cce21e92baca500f56a932d66bd9a33257af8
test
surface_poisson_screened
This surface reconstruction algorithm creates watertight surfaces from oriented point sets. The filter uses the original code of Michael Kazhdan and Matthew Bolitho implementing the algorithm in the following paper: Michael Kazhdan, Hugues Hoppe, "Screened Poisson surface reconstruction" A...
meshlabxml/remesh.py
def surface_poisson_screened(script, visible_layer=False, depth=8, full_depth=5, cg_depth=0, scale=1.1, samples_per_node=1.5, point_weight=4.0, iterations=8, confidence=False, pre_clean=False): """ This surface reconstruction alg...
def surface_poisson_screened(script, visible_layer=False, depth=8, full_depth=5, cg_depth=0, scale=1.1, samples_per_node=1.5, point_weight=4.0, iterations=8, confidence=False, pre_clean=False): """ This surface reconstruction alg...
[ "This", "surface", "reconstruction", "algorithm", "creates", "watertight", "surfaces", "from", "oriented", "point", "sets", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/remesh.py#L353-L434
[ "def", "surface_poisson_screened", "(", "script", ",", "visible_layer", "=", "False", ",", "depth", "=", "8", ",", "full_depth", "=", "5", ",", "cg_depth", "=", "0", ",", "scale", "=", "1.1", ",", "samples_per_node", "=", "1.5", ",", "point_weight", "=", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
curvature_flipping
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. angle_threshold (float): To avoid excessive flipping/swapping we consider only couple of ...
meshlabxml/remesh.py
def curvature_flipping(script, angle_threshold=1.0, curve_type=0, selected=False): """ 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...
def curvature_flipping(script, angle_threshold=1.0, curve_type=0, selected=False): """ 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...
[ "Use", "the", "points", "and", "normals", "to", "build", "a", "surface", "using", "the", "Poisson", "Surface", "reconstruction", "approach", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/remesh.py#L437-L486
[ "def", "curvature_flipping", "(", "script", ",", "angle_threshold", "=", "1.0", ",", "curve_type", "=", "0", ",", "selected", "=", "False", ")", ":", "filter_xml", "=", "''", ".", "join", "(", "[", "' <filter name=\"Curvature flipping optimization\">\\n'", ",", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
voronoi
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 ...
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-vorono...
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-vorono...
[ "Turn", "a", "model", "into", "a", "surface", "with", "Voronoi", "style", "holes", "in", "it" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/remesh.py#L489-L524
[ "def", "voronoi", "(", "script", ",", "hole_num", "=", "50", ",", "target_layer", "=", "None", ",", "sample_layer", "=", "None", ",", "thickness", "=", "0.5", ",", "backward", "=", "True", ")", ":", "if", "target_layer", "is", "None", ":", "target_layer"...
177cce21e92baca500f56a932d66bd9a33257af8
test
all
Select all the faces of the current mesh Args: script: the FilterScript object or script filename to write the filter to. faces (bool): If True the filter will select all the faces. verts (bool): If True the filter will select all the vertices. Layer stack: No impac...
meshlabxml/select.py
def all(script, face=True, vert=True): """ Select all the faces of the current mesh Args: script: the FilterScript object or script filename to write the filter to. faces (bool): If True the filter will select all the faces. verts (bool): If True the filter will select all t...
def all(script, face=True, vert=True): """ Select all the faces of the current mesh Args: script: the FilterScript object or script filename to write the filter to. faces (bool): If True the filter will select all the faces. verts (bool): If True the filter will select all t...
[ "Select", "all", "the", "faces", "of", "the", "current", "mesh" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/select.py#L6-L36
[ "def", "all", "(", "script", ",", "face", "=", "True", ",", "vert", "=", "True", ")", ":", "filter_xml", "=", "''", ".", "join", "(", "[", "' <filter name=\"Select All\">\\n'", ",", "' <Param name=\"allFaces\" '", ",", "'value=\"{}\" '", ".", "format", "("...
177cce21e92baca500f56a932d66bd9a33257af8
test
grow
Grow (dilate, expand) the current set of selected faces Args: script: the FilterScript object or script filename to write the filter to. iterations (int): the number of times to grow the selection. Layer stack: No impacts MeshLab versions: 2016.12 1.3.4...
meshlabxml/select.py
def grow(script, iterations=1): """ Grow (dilate, expand) the current set of selected faces Args: script: the FilterScript object or script filename to write the filter to. iterations (int): the number of times to grow the selection. Layer stack: No impacts MeshLab...
def grow(script, iterations=1): """ Grow (dilate, expand) the current set of selected faces Args: script: the FilterScript object or script filename to write the filter to. iterations (int): the number of times to grow the selection. Layer stack: No impacts MeshLab...
[ "Grow", "(", "dilate", "expand", ")", "the", "current", "set", "of", "selected", "faces" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/select.py#L124-L142
[ "def", "grow", "(", "script", ",", "iterations", "=", "1", ")", ":", "filter_xml", "=", "' <filter name=\"Dilate Selection\"/>\\n'", "for", "_", "in", "range", "(", "iterations", ")", ":", "util", ".", "write_filter", "(", "script", ",", "filter_xml", ")", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
shrink
Shrink (erode, reduce) the current set of selected faces Args: script: the FilterScript object or script filename to write the filter to. iterations (int): the number of times to shrink the selection. Layer stack: No impacts MeshLab versions: 2016.12 1....
meshlabxml/select.py
def shrink(script, iterations=1): """ Shrink (erode, reduce) the current set of selected faces Args: script: the FilterScript object or script filename to write the filter to. iterations (int): the number of times to shrink the selection. Layer stack: No impacts Me...
def shrink(script, iterations=1): """ Shrink (erode, reduce) the current set of selected faces Args: script: the FilterScript object or script filename to write the filter to. iterations (int): the number of times to shrink the selection. Layer stack: No impacts Me...
[ "Shrink", "(", "erode", "reduce", ")", "the", "current", "set", "of", "selected", "faces" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/select.py#L145-L163
[ "def", "shrink", "(", "script", ",", "iterations", "=", "1", ")", ":", "filter_xml", "=", "' <filter name=\"Erode Selection\"/>\\n'", "for", "_", "in", "range", "(", "iterations", ")", ":", "util", ".", "write_filter", "(", "script", ",", "filter_xml", ")", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
small_parts
Select the small disconnected parts (components) of a mesh. Args: script: the FilterScript object or script filename to write the filter to. ratio (float): This ratio (between 0 and 1) defines the meaning of 'small' as the threshold ratio between the number of faces of the ...
meshlabxml/select.py
def small_parts(script, ratio=0.2, non_closed_only=False): """ Select the small disconnected parts (components) of a mesh. Args: script: the FilterScript object or script filename to write the filter to. ratio (float): This ratio (between 0 and 1) defines the meaning of ...
def small_parts(script, ratio=0.2, non_closed_only=False): """ Select the small disconnected parts (components) of a mesh. Args: script: the FilterScript object or script filename to write the filter to. ratio (float): This ratio (between 0 and 1) defines the meaning of ...
[ "Select", "the", "small", "disconnected", "parts", "(", "components", ")", "of", "a", "mesh", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/select.py#L232-L265
[ "def", "small_parts", "(", "script", ",", "ratio", "=", "0.2", ",", "non_closed_only", "=", "False", ")", ":", "filter_xml", "=", "''", ".", "join", "(", "[", "' <filter name=\"Small component selection\">\\n'", ",", "' <Param name=\"NbFaceRatio\" '", ",", "'val...
177cce21e92baca500f56a932d66bd9a33257af8
test
vert_quality
Select all the faces and vertexes within the specified vertex quality range. Args: script: the FilterScript object or script filename to write the filter] to. min_quality (float): Minimum acceptable quality value. max_quality (float): Maximum acceptable quality value. ...
meshlabxml/select.py
def vert_quality(script, min_quality=0.0, max_quality=0.05, inclusive=True): """ Select all the faces and vertexes within the specified vertex quality range. Args: script: the FilterScript object or script filename to write the filter] to. min_quality (float): Minimum accept...
def vert_quality(script, min_quality=0.0, max_quality=0.05, inclusive=True): """ Select all the faces and vertexes within the specified vertex quality range. Args: script: the FilterScript object or script filename to write the filter] to. min_quality (float): Minimum accept...
[ "Select", "all", "the", "faces", "and", "vertexes", "within", "the", "specified", "vertex", "quality", "range", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/select.py#L268-L311
[ "def", "vert_quality", "(", "script", ",", "min_quality", "=", "0.0", ",", "max_quality", "=", "0.05", ",", "inclusive", "=", "True", ")", ":", "filter_xml", "=", "''", ".", "join", "(", "[", "' <filter name=\"Select by Vertex Quality\">\\n'", ",", "' <Param...
177cce21e92baca500f56a932d66bd9a33257af8
test
face_function
Boolean function using muparser lib to perform face selection over current mesh. See help(mlx.muparser_ref) for muparser reference documentation. It's possible to use parenthesis, per-vertex variables and boolean operator: (, ), and, or, <, >, = It's possible to use per-face variables like...
meshlabxml/select.py
def face_function(script, function='(fi == 0)'): """Boolean function using muparser lib to perform face selection over current mesh. See help(mlx.muparser_ref) for muparser reference documentation. It's possible to use parenthesis, per-vertex variables and boolean operator: (, ), and, or, ...
def face_function(script, function='(fi == 0)'): """Boolean function using muparser lib to perform face selection over current mesh. See help(mlx.muparser_ref) for muparser reference documentation. It's possible to use parenthesis, per-vertex variables and boolean operator: (, ), and, or, ...
[ "Boolean", "function", "using", "muparser", "lib", "to", "perform", "face", "selection", "over", "current", "mesh", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/select.py#L314-L360
[ "def", "face_function", "(", "script", ",", "function", "=", "'(fi == 0)'", ")", ":", "filter_xml", "=", "''", ".", "join", "(", "[", "' <filter name=\"Conditional Face Selection\">\\n'", ",", "' <Param name=\"condSelect\" '", ",", "'value=\"{}\" '", ".", "format", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
vert_function
Boolean function using muparser lib to perform vertex selection over current mesh. See help(mlx.muparser_ref) for muparser reference documentation. It's possible to use parenthesis, per-vertex variables and boolean operator: (, ), and, or, <, >, = It's possible to use the following per-vertex vari...
meshlabxml/select.py
def vert_function(script, function='(q < 0)', strict_face_select=True): """Boolean function using muparser lib to perform vertex selection over current mesh. See help(mlx.muparser_ref) for muparser reference documentation. It's possible to use parenthesis, per-vertex variables and boolean operator: ...
def vert_function(script, function='(q < 0)', strict_face_select=True): """Boolean function using muparser lib to perform vertex selection over current mesh. See help(mlx.muparser_ref) for muparser reference documentation. It's possible to use parenthesis, per-vertex variables and boolean operator: ...
[ "Boolean", "function", "using", "muparser", "lib", "to", "perform", "vertex", "selection", "over", "current", "mesh", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/select.py#L363-L422
[ "def", "vert_function", "(", "script", ",", "function", "=", "'(q < 0)'", ",", "strict_face_select", "=", "True", ")", ":", "if", "script", ".", "ml_version", "==", "'1.3.4BETA'", ":", "strict_select", "=", "''", ".", "join", "(", "[", "' <Param name=\"stri...
177cce21e92baca500f56a932d66bd9a33257af8
test
cylindrical_vert
Select all vertices within a cylindrical radius Args: radius (float): radius of the sphere center_pt (3 coordinate tuple or list): center point of the sphere Layer stack: No impacts MeshLab versions: 2016.12 1.3.4BETA
meshlabxml/select.py
def cylindrical_vert(script, radius=1.0, inside=True): """Select all vertices within a cylindrical radius Args: radius (float): radius of the sphere center_pt (3 coordinate tuple or list): center point of the sphere Layer stack: No impacts MeshLab versions: 2016.12 ...
def cylindrical_vert(script, radius=1.0, inside=True): """Select all vertices within a cylindrical radius Args: radius (float): radius of the sphere center_pt (3 coordinate tuple or list): center point of the sphere Layer stack: No impacts MeshLab versions: 2016.12 ...
[ "Select", "all", "vertices", "within", "a", "cylindrical", "radius" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/select.py#L425-L444
[ "def", "cylindrical_vert", "(", "script", ",", "radius", "=", "1.0", ",", "inside", "=", "True", ")", ":", "if", "inside", ":", "function", "=", "'sqrt(x^2+y^2)<={}'", ".", "format", "(", "radius", ")", "else", ":", "function", "=", "'sqrt(x^2+y^2)>={}'", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
spherical_vert
Select all vertices within a spherical radius Args: radius (float): radius of the sphere center_pt (3 coordinate tuple or list): center point of the sphere Layer stack: No impacts MeshLab versions: 2016.12 1.3.4BETA
meshlabxml/select.py
def spherical_vert(script, radius=1.0, center_pt=(0.0, 0.0, 0.0)): """Select all vertices within a spherical radius Args: radius (float): radius of the sphere center_pt (3 coordinate tuple or list): center point of the sphere Layer stack: No impacts MeshLab versions: 2...
def spherical_vert(script, radius=1.0, center_pt=(0.0, 0.0, 0.0)): """Select all vertices within a spherical radius Args: radius (float): radius of the sphere center_pt (3 coordinate tuple or list): center point of the sphere Layer stack: No impacts MeshLab versions: 2...
[ "Select", "all", "vertices", "within", "a", "spherical", "radius" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/select.py#L447-L464
[ "def", "spherical_vert", "(", "script", ",", "radius", "=", "1.0", ",", "center_pt", "=", "(", "0.0", ",", "0.0", ",", "0.0", ")", ")", ":", "function", "=", "'sqrt((x-{})^2+(y-{})^2+(z-{})^2)<={}'", ".", "format", "(", "center_pt", "[", "0", "]", ",", "...
177cce21e92baca500f56a932d66bd9a33257af8
test
join
Flatten all or only the visible layers into a single new mesh. Transformations are preserved. Existing layers can be optionally deleted. Args: script: the mlx.FilterScript object or script filename to write the filter to. merge_visible (bool): merge only visible layers ...
meshlabxml/layers.py
def join(script, merge_visible=True, merge_vert=False, delete_layer=True, keep_unreferenced_vert=False): """ Flatten all or only the visible layers into a single new mesh. Transformations are preserved. Existing layers can be optionally deleted. Args: script: the mlx.FilterScript obje...
def join(script, merge_visible=True, merge_vert=False, delete_layer=True, keep_unreferenced_vert=False): """ Flatten all or only the visible layers into a single new mesh. Transformations are preserved. Existing layers can be optionally deleted. Args: script: the mlx.FilterScript obje...
[ "Flatten", "all", "or", "only", "the", "visible", "layers", "into", "a", "single", "new", "mesh", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/layers.py#L8-L76
[ "def", "join", "(", "script", ",", "merge_visible", "=", "True", ",", "merge_vert", "=", "False", ",", "delete_layer", "=", "True", ",", "keep_unreferenced_vert", "=", "False", ")", ":", "filter_xml", "=", "''", ".", "join", "(", "[", "' <filter name=\"Flat...
177cce21e92baca500f56a932d66bd9a33257af8
test
delete
Delete layer Args: script: the mlx.FilterScript object or script filename to write the filter to. layer_num (int): the number of the layer to delete. Default is the current layer. Not supported on the file base API. Layer stack: Deletes a layer will chan...
meshlabxml/layers.py
def delete(script, layer_num=None): """ Delete layer Args: script: the mlx.FilterScript object or script filename to write the filter to. layer_num (int): the number of the layer to delete. Default is the current layer. Not supported on the file base API. Layer stac...
def delete(script, layer_num=None): """ Delete layer Args: script: the mlx.FilterScript object or script filename to write the filter to. layer_num (int): the number of the layer to delete. Default is the current layer. Not supported on the file base API. Layer stac...
[ "Delete", "layer" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/layers.py#L79-L112
[ "def", "delete", "(", "script", ",", "layer_num", "=", "None", ")", ":", "filter_xml", "=", "' <filter name=\"Delete Current Mesh\"/>\\n'", "if", "isinstance", "(", "script", ",", "mlx", ".", "FilterScript", ")", ":", "if", "(", "layer_num", "is", "None", ")"...
177cce21e92baca500f56a932d66bd9a33257af8
test
rename
Rename layer label Can be useful for outputting mlp files, as the output file names use the labels. Args: script: the mlx.FilterScript object or script filename to write the filter to. label (str): new label for the mesh layer layer_num (int): layer number to rename. De...
meshlabxml/layers.py
def rename(script, label='blank', layer_num=None): """ Rename layer label Can be useful for outputting mlp files, as the output file names use the labels. Args: script: the mlx.FilterScript object or script filename to write the filter to. label (str): new label for the mes...
def rename(script, label='blank', layer_num=None): """ Rename layer label Can be useful for outputting mlp files, as the output file names use the labels. Args: script: the mlx.FilterScript object or script filename to write the filter to. label (str): new label for the mes...
[ "Rename", "layer", "label" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/layers.py#L115-L155
[ "def", "rename", "(", "script", ",", "label", "=", "'blank'", ",", "layer_num", "=", "None", ")", ":", "filter_xml", "=", "''", ".", "join", "(", "[", "' <filter name=\"Rename Current Mesh\">\\n'", ",", "' <Param name=\"newName\" '", ",", "'value=\"{}\" '", "....
177cce21e92baca500f56a932d66bd9a33257af8
test
change
Change the current layer by specifying the new layer number. Args: script: the mlx.FilterScript object or script filename to write the filter to. layer_num (int): the number of the layer to change to. Default is the last layer if script is a mlx.FilterScript object; if scrip...
meshlabxml/layers.py
def change(script, layer_num=None): """ Change the current layer by specifying the new layer number. Args: script: the mlx.FilterScript object or script filename to write the filter to. layer_num (int): the number of the layer to change to. Default is the last layer if s...
def change(script, layer_num=None): """ Change the current layer by specifying the new layer number. Args: script: the mlx.FilterScript object or script filename to write the filter to. layer_num (int): the number of the layer to change to. Default is the last layer if s...
[ "Change", "the", "current", "layer", "by", "specifying", "the", "new", "layer", "number", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/layers.py#L158-L192
[ "def", "change", "(", "script", ",", "layer_num", "=", "None", ")", ":", "if", "layer_num", "is", "None", ":", "if", "isinstance", "(", "script", ",", "mlx", ".", "FilterScript", ")", ":", "layer_num", "=", "script", ".", "last_layer", "(", ")", "else"...
177cce21e92baca500f56a932d66bd9a33257af8
test
duplicate
Duplicate a layer. New layer label is '*_copy'. Args: script: the mlx.FilterScript object or script filename to write the filter to. layer_num (int): layer number to duplicate. Default is the current layer. Not supported on the file base API. Layer stack: C...
meshlabxml/layers.py
def duplicate(script, layer_num=None): """ Duplicate a layer. New layer label is '*_copy'. Args: script: the mlx.FilterScript object or script filename to write the filter to. layer_num (int): layer number to duplicate. Default is the current layer. Not supported on...
def duplicate(script, layer_num=None): """ Duplicate a layer. New layer label is '*_copy'. Args: script: the mlx.FilterScript object or script filename to write the filter to. layer_num (int): layer number to duplicate. Default is the current layer. Not supported on...
[ "Duplicate", "a", "layer", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/layers.py#L195-L225
[ "def", "duplicate", "(", "script", ",", "layer_num", "=", "None", ")", ":", "filter_xml", "=", "' <filter name=\"Duplicate Current layer\"/>\\n'", "if", "isinstance", "(", "script", ",", "mlx", ".", "FilterScript", ")", ":", "if", "(", "layer_num", "is", "None"...
177cce21e92baca500f56a932d66bd9a33257af8
test
split_parts
Split current layer into many layers, one for each part (connected component) Mesh is split so that the largest part is the lowest named layer "CC 0" and the smallest part is the highest numbered "CC" layer. Args: script: the mlx.FilterScript object or script filename to write ...
meshlabxml/layers.py
def split_parts(script, part_num=None, layer_num=None): """ Split current layer into many layers, one for each part (connected component) Mesh is split so that the largest part is the lowest named layer "CC 0" and the smallest part is the highest numbered "CC" layer. Args: script: the ...
def split_parts(script, part_num=None, layer_num=None): """ Split current layer into many layers, one for each part (connected component) Mesh is split so that the largest part is the lowest named layer "CC 0" and the smallest part is the highest numbered "CC" layer. Args: script: the ...
[ "Split", "current", "layer", "into", "many", "layers", "one", "for", "each", "part", "(", "connected", "component", ")" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/layers.py#L228-L271
[ "def", "split_parts", "(", "script", ",", "part_num", "=", "None", ",", "layer_num", "=", "None", ")", ":", "filter_xml", "=", "' <filter name=\"Split in Connected Components\"/>\\n'", "if", "isinstance", "(", "script", ",", "mlx", ".", "FilterScript", ")", ":", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
delete_lower
Delete all layers below the specified one. Useful for MeshLab ver 2016.12, whcih will only output layer 0.
meshlabxml/layers.py
def delete_lower(script, layer_num=None): """ Delete all layers below the specified one. Useful for MeshLab ver 2016.12, whcih will only output layer 0. """ if layer_num is None: layer_num = script.current_layer() if layer_num != 0: change(script, 0) for i in range(layer_num): ...
def delete_lower(script, layer_num=None): """ Delete all layers below the specified one. Useful for MeshLab ver 2016.12, whcih will only output layer 0. """ if layer_num is None: layer_num = script.current_layer() if layer_num != 0: change(script, 0) for i in range(layer_num): ...
[ "Delete", "all", "layers", "below", "the", "specified", "one", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/layers.py#L273-L284
[ "def", "delete_lower", "(", "script", ",", "layer_num", "=", "None", ")", ":", "if", "layer_num", "is", "None", ":", "layer_num", "=", "script", ".", "current_layer", "(", ")", "if", "layer_num", "!=", "0", ":", "change", "(", "script", ",", "0", ")", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
handle_error
Subprocess program error handling Args: program_name (str): name of the subprocess program Returns: break_now (bool): indicate whether calling program should break out of loop
meshlabxml/mlx.py
def handle_error(program_name, cmd, log=None): """Subprocess program error handling Args: program_name (str): name of the subprocess program Returns: break_now (bool): indicate whether calling program should break out of loop """ print('\nHouston, we have a problem.', '\...
def handle_error(program_name, cmd, log=None): """Subprocess program error handling Args: program_name (str): name of the subprocess program Returns: break_now (bool): indicate whether calling program should break out of loop """ print('\nHouston, we have a problem.', '\...
[ "Subprocess", "program", "error", "handling" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/mlx.py#L270-L316
[ "def", "handle_error", "(", "program_name", ",", "cmd", ",", "log", "=", "None", ")", ":", "print", "(", "'\\nHouston, we have a problem.'", ",", "'\\n%s did not finish successfully. Review the log'", "%", "program_name", ",", "'file and the input file(s) to see what went wro...
177cce21e92baca500f56a932d66bd9a33257af8
test
run
Run meshlabserver in a subprocess. Args: log (str): filename of the log file for meshlabxml. If not None, all meshlabserver stdout and stderr messages will be appended to this file. ml_log (str): filename of the log file output directly by meshlabserver. ...
meshlabxml/mlx.py
def run(script='TEMP3D_default.mlx', log=None, ml_log=None, mlp_in=None, mlp_out=None, overwrite=False, file_in=None, file_out=None, output_mask=None, cmd=None, ml_version=ML_VERSION, print_meshlabserver_output=True): """Run meshlabserver in a subprocess. Args: log (str): filena...
def run(script='TEMP3D_default.mlx', log=None, ml_log=None, mlp_in=None, mlp_out=None, overwrite=False, file_in=None, file_out=None, output_mask=None, cmd=None, ml_version=ML_VERSION, print_meshlabserver_output=True): """Run meshlabserver in a subprocess. Args: log (str): filena...
[ "Run", "meshlabserver", "in", "a", "subprocess", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/mlx.py#L319-L453
[ "def", "run", "(", "script", "=", "'TEMP3D_default.mlx'", ",", "log", "=", "None", ",", "ml_log", "=", "None", ",", "mlp_in", "=", "None", ",", "mlp_out", "=", "None", ",", "overwrite", "=", "False", ",", "file_in", "=", "None", ",", "file_out", "=", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
find_texture_files
Finds the filenames of the referenced texture file(s) (and material file for obj) for the mesh. Args: fbasename (str): input filename. Supported file extensions: obj ply dae x3d wrl log (str): filename to log output Returns: ...
meshlabxml/mlx.py
def find_texture_files(fbasename, log=None): """Finds the filenames of the referenced texture file(s) (and material file for obj) for the mesh. Args: fbasename (str): input filename. Supported file extensions: obj ply dae x3d wrl l...
def find_texture_files(fbasename, log=None): """Finds the filenames of the referenced texture file(s) (and material file for obj) for the mesh. Args: fbasename (str): input filename. Supported file extensions: obj ply dae x3d wrl l...
[ "Finds", "the", "filenames", "of", "the", "referenced", "texture", "file", "(", "s", ")", "(", "and", "material", "file", "for", "obj", ")", "for", "the", "mesh", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/mlx.py#L456-L569
[ "def", "find_texture_files", "(", "fbasename", ",", "log", "=", "None", ")", ":", "fext", "=", "os", ".", "path", ".", "splitext", "(", "fbasename", ")", "[", "1", "]", "[", "1", ":", "]", ".", "strip", "(", ")", ".", "lower", "(", ")", "material...
177cce21e92baca500f56a932d66bd9a33257af8
test
default_output_mask
Set default output mask options based on file extension Note: v1.34BETA changed -om switch to -m Possible options (not all options are available for every format): vc -> vertex colors vf -> vertex flags vq -> vertex quality vn -> vertex normals vt -> vertex texture coords fc -> fac...
meshlabxml/mlx.py
def default_output_mask(file_out, texture=True, vert_normals=True, vert_colors=False, face_colors=False, ml_version=ML_VERSION): """ Set default output mask options based on file extension Note: v1.34BETA changed -om switch to -m Possible options (not all options are available fo...
def default_output_mask(file_out, texture=True, vert_normals=True, vert_colors=False, face_colors=False, ml_version=ML_VERSION): """ Set default output mask options based on file extension Note: v1.34BETA changed -om switch to -m Possible options (not all options are available fo...
[ "Set", "default", "output", "mask", "options", "based", "on", "file", "extension", "Note", ":", "v1", ".", "34BETA", "changed", "-", "om", "switch", "to", "-", "m", "Possible", "options", "(", "not", "all", "options", "are", "available", "for", "every", ...
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/mlx.py#L572-L620
[ "def", "default_output_mask", "(", "file_out", ",", "texture", "=", "True", ",", "vert_normals", "=", "True", ",", "vert_colors", "=", "False", ",", "face_colors", "=", "False", ",", "ml_version", "=", "ML_VERSION", ")", ":", "vn", "=", "''", "wt", "=", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
begin
Create new mlx script and write opening tags. Performs special processing on stl files. If no input files are provided this will create a dummy file and delete it as the first filter. This works around the meshlab limitation that it must be provided an input file, even if you will be creating a me...
meshlabxml/mlx.py
def begin(script='TEMP3D_default.mlx', file_in=None, mlp_in=None): """Create new mlx script and write opening tags. Performs special processing on stl files. If no input files are provided this will create a dummy file and delete it as the first filter. This works around the meshlab limitation tha...
def begin(script='TEMP3D_default.mlx', file_in=None, mlp_in=None): """Create new mlx script and write opening tags. Performs special processing on stl files. If no input files are provided this will create a dummy file and delete it as the first filter. This works around the meshlab limitation tha...
[ "Create", "new", "mlx", "script", "and", "write", "opening", "tags", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/mlx.py#L623-L691
[ "def", "begin", "(", "script", "=", "'TEMP3D_default.mlx'", ",", "file_in", "=", "None", ",", "mlp_in", "=", "None", ")", ":", "script_file", "=", "open", "(", "script", ",", "'w'", ")", "script_file", ".", "write", "(", "''", ".", "join", "(", "[", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
create_mlp
Create mlp file mlp_mesh (list containing dictionary) filename* label matrix mlp_raster filename* label semantic camera trans_vector* rotation_matrix* focal_length* image_px* image_res_mm_per_px*...
meshlabxml/mlx.py
def create_mlp(file_out, mlp_mesh=None, mlp_raster=None): """ Create mlp file mlp_mesh (list containing dictionary) filename* label matrix mlp_raster filename* label semantic camera trans_vector* rotation_matrix* fo...
def create_mlp(file_out, mlp_mesh=None, mlp_raster=None): """ Create mlp file mlp_mesh (list containing dictionary) filename* label matrix mlp_raster filename* label semantic camera trans_vector* rotation_matrix* fo...
[ "Create", "mlp", "file", "mlp_mesh", "(", "list", "containing", "dictionary", ")", "filename", "*", "label", "matrix" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/mlx.py#L701-L794
[ "def", "create_mlp", "(", "file_out", ",", "mlp_mesh", "=", "None", ",", "mlp_raster", "=", "None", ")", ":", "# Opening lines", "mlp_file", "=", "open", "(", "file_out", ",", "'w'", ")", "mlp_file", ".", "write", "(", "'\\n'", ".", "join", "(", "[", "...
177cce21e92baca500f56a932d66bd9a33257af8
test
FilterScript.add_layer
Add new mesh layer to the end of the stack Args: label (str): new label for the mesh layer change_layer (bool): change to the newly created layer
meshlabxml/mlx.py
def add_layer(self, label, change_layer=True): """ Add new mesh layer to the end of the stack Args: label (str): new label for the mesh layer change_layer (bool): change to the newly created layer """ self.layer_stack.insert(self.last_layer() + 1, label) ...
def add_layer(self, label, change_layer=True): """ Add new mesh layer to the end of the stack Args: label (str): new label for the mesh layer change_layer (bool): change to the newly created layer """ self.layer_stack.insert(self.last_layer() + 1, label) ...
[ "Add", "new", "mesh", "layer", "to", "the", "end", "of", "the", "stack" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/mlx.py#L181-L191
[ "def", "add_layer", "(", "self", ",", "label", ",", "change_layer", "=", "True", ")", ":", "self", ".", "layer_stack", ".", "insert", "(", "self", ".", "last_layer", "(", ")", "+", "1", ",", "label", ")", "if", "change_layer", ":", "self", ".", "set_...
177cce21e92baca500f56a932d66bd9a33257af8
test
FilterScript.del_layer
Delete mesh layer
meshlabxml/mlx.py
def del_layer(self, layer_num): """ Delete mesh layer """ del self.layer_stack[layer_num] # Adjust current layer if needed if layer_num < self.current_layer(): self.set_current_layer(self.current_layer() - 1) return None
def del_layer(self, layer_num): """ Delete mesh layer """ del self.layer_stack[layer_num] # Adjust current layer if needed if layer_num < self.current_layer(): self.set_current_layer(self.current_layer() - 1) return None
[ "Delete", "mesh", "layer" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/mlx.py#L193-L199
[ "def", "del_layer", "(", "self", ",", "layer_num", ")", ":", "del", "self", ".", "layer_stack", "[", "layer_num", "]", "# Adjust current layer if needed", "if", "layer_num", "<", "self", ".", "current_layer", "(", ")", ":", "self", ".", "set_current_layer", "(...
177cce21e92baca500f56a932d66bd9a33257af8
test
FilterScript.save_to_file
Save filter script to an mlx file
meshlabxml/mlx.py
def save_to_file(self, script_file): """ Save filter script to an mlx file """ # TODO: rasie exception here instead? if not self.filters: print('WARNING: no filters to save to file!') script_file_descriptor = open(script_file, 'w') script_file_descriptor.write(''.join...
def save_to_file(self, script_file): """ Save filter script to an mlx file """ # TODO: rasie exception here instead? if not self.filters: print('WARNING: no filters to save to file!') script_file_descriptor = open(script_file, 'w') script_file_descriptor.write(''.join...
[ "Save", "filter", "script", "to", "an", "mlx", "file" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/mlx.py#L201-L208
[ "def", "save_to_file", "(", "self", ",", "script_file", ")", ":", "# TODO: rasie exception here instead?", "if", "not", "self", ".", "filters", ":", "print", "(", "'WARNING: no filters to save to file!'", ")", "script_file_descriptor", "=", "open", "(", "script_file", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
FilterScript.run_script
Run the script
meshlabxml/mlx.py
def run_script(self, log=None, ml_log=None, mlp_out=None, overwrite=False, file_out=None, output_mask=None, script_file=None, print_meshlabserver_output=True): """ Run the script """ temp_script = False temp_ml_log = False if self.__no_file_in: # ...
def run_script(self, log=None, ml_log=None, mlp_out=None, overwrite=False, file_out=None, output_mask=None, script_file=None, print_meshlabserver_output=True): """ Run the script """ temp_script = False temp_ml_log = False if self.__no_file_in: # ...
[ "Run", "the", "script" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/mlx.py#L210-L267
[ "def", "run_script", "(", "self", ",", "log", "=", "None", ",", "ml_log", "=", "None", ",", "mlp_out", "=", "None", ",", "overwrite", "=", "False", ",", "file_out", "=", "None", ",", "output_mask", "=", "None", ",", "script_file", "=", "None", ",", "...
177cce21e92baca500f56a932d66bd9a33257af8
test
main
Run main script
examples/shield.py
def main(): """Run main script""" # segments = number of segments to use for circles segments = 50 # star_points = number of points (or sides) of the star star_points = 5 # star_radius = radius of circle circumscribing the star star_radius = 2 # ring_thickness = thickness of the colored ...
def main(): """Run main script""" # segments = number of segments to use for circles segments = 50 # star_points = number of points (or sides) of the star star_points = 5 # star_radius = radius of circle circumscribing the star star_radius = 2 # ring_thickness = thickness of the colored ...
[ "Run", "main", "script" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/examples/shield.py#L38-L130
[ "def", "main", "(", ")", ":", "# segments = number of segments to use for circles", "segments", "=", "50", "# star_points = number of points (or sides) of the star", "star_points", "=", "5", "# star_radius = radius of circle circumscribing the star", "star_radius", "=", "2", "# rin...
177cce21e92baca500f56a932d66bd9a33257af8
test
small_parts
Select & delete the small disconnected parts (components) of a mesh. Args: script: the FilterScript object or script filename to write the filter to. ratio (float): This ratio (between 0 and 1) defines the meaning of 'small' as the threshold ratio between the number of faces...
meshlabxml/delete.py
def small_parts(script, ratio=0.2, non_closed_only=False): """ Select & delete the small disconnected parts (components) of a mesh. Args: script: the FilterScript object or script filename to write the filter to. ratio (float): This ratio (between 0 and 1) defines the meaning of ...
def small_parts(script, ratio=0.2, non_closed_only=False): """ Select & delete the small disconnected parts (components) of a mesh. Args: script: the FilterScript object or script filename to write the filter to. ratio (float): This ratio (between 0 and 1) defines the meaning of ...
[ "Select", "&", "delete", "the", "small", "disconnected", "parts", "(", "components", ")", "of", "a", "mesh", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/delete.py#L53-L74
[ "def", "small_parts", "(", "script", ",", "ratio", "=", "0.2", ",", "non_closed_only", "=", "False", ")", ":", "select", ".", "small_parts", "(", "script", ",", "ratio", ",", "non_closed_only", ")", "selected", "(", "script", ")", "return", "None" ]
177cce21e92baca500f56a932d66bd9a33257af8
test
selected
Delete selected vertices and/or faces Note: if the mesh has no faces (e.g. a point cloud) you must set face=False, or the vertices will not be deleted Args: script: the FilterScript object or script filename to write the filter to. face (bool): if True the selected faces will b...
meshlabxml/delete.py
def selected(script, face=True, vert=True): """ Delete selected vertices and/or faces Note: if the mesh has no faces (e.g. a point cloud) you must set face=False, or the vertices will not be deleted Args: script: the FilterScript object or script filename to write the filter to. ...
def selected(script, face=True, vert=True): """ Delete selected vertices and/or faces Note: if the mesh has no faces (e.g. a point cloud) you must set face=False, or the vertices will not be deleted Args: script: the FilterScript object or script filename to write the filter to. ...
[ "Delete", "selected", "vertices", "and", "/", "or", "faces" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/delete.py#L77-L107
[ "def", "selected", "(", "script", ",", "face", "=", "True", ",", "vert", "=", "True", ")", ":", "if", "face", "and", "vert", ":", "filter_xml", "=", "' <filter name=\"Delete Selected Faces and Vertices\"/>\\n'", "elif", "face", "and", "not", "vert", ":", "fil...
177cce21e92baca500f56a932d66bd9a33257af8
test
unreferenced_vert
Check for every vertex on the mesh: if it is NOT referenced by a face, removes it. Args: script: the FilterScript object or script filename to write the filter to. Layer stack: No impacts MeshLab versions: 2016.12 1.3.4BETA
meshlabxml/delete.py
def unreferenced_vert(script): """ Check for every vertex on the mesh: if it is NOT referenced by a face, removes it. Args: script: the FilterScript object or script filename to write the filter to. Layer stack: No impacts MeshLab versions: 2016.12 ...
def unreferenced_vert(script): """ Check for every vertex on the mesh: if it is NOT referenced by a face, removes it. Args: script: the FilterScript object or script filename to write the filter to. Layer stack: No impacts MeshLab versions: 2016.12 ...
[ "Check", "for", "every", "vertex", "on", "the", "mesh", ":", "if", "it", "is", "NOT", "referenced", "by", "a", "face", "removes", "it", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/delete.py#L130-L150
[ "def", "unreferenced_vert", "(", "script", ")", ":", "if", "script", ".", "ml_version", "==", "'1.3.4BETA'", ":", "filter_xml", "=", "' <filter name=\"Remove Unreferenced Vertex\"/>\\n'", "else", ":", "filter_xml", "=", "' <filter name=\"Remove Unreferenced Vertices\"/>\\n'...
177cce21e92baca500f56a932d66bd9a33257af8
test
duplicate_verts
"Check for every vertex on the mesh: if there are two vertices with the same coordinates they are merged into a single one. Args: script: the FilterScript object or script filename to write the filter to. Layer stack: No impacts MeshLab versions: 2016.12 ...
meshlabxml/delete.py
def duplicate_verts(script): """ "Check for every vertex on the mesh: if there are two vertices with the same coordinates they are merged into a single one. Args: script: the FilterScript object or script filename to write the filter to. Layer stack: No impacts Mes...
def duplicate_verts(script): """ "Check for every vertex on the mesh: if there are two vertices with the same coordinates they are merged into a single one. Args: script: the FilterScript object or script filename to write the filter to. Layer stack: No impacts Mes...
[ "Check", "for", "every", "vertex", "on", "the", "mesh", ":", "if", "there", "are", "two", "vertices", "with", "the", "same", "coordinates", "they", "are", "merged", "into", "a", "single", "one", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/delete.py#L175-L196
[ "def", "duplicate_verts", "(", "script", ")", ":", "if", "script", ".", "ml_version", "==", "'1.3.4BETA'", ":", "filter_xml", "=", "' <filter name=\"Remove Duplicated Vertex\"/>\\n'", "else", ":", "filter_xml", "=", "' <filter name=\"Remove Duplicate Vertices\"/>\\n'", "u...
177cce21e92baca500f56a932d66bd9a33257af8
test
hausdorff_distance
Compute the Hausdorff Distance between two meshes, sampling one of the two and finding for each sample the closest point over the other mesh. Args: script: the FilterScript object or script filename to write the filter to. sampled_layer (int): The mesh layer whose surface is sam...
meshlabxml/sampling.py
def hausdorff_distance(script, sampled_layer=1, target_layer=0, save_sample=False, sample_vert=True, sample_edge=True, sample_faux_edge=False, sample_face=True, sample_num=1000, maxdist=10): """ Compute the Hausdorff Distance between two meshes, s...
def hausdorff_distance(script, sampled_layer=1, target_layer=0, save_sample=False, sample_vert=True, sample_edge=True, sample_faux_edge=False, sample_face=True, sample_num=1000, maxdist=10): """ Compute the Hausdorff Distance between two meshes, s...
[ "Compute", "the", "Hausdorff", "Distance", "between", "two", "meshes", "sampling", "one", "of", "the", "two", "and", "finding", "for", "each", "sample", "the", "closest", "point", "over", "the", "other", "mesh", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/sampling.py#L7-L115
[ "def", "hausdorff_distance", "(", "script", ",", "sampled_layer", "=", "1", ",", "target_layer", "=", "0", ",", "save_sample", "=", "False", ",", "sample_vert", "=", "True", ",", "sample_edge", "=", "True", ",", "sample_faux_edge", "=", "False", ",", "sample...
177cce21e92baca500f56a932d66bd9a33257af8
test
poisson_disk
Create a new layer populated with a point sampling of the current mesh. Samples are generated according to a Poisson-disk distribution, using the algorithm described in: 'Efficient and Flexible Sampling with Blue Noise Properties of Triangular Meshes' Massimiliano Corsini, Paolo Cignoni, Roberto Scopi...
meshlabxml/sampling.py
def poisson_disk(script, sample_num=1000, radius=0.0, montecarlo_rate=20, save_montecarlo=False, approx_geodesic_dist=False, subsample=False, refine=False, refine_layer=0, best_sample=True, best_sample_pool=10, exact_num=False, radius_variance=1.0): ...
def poisson_disk(script, sample_num=1000, radius=0.0, montecarlo_rate=20, save_montecarlo=False, approx_geodesic_dist=False, subsample=False, refine=False, refine_layer=0, best_sample=True, best_sample_pool=10, exact_num=False, radius_variance=1.0): ...
[ "Create", "a", "new", "layer", "populated", "with", "a", "point", "sampling", "of", "the", "current", "mesh", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/sampling.py#L118-L260
[ "def", "poisson_disk", "(", "script", ",", "sample_num", "=", "1000", ",", "radius", "=", "0.0", ",", "montecarlo_rate", "=", "20", ",", "save_montecarlo", "=", "False", ",", "approx_geodesic_dist", "=", "False", ",", "subsample", "=", "False", ",", "refine"...
177cce21e92baca500f56a932d66bd9a33257af8
test
mesh_element
Create a new layer populated with a point sampling of the current mesh, at most one sample for each element of the mesh is created. Samples are taking in a uniform way, one for each element (vertex/edge/face); all the elements have the same probabilty of being choosen. Args: script: th...
meshlabxml/sampling.py
def mesh_element(script, sample_num=1000, element='VERT'): """ Create a new layer populated with a point sampling of the current mesh, at most one sample for each element of the mesh is created. Samples are taking in a uniform way, one for each element (vertex/edge/face); all the elements have the ...
def mesh_element(script, sample_num=1000, element='VERT'): """ Create a new layer populated with a point sampling of the current mesh, at most one sample for each element of the mesh is created. Samples are taking in a uniform way, one for each element (vertex/edge/face); all the elements have the ...
[ "Create", "a", "new", "layer", "populated", "with", "a", "point", "sampling", "of", "the", "current", "mesh", "at", "most", "one", "sample", "for", "each", "element", "of", "the", "mesh", "is", "created", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/sampling.py#L263-L315
[ "def", "mesh_element", "(", "script", ",", "sample_num", "=", "1000", ",", "element", "=", "'VERT'", ")", ":", "if", "element", ".", "lower", "(", ")", "==", "'vert'", ":", "element_num", "=", "0", "elif", "element", ".", "lower", "(", ")", "==", "'e...
177cce21e92baca500f56a932d66bd9a33257af8
test
clustered_vert
"Create a new layer populated with a subsampling of the vertexes of the current mesh The subsampling is driven by a simple one-per-gridded cell strategy. Args: script: the FilterScript object or script filename to write the filter to. cell_size (float): The size of the cell...
meshlabxml/sampling.py
def clustered_vert(script, cell_size=1.0, strategy='AVERAGE', selected=False): """ "Create a new layer populated with a subsampling of the vertexes of the current mesh The subsampling is driven by a simple one-per-gridded cell strategy. Args: script: the FilterScript object or script filen...
def clustered_vert(script, cell_size=1.0, strategy='AVERAGE', selected=False): """ "Create a new layer populated with a subsampling of the vertexes of the current mesh The subsampling is driven by a simple one-per-gridded cell strategy. Args: script: the FilterScript object or script filen...
[ "Create", "a", "new", "layer", "populated", "with", "a", "subsampling", "of", "the", "vertexes", "of", "the", "current", "mesh" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/sampling.py#L318-L370
[ "def", "clustered_vert", "(", "script", ",", "cell_size", "=", "1.0", ",", "strategy", "=", "'AVERAGE'", ",", "selected", "=", "False", ")", ":", "if", "strategy", ".", "lower", "(", ")", "==", "'average'", ":", "strategy_num", "=", "0", "elif", "strateg...
177cce21e92baca500f56a932d66bd9a33257af8
test
flat_plane
Flat plane parameterization
meshlabxml/texture.py
def flat_plane(script, plane=0, aspect_ratio=False): """Flat plane parameterization """ filter_xml = ''.join([ ' <filter name="Parametrization: Flat Plane ">\n', ' <Param name="projectionPlane"', 'value="%d"' % plane, 'description="Projection plane"', 'enum_val0=...
def flat_plane(script, plane=0, aspect_ratio=False): """Flat plane parameterization """ filter_xml = ''.join([ ' <filter name="Parametrization: Flat Plane ">\n', ' <Param name="projectionPlane"', 'value="%d"' % plane, 'description="Projection plane"', 'enum_val0=...
[ "Flat", "plane", "parameterization" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/texture.py#L6-L30
[ "def", "flat_plane", "(", "script", ",", "plane", "=", "0", ",", "aspect_ratio", "=", "False", ")", ":", "filter_xml", "=", "''", ".", "join", "(", "[", "' <filter name=\"Parametrization: Flat Plane \">\\n'", ",", "' <Param name=\"projectionPlane\"'", ",", "'val...
177cce21e92baca500f56a932d66bd9a33257af8
test
per_triangle
Trivial Per-Triangle parameterization
meshlabxml/texture.py
def per_triangle(script, sidedim=0, textdim=1024, border=2, method=1): """Trivial Per-Triangle parameterization """ filter_xml = ''.join([ ' <filter name="Parametrization: Trivial Per-Triangle ">\n', ' <Param name="sidedim"', 'value="%d"' % sidedim, 'description="Quads p...
def per_triangle(script, sidedim=0, textdim=1024, border=2, method=1): """Trivial Per-Triangle parameterization """ filter_xml = ''.join([ ' <filter name="Parametrization: Trivial Per-Triangle ">\n', ' <Param name="sidedim"', 'value="%d"' % sidedim, 'description="Quads p...
[ "Trivial", "Per", "-", "Triangle", "parameterization" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/texture.py#L33-L68
[ "def", "per_triangle", "(", "script", ",", "sidedim", "=", "0", ",", "textdim", "=", "1024", ",", "border", "=", "2", ",", "method", "=", "1", ")", ":", "filter_xml", "=", "''", ".", "join", "(", "[", "' <filter name=\"Parametrization: Trivial Per-Triangle ...
177cce21e92baca500f56a932d66bd9a33257af8
test
voronoi
Voronoi Atlas parameterization
meshlabxml/texture.py
def voronoi(script, region_num=10, overlap=False): """Voronoi Atlas parameterization """ filter_xml = ''.join([ ' <filter name="Parametrization: Voronoi Atlas">\n', ' <Param name="regionNum"', 'value="%d"' % region_num, 'description="Approx. Region Num"', 'type="...
def voronoi(script, region_num=10, overlap=False): """Voronoi Atlas parameterization """ filter_xml = ''.join([ ' <filter name="Parametrization: Voronoi Atlas">\n', ' <Param name="regionNum"', 'value="%d"' % region_num, 'description="Approx. Region Num"', 'type="...
[ "Voronoi", "Atlas", "parameterization" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/texture.py#L71-L91
[ "def", "voronoi", "(", "script", ",", "region_num", "=", "10", ",", "overlap", "=", "False", ")", ":", "filter_xml", "=", "''", ".", "join", "(", "[", "' <filter name=\"Parametrization: Voronoi Atlas\">\\n'", ",", "' <Param name=\"regionNum\"'", ",", "'value=\"%...
177cce21e92baca500f56a932d66bd9a33257af8
test
isometric
Isometric parameterization
meshlabxml/texture.py
def isometric(script, targetAbstractMinFaceNum=140, targetAbstractMaxFaceNum=180, stopCriteria=1, convergenceSpeed=1, DoubleStep=True): """Isometric parameterization """ filter_xml = ''.join([ ' <filter name="Iso Parametrization">\n', ' <Param name="targetAbstractMinFaceNu...
def isometric(script, targetAbstractMinFaceNum=140, targetAbstractMaxFaceNum=180, stopCriteria=1, convergenceSpeed=1, DoubleStep=True): """Isometric parameterization """ filter_xml = ''.join([ ' <filter name="Iso Parametrization">\n', ' <Param name="targetAbstractMinFaceNu...
[ "Isometric", "parameterization" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/texture.py#L94-L138
[ "def", "isometric", "(", "script", ",", "targetAbstractMinFaceNum", "=", "140", ",", "targetAbstractMaxFaceNum", "=", "180", ",", "stopCriteria", "=", "1", ",", "convergenceSpeed", "=", "1", ",", "DoubleStep", "=", "True", ")", ":", "filter_xml", "=", "''", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
isometric_build_atlased_mesh
Isometric parameterization: Build Atlased Mesh This actually generates the UV mapping from the isometric parameterization
meshlabxml/texture.py
def isometric_build_atlased_mesh(script, BorderSize=0.1): """Isometric parameterization: Build Atlased Mesh This actually generates the UV mapping from the isometric parameterization """ filter_xml = ''.join([ ' <filter name="Iso Parametrization Build Atlased Mesh">\n', ' <Param na...
def isometric_build_atlased_mesh(script, BorderSize=0.1): """Isometric parameterization: Build Atlased Mesh This actually generates the UV mapping from the isometric parameterization """ filter_xml = ''.join([ ' <filter name="Iso Parametrization Build Atlased Mesh">\n', ' <Param na...
[ "Isometric", "parameterization", ":", "Build", "Atlased", "Mesh" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/texture.py#L141-L159
[ "def", "isometric_build_atlased_mesh", "(", "script", ",", "BorderSize", "=", "0.1", ")", ":", "filter_xml", "=", "''", ".", "join", "(", "[", "' <filter name=\"Iso Parametrization Build Atlased Mesh\">\\n'", ",", "' <Param name=\"BorderSize\"'", ",", "'value=\"%s\"'", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
isometric_save
Isometric parameterization: Save Abstract Domain
meshlabxml/texture.py
def isometric_save(script, AbsName="TEMP3D.abs"): """Isometric parameterization: Save Abstract Domain """ filter_xml = ''.join([ ' <filter name="Iso Parametrization Save Abstract Domain">\n', ' <Param name="AbsName"', 'value="%s"' % AbsName, 'description="Abstract Mesh f...
def isometric_save(script, AbsName="TEMP3D.abs"): """Isometric parameterization: Save Abstract Domain """ filter_xml = ''.join([ ' <filter name="Iso Parametrization Save Abstract Domain">\n', ' <Param name="AbsName"', 'value="%s"' % AbsName, 'description="Abstract Mesh f...
[ "Isometric", "parameterization", ":", "Save", "Abstract", "Domain" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/texture.py#L162-L176
[ "def", "isometric_save", "(", "script", ",", "AbsName", "=", "\"TEMP3D.abs\"", ")", ":", "filter_xml", "=", "''", ".", "join", "(", "[", "' <filter name=\"Iso Parametrization Save Abstract Domain\">\\n'", ",", "' <Param name=\"AbsName\"'", ",", "'value=\"%s\"'", "%", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
isometric_load
Isometric parameterization: Load Abstract Domain
meshlabxml/texture.py
def isometric_load(script, AbsName="TEMP3D.abs"): """Isometric parameterization: Load Abstract Domain """ filter_xml = ''.join([ ' <filter name="Iso Parametrization Load Abstract Domain">\n', ' <Param name="AbsName"', 'value="%s"' % AbsName, 'description="Abstract Mesh f...
def isometric_load(script, AbsName="TEMP3D.abs"): """Isometric parameterization: Load Abstract Domain """ filter_xml = ''.join([ ' <filter name="Iso Parametrization Load Abstract Domain">\n', ' <Param name="AbsName"', 'value="%s"' % AbsName, 'description="Abstract Mesh f...
[ "Isometric", "parameterization", ":", "Load", "Abstract", "Domain" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/texture.py#L179-L193
[ "def", "isometric_load", "(", "script", ",", "AbsName", "=", "\"TEMP3D.abs\"", ")", ":", "filter_xml", "=", "''", ".", "join", "(", "[", "' <filter name=\"Iso Parametrization Load Abstract Domain\">\\n'", ",", "' <Param name=\"AbsName\"'", ",", "'value=\"%s\"'", "%", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
isometric_transfer
Isometric parameterization: transfer between meshes Provide the layer numbers of the source and target meshes.
meshlabxml/texture.py
def isometric_transfer(script, sourceMesh=0, targetMesh=1): """Isometric parameterization: transfer between meshes Provide the layer numbers of the source and target meshes. """ filter_xml = ''.join([ ' <filter name="Iso Parametrization transfer between meshes">\n', ' <Param name="...
def isometric_transfer(script, sourceMesh=0, targetMesh=1): """Isometric parameterization: transfer between meshes Provide the layer numbers of the source and target meshes. """ filter_xml = ''.join([ ' <filter name="Iso Parametrization transfer between meshes">\n', ' <Param name="...
[ "Isometric", "parameterization", ":", "transfer", "between", "meshes" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/texture.py#L196-L218
[ "def", "isometric_transfer", "(", "script", ",", "sourceMesh", "=", "0", ",", "targetMesh", "=", "1", ")", ":", "filter_xml", "=", "''", ".", "join", "(", "[", "' <filter name=\"Iso Parametrization transfer between meshes\">\\n'", ",", "' <Param name=\"sourceMesh\"'...
177cce21e92baca500f56a932d66bd9a33257af8
test
isometric_remesh
Isometric parameterization: remeshing
meshlabxml/texture.py
def isometric_remesh(script, SamplingRate=10): """Isometric parameterization: remeshing """ filter_xml = ''.join([ ' <filter name="Iso Parametrization Remeshing">\n', ' <Param name="SamplingRate"', 'value="%d"' % SamplingRate, 'description="Sampling Rate"', 'type...
def isometric_remesh(script, SamplingRate=10): """Isometric parameterization: remeshing """ filter_xml = ''.join([ ' <filter name="Iso Parametrization Remeshing">\n', ' <Param name="SamplingRate"', 'value="%d"' % SamplingRate, 'description="Sampling Rate"', 'type...
[ "Isometric", "parameterization", ":", "remeshing" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/texture.py#L221-L235
[ "def", "isometric_remesh", "(", "script", ",", "SamplingRate", "=", "10", ")", ":", "filter_xml", "=", "''", ".", "join", "(", "[", "' <filter name=\"Iso Parametrization Remeshing\">\\n'", ",", "' <Param name=\"SamplingRate\"'", ",", "'value=\"%d\"'", "%", "Sampling...
177cce21e92baca500f56a932d66bd9a33257af8
test
set_texture
Set texture
meshlabxml/texture.py
def set_texture(script, textName="TEMP3D.png", textDim=1024): """Set texture """ filter_xml = ''.join([ ' <filter name="Set Texture">\n', ' <Param name="textName"', 'value="%s"' % textName, 'description="Texture file"', 'type="RichString"', 'tooltip="If t...
def set_texture(script, textName="TEMP3D.png", textDim=1024): """Set texture """ filter_xml = ''.join([ ' <filter name="Set Texture">\n', ' <Param name="textName"', 'value="%s"' % textName, 'description="Texture file"', 'type="RichString"', 'tooltip="If t...
[ "Set", "texture" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/texture.py#L238-L258
[ "def", "set_texture", "(", "script", ",", "textName", "=", "\"TEMP3D.png\"", ",", "textDim", "=", "1024", ")", ":", "filter_xml", "=", "''", ".", "join", "(", "[", "' <filter name=\"Set Texture\">\\n'", ",", "' <Param name=\"textName\"'", ",", "'value=\"%s\"'", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
project_rasters
Set texture Creates new texture file tex_file_out = must be png fill_atlas_gaps = setting this to false will leave the unprojected area transparent. This can then be easily composed with the original texture with PIL
meshlabxml/texture.py
def project_rasters(script, tex_file_out="TEMP3D.png", tex_size=1024, fill_atlas_gaps=False, depth_threshold=0.5, selected=False, use_angle=True, use_distance=True, use_borders=True, use_silhouettes=True, use_alpha=False): """Set texture Creates new t...
def project_rasters(script, tex_file_out="TEMP3D.png", tex_size=1024, fill_atlas_gaps=False, depth_threshold=0.5, selected=False, use_angle=True, use_distance=True, use_borders=True, use_silhouettes=True, use_alpha=False): """Set texture Creates new t...
[ "Set", "texture" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/texture.py#L261-L336
[ "def", "project_rasters", "(", "script", ",", "tex_file_out", "=", "\"TEMP3D.png\"", ",", "tex_size", "=", "1024", ",", "fill_atlas_gaps", "=", "False", ",", "depth_threshold", "=", "0.5", ",", "selected", "=", "False", ",", "use_angle", "=", "True", ",", "u...
177cce21e92baca500f56a932d66bd9a33257af8
test
param_texture_from_rasters
Set texture
meshlabxml/texture.py
def param_texture_from_rasters(script, textName="TEMP3D.png", texsize=1024, colorCorrection=True, colorCorrectionFilterSize=1, useDistanceWeight=True, useImgBorderWeight=True, useAlphaWeight=False, cleanIsolatedTriangles=True, ...
def param_texture_from_rasters(script, textName="TEMP3D.png", texsize=1024, colorCorrection=True, colorCorrectionFilterSize=1, useDistanceWeight=True, useImgBorderWeight=True, useAlphaWeight=False, cleanIsolatedTriangles=True, ...
[ "Set", "texture" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/texture.py#L339-L411
[ "def", "param_texture_from_rasters", "(", "script", ",", "textName", "=", "\"TEMP3D.png\"", ",", "texsize", "=", "1024", ",", "colorCorrection", "=", "True", ",", "colorCorrectionFilterSize", "=", "1", ",", "useDistanceWeight", "=", "True", ",", "useImgBorderWeight"...
177cce21e92baca500f56a932d66bd9a33257af8
test
param_from_rasters
Set texture
meshlabxml/texture.py
def param_from_rasters(script, useDistanceWeight=True, useImgBorderWeight=True, useAlphaWeight=False, cleanIsolatedTriangles=True, stretchingAllowed=False, textureGutter=4): """Set texture """ filter_xml = ''.join([ ' <filter name="Parameterization fro...
def param_from_rasters(script, useDistanceWeight=True, useImgBorderWeight=True, useAlphaWeight=False, cleanIsolatedTriangles=True, stretchingAllowed=False, textureGutter=4): """Set texture """ filter_xml = ''.join([ ' <filter name="Parameterization fro...
[ "Set", "texture" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/texture.py#L414-L460
[ "def", "param_from_rasters", "(", "script", ",", "useDistanceWeight", "=", "True", ",", "useImgBorderWeight", "=", "True", ",", "useAlphaWeight", "=", "False", ",", "cleanIsolatedTriangles", "=", "True", ",", "stretchingAllowed", "=", "False", ",", "textureGutter", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
section
Compute the polyline representing a planar section (a slice) of a mesh. If the resulting polyline is closed the result can be filled with a triangular mesh representing the section. Args: script: the mlx.FilterScript object or script filename to write the filter to. axis (str):...
meshlabxml/compute.py
def section(script, axis='z', offset=0.0, surface=False, custom_axis=None, planeref=2): """ Compute the polyline representing a planar section (a slice) of a mesh. If the resulting polyline is closed the result can be filled with a triangular mesh representing the section. Args: sc...
def section(script, axis='z', offset=0.0, surface=False, custom_axis=None, planeref=2): """ Compute the polyline representing a planar section (a slice) of a mesh. If the resulting polyline is closed the result can be filled with a triangular mesh representing the section. Args: sc...
[ "Compute", "the", "polyline", "representing", "a", "planar", "section", "(", "a", "slice", ")", "of", "a", "mesh", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/compute.py#L8-L114
[ "def", "section", "(", "script", ",", "axis", "=", "'z'", ",", "offset", "=", "0.0", ",", "surface", "=", "False", ",", "custom_axis", "=", "None", ",", "planeref", "=", "2", ")", ":", "# Convert axis name into number", "if", "axis", ".", "lower", "(", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
measure_geometry
Compute a set of geometric measures of a mesh/pointcloud. Bounding box extents and diagonal, principal axis, thin shell barycenter (mesh only), vertex barycenter and quality-weighted barycenter (pointcloud only), surface area (mesh only), volume (closed mesh) and Inertia tensor Matrix (closed mesh). ...
meshlabxml/compute.py
def measure_geometry(script): """ Compute a set of geometric measures of a mesh/pointcloud. Bounding box extents and diagonal, principal axis, thin shell barycenter (mesh only), vertex barycenter and quality-weighted barycenter (pointcloud only), surface area (mesh only), volume (closed mesh) and Inert...
def measure_geometry(script): """ Compute a set of geometric measures of a mesh/pointcloud. Bounding box extents and diagonal, principal axis, thin shell barycenter (mesh only), vertex barycenter and quality-weighted barycenter (pointcloud only), surface area (mesh only), volume (closed mesh) and Inert...
[ "Compute", "a", "set", "of", "geometric", "measures", "of", "a", "mesh", "/", "pointcloud", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/compute.py#L117-L143
[ "def", "measure_geometry", "(", "script", ")", ":", "filter_xml", "=", "' <xmlfilter name=\"Compute Geometric Measures\"/>\\n'", "util", ".", "write_filter", "(", "script", ",", "filter_xml", ")", "if", "isinstance", "(", "script", ",", "mlx", ".", "FilterScript", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
measure_topology
Compute a set of topological measures over a mesh Args: script: the mlx.FilterScript object or script filename to write the filter to. Layer stack: No impacts MeshLab versions: 2016.12 1.3.4BETA
meshlabxml/compute.py
def measure_topology(script): """ Compute a set of topological measures over a mesh Args: script: the mlx.FilterScript object or script filename to write the filter to. Layer stack: No impacts MeshLab versions: 2016.12 1.3.4BETA """ filter_xml = ' ...
def measure_topology(script): """ Compute a set of topological measures over a mesh Args: script: the mlx.FilterScript object or script filename to write the filter to. Layer stack: No impacts MeshLab versions: 2016.12 1.3.4BETA """ filter_xml = ' ...
[ "Compute", "a", "set", "of", "topological", "measures", "over", "a", "mesh" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/compute.py#L146-L164
[ "def", "measure_topology", "(", "script", ")", ":", "filter_xml", "=", "' <xmlfilter name=\"Compute Topological Measures\"/>\\n'", "util", ".", "write_filter", "(", "script", ",", "filter_xml", ")", "if", "isinstance", "(", "script", ",", "mlx", ".", "FilterScript", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
parse_geometry
Parse the ml_log file generated by the measure_geometry function. Warnings: Not all keys may exist if mesh is not watertight or manifold Args: ml_log (str): MeshLab log file to parse log (str): filename to log output
meshlabxml/compute.py
def parse_geometry(ml_log, log=None, ml_version='2016.12', print_output=False): """Parse the ml_log file generated by the measure_geometry function. Warnings: Not all keys may exist if mesh is not watertight or manifold Args: ml_log (str): MeshLab log file to parse log (str): filename to l...
def parse_geometry(ml_log, log=None, ml_version='2016.12', print_output=False): """Parse the ml_log file generated by the measure_geometry function. Warnings: Not all keys may exist if mesh is not watertight or manifold Args: ml_log (str): MeshLab log file to parse log (str): filename to l...
[ "Parse", "the", "ml_log", "file", "generated", "by", "the", "measure_geometry", "function", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/compute.py#L167-L243
[ "def", "parse_geometry", "(", "ml_log", ",", "log", "=", "None", ",", "ml_version", "=", "'2016.12'", ",", "print_output", "=", "False", ")", ":", "# TODO: read more than one occurrence per file. Record in list.", "aabb", "=", "{", "}", "geometry", "=", "{", "'aab...
177cce21e92baca500f56a932d66bd9a33257af8
test
parse_topology
Parse the ml_log file generated by the measure_topology function. Args: ml_log (str): MeshLab log file to parse log (str): filename to log output Returns: dict: dictionary with the following keys: vert_num (int): number of vertices edge_num (int): number of edge...
meshlabxml/compute.py
def parse_topology(ml_log, log=None, ml_version='1.3.4BETA', print_output=False): """Parse the ml_log file generated by the measure_topology function. Args: ml_log (str): MeshLab log file to parse log (str): filename to log output Returns: dict: dictionary with the following keys: ...
def parse_topology(ml_log, log=None, ml_version='1.3.4BETA', print_output=False): """Parse the ml_log file generated by the measure_topology function. Args: ml_log (str): MeshLab log file to parse log (str): filename to log output Returns: dict: dictionary with the following keys: ...
[ "Parse", "the", "ml_log", "file", "generated", "by", "the", "measure_topology", "function", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/compute.py#L246-L308
[ "def", "parse_topology", "(", "ml_log", ",", "log", "=", "None", ",", "ml_version", "=", "'1.3.4BETA'", ",", "print_output", "=", "False", ")", ":", "topology", "=", "{", "'manifold'", ":", "True", ",", "'non_manifold_E'", ":", "0", ",", "'non_manifold_V'", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
parse_hausdorff
Parse the ml_log file generated by the hausdorff_distance function. Args: ml_log (str): MeshLab log file to parse log (str): filename to log output Returns: dict: dictionary with the following keys: number_points (int): number of points in mesh min_distance (flo...
meshlabxml/compute.py
def parse_hausdorff(ml_log, log=None, print_output=False): """Parse the ml_log file generated by the hausdorff_distance function. Args: ml_log (str): MeshLab log file to parse log (str): filename to log output Returns: dict: dictionary with the following keys: number_po...
def parse_hausdorff(ml_log, log=None, print_output=False): """Parse the ml_log file generated by the hausdorff_distance function. Args: ml_log (str): MeshLab log file to parse log (str): filename to log output Returns: dict: dictionary with the following keys: number_po...
[ "Parse", "the", "ml_log", "file", "generated", "by", "the", "hausdorff_distance", "function", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/compute.py#L311-L355
[ "def", "parse_hausdorff", "(", "ml_log", ",", "log", "=", "None", ",", "print_output", "=", "False", ")", ":", "hausdorff_distance", "=", "{", "\"min_distance\"", ":", "0.0", ",", "\"max_distance\"", ":", "0.0", ",", "\"mean_distance\"", ":", "0.0", ",", "\"...
177cce21e92baca500f56a932d66bd9a33257af8
test
function
Color function using muparser lib to generate new RGBA color for every vertex Red, Green, Blue and Alpha channels may be defined by specifying a function for each. See help(mlx.muparser_ref) for muparser reference documentation. It's possible to use the following per-vertex variables in the e...
meshlabxml/vert_color.py
def function(script, red=255, green=255, blue=255, alpha=255, color=None): """Color function using muparser lib to generate new RGBA color for every vertex Red, Green, Blue and Alpha channels may be defined by specifying a function for each. See help(mlx.muparser_ref) for muparser reference do...
def function(script, red=255, green=255, blue=255, alpha=255, color=None): """Color function using muparser lib to generate new RGBA color for every vertex Red, Green, Blue and Alpha channels may be defined by specifying a function for each. See help(mlx.muparser_ref) for muparser reference do...
[ "Color", "function", "using", "muparser", "lib", "to", "generate", "new", "RGBA", "color", "for", "every", "vertex" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/vert_color.py#L8-L78
[ "def", "function", "(", "script", ",", "red", "=", "255", ",", "green", "=", "255", ",", "blue", "=", "255", ",", "alpha", "=", "255", ",", "color", "=", "None", ")", ":", "# TODO: add options for HSV", "# https://www.cs.rit.edu/~ncs/color/t_convert.html", "if...
177cce21e92baca500f56a932d66bd9a33257af8
test
voronoi
Given a Mesh 'M' and a Pointset 'P', the filter projects each vertex of P over M and color M according to the geodesic distance from these projected points. Projection and coloring are done on a per vertex basis. Args: script: the FilterScript object or script filename to write ...
meshlabxml/vert_color.py
def voronoi(script, target_layer=0, source_layer=1, backward=True): """ Given a Mesh 'M' and a Pointset 'P', the filter projects each vertex of P over M and color M according to the geodesic distance from these projected points. Projection and coloring are done on a per vertex basis. Ar...
def voronoi(script, target_layer=0, source_layer=1, backward=True): """ Given a Mesh 'M' and a Pointset 'P', the filter projects each vertex of P over M and color M according to the geodesic distance from these projected points. Projection and coloring are done on a per vertex basis. Ar...
[ "Given", "a", "Mesh", "M", "and", "a", "Pointset", "P", "the", "filter", "projects", "each", "vertex", "of", "P", "over", "M", "and", "color", "M", "according", "to", "the", "geodesic", "distance", "from", "these", "projected", "points", ".", "Projection",...
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/vert_color.py#L81-L126
[ "def", "voronoi", "(", "script", ",", "target_layer", "=", "0", ",", "source_layer", "=", "1", ",", "backward", "=", "True", ")", ":", "filter_xml", "=", "''", ".", "join", "(", "[", "' <filter name=\"Voronoi Vertex Coloring\">\\n'", ",", "' <Param name=\"Co...
177cce21e92baca500f56a932d66bd9a33257af8
test
cyclic_rainbow
Color mesh vertices in a repeating sinusiodal rainbow pattern Sine wave follows the following equation for each color channel (RGBA): channel = sin(freq*increment + phase)*amplitude + center Args: script: the FilterScript object or script filename to write the filter to. direct...
meshlabxml/vert_color.py
def cyclic_rainbow(script, direction='sphere', start_pt=(0, 0, 0), amplitude=255 / 2, center=255 / 2, freq=0.8, phase=(0, 120, 240, 0), alpha=False): """ Color mesh vertices in a repeating sinusiodal rainbow pattern Sine wave follows the following equation for each color c...
def cyclic_rainbow(script, direction='sphere', start_pt=(0, 0, 0), amplitude=255 / 2, center=255 / 2, freq=0.8, phase=(0, 120, 240, 0), alpha=False): """ Color mesh vertices in a repeating sinusiodal rainbow pattern Sine wave follows the following equation for each color c...
[ "Color", "mesh", "vertices", "in", "a", "repeating", "sinusiodal", "rainbow", "pattern" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/vert_color.py#L129-L212
[ "def", "cyclic_rainbow", "(", "script", ",", "direction", "=", "'sphere'", ",", "start_pt", "=", "(", "0", ",", "0", ",", "0", ")", ",", "amplitude", "=", "255", "/", "2", ",", "center", "=", "255", "/", "2", ",", "freq", "=", "0.8", ",", "phase"...
177cce21e92baca500f56a932d66bd9a33257af8
test
mp_atan2
muparser atan2 function Implements an atan2(y,x) function for older muparser versions (<2.1.0); atan2 was added as a built-in function in muparser 2.1.0 Args: y (str): y argument of the atan2(y,x) function x (str): x argument of the atan2(y,x) function Returns: A muparser stri...
meshlabxml/mp_func.py
def mp_atan2(y, x): """muparser atan2 function Implements an atan2(y,x) function for older muparser versions (<2.1.0); atan2 was added as a built-in function in muparser 2.1.0 Args: y (str): y argument of the atan2(y,x) function x (str): x argument of the atan2(y,x) function Retur...
def mp_atan2(y, x): """muparser atan2 function Implements an atan2(y,x) function for older muparser versions (<2.1.0); atan2 was added as a built-in function in muparser 2.1.0 Args: y (str): y argument of the atan2(y,x) function x (str): x argument of the atan2(y,x) function Retur...
[ "muparser", "atan2", "function" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/mp_func.py#L101-L115
[ "def", "mp_atan2", "(", "y", ",", "x", ")", ":", "return", "'if((x)>0, atan((y)/(x)), if(((x)<0) and ((y)>=0), atan((y)/(x))+pi, if(((x)<0) and ((y)<0), atan((y)/(x))-pi, if(((x)==0) and ((y)>0), pi/2, if(((x)==0) and ((y)<0), -pi/2, 0)))))'", ".", "replace", "(", "'pi'", ",", "str", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
v_cross
muparser cross product function Compute the cross product of two 3x1 vectors Args: u (list or tuple of 3 strings): first vector v (list or tuple of 3 strings): second vector Returns: A list containing a muparser string of the cross product
meshlabxml/mp_func.py
def v_cross(u, v): """muparser cross product function Compute the cross product of two 3x1 vectors Args: u (list or tuple of 3 strings): first vector v (list or tuple of 3 strings): second vector Returns: A list containing a muparser string of the cross product """ """ ...
def v_cross(u, v): """muparser cross product function Compute the cross product of two 3x1 vectors Args: u (list or tuple of 3 strings): first vector v (list or tuple of 3 strings): second vector Returns: A list containing a muparser string of the cross product """ """ ...
[ "muparser", "cross", "product", "function" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/mp_func.py#L118-L138
[ "def", "v_cross", "(", "u", ",", "v", ")", ":", "\"\"\"\n i = u[1]*v[2] - u[2]*v[1]\n j = u[2]*v[0] - u[0]*v[2]\n k = u[0]*v[1] - u[1]*v[0]\n \"\"\"", "i", "=", "'(({u1})*({v2}) - ({u2})*({v1}))'", ".", "format", "(", "u1", "=", "u", "[", "1", "]", ",", "u2", ...
177cce21e92baca500f56a932d66bd9a33257af8
test
v_multiply
Multiply vector by scalar
meshlabxml/mp_func.py
def v_multiply(scalar, v1): """ Multiply vector by scalar""" vector = [] for i, x in enumerate(v1): vector.append('(({})*({}))'.format(scalar, v1[i])) return vector
def v_multiply(scalar, v1): """ Multiply vector by scalar""" vector = [] for i, x in enumerate(v1): vector.append('(({})*({}))'.format(scalar, v1[i])) return vector
[ "Multiply", "vector", "by", "scalar" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/mp_func.py#L165-L170
[ "def", "v_multiply", "(", "scalar", ",", "v1", ")", ":", "vector", "=", "[", "]", "for", "i", ",", "x", "in", "enumerate", "(", "v1", ")", ":", "vector", ".", "append", "(", "'(({})*({}))'", ".", "format", "(", "scalar", ",", "v1", "[", "i", "]",...
177cce21e92baca500f56a932d66bd9a33257af8
test
torus_knot
A tight (small inner crossings) (p,q) torus knot parametric curve Source (for trefoil): https://en.wikipedia.org/wiki/Trefoil_knot
meshlabxml/mp_func.py
def torus_knot(t, p=3, q=4, scale=1.0, radius=2.0): """ A tight (small inner crossings) (p,q) torus knot parametric curve Source (for trefoil): https://en.wikipedia.org/wiki/Trefoil_knot """ return ['{scale}*(sin({t}) + ({radius})*sin({p}*({t})))'.format(t=t, p=p, scale=scale, radius=radius), ...
def torus_knot(t, p=3, q=4, scale=1.0, radius=2.0): """ A tight (small inner crossings) (p,q) torus knot parametric curve Source (for trefoil): https://en.wikipedia.org/wiki/Trefoil_knot """ return ['{scale}*(sin({t}) + ({radius})*sin({p}*({t})))'.format(t=t, p=p, scale=scale, radius=radius), ...
[ "A", "tight", "(", "small", "inner", "crossings", ")", "(", "p", "q", ")", "torus", "knot", "parametric", "curve" ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/mp_func.py#L191-L199
[ "def", "torus_knot", "(", "t", ",", "p", "=", "3", ",", "q", "=", "4", ",", "scale", "=", "1.0", ",", "radius", "=", "2.0", ")", ":", "return", "[", "'{scale}*(sin({t}) + ({radius})*sin({p}*({t})))'", ".", "format", "(", "t", "=", "t", ",", "p", "=",...
177cce21e92baca500f56a932d66bd9a33257af8
test
vert_attr
Add a new Per-Vertex scalar attribute to current mesh and fill it with the defined function. The specified name can be used in other filter functions. It's possible to use parenthesis, per-vertex variables and boolean operator: (, ), and, or, <, >, = It's possible to use the following per-...
meshlabxml/mp_func.py
def vert_attr(script, name='radius', function='x^2 + y^2'): """ Add a new Per-Vertex scalar attribute to current mesh and fill it with the defined function. The specified name can be used in other filter functions. It's possible to use parenthesis, per-vertex variables and boolean operator: ...
def vert_attr(script, name='radius', function='x^2 + y^2'): """ Add a new Per-Vertex scalar attribute to current mesh and fill it with the defined function. The specified name can be used in other filter functions. It's possible to use parenthesis, per-vertex variables and boolean operator: ...
[ "Add", "a", "new", "Per", "-", "Vertex", "scalar", "attribute", "to", "current", "mesh", "and", "fill", "it", "with", "the", "defined", "function", "." ]
3DLIRIOUS/MeshLabXML
python
https://github.com/3DLIRIOUS/MeshLabXML/blob/177cce21e92baca500f56a932d66bd9a33257af8/meshlabxml/mp_func.py#L207-L258
[ "def", "vert_attr", "(", "script", ",", "name", "=", "'radius'", ",", "function", "=", "'x^2 + y^2'", ")", ":", "filter_xml", "=", "''", ".", "join", "(", "[", "' <filter name=\"Define New Per Vertex Attribute\">\\n'", ",", "' <Param name=\"name\" '", ",", "'val...
177cce21e92baca500f56a932d66bd9a33257af8