MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / minkowski_sum

Function minkowski_sum

python/pymesh/minkowski_sum.py:6–21  ·  view source on GitHub ↗

Perform Minkowski sum of a mesh with a poly-line. Args: mesh (:class:`Mesh`): Input mesh. path (:class:`numpy.ndarray`): a :math:`n \times 3` matrix. Each row represents a node in the poly-line. Returns: A mesh representing the Minkowski sum of the inputs.

(mesh, path)

Source from the content-addressed store, hash-verified

4from .meshutils import remove_isolated_vertices
5
6def minkowski_sum(mesh, path):
7 """ Perform Minkowski sum of a mesh with a poly-line.
8
9 Args:
10 mesh (:class:`Mesh`): Input mesh.
11 path (:class:`numpy.ndarray`): a :math:`n \times 3` matrix. Each row
12 represents a node in the poly-line.
13
14 Returns: A mesh representing the Minkowski sum of the inputs.
15 """
16 min_sum = PyMesh.MinkowskiSum.create_raw(mesh.vertices, mesh.faces)
17 min_sum.run(path)
18
19 result = form_mesh(min_sum.get_vertices(), min_sum.get_faces())
20
21 return result

Callers 4

test_simpleMethod · 0.90
test_coplanarMethod · 0.90
test_near_coplanarMethod · 0.90
test_chainMethod · 0.90

Calls 5

form_meshFunction · 0.85
create_rawMethod · 0.45
runMethod · 0.45
get_verticesMethod · 0.45
get_facesMethod · 0.45

Tested by 4

test_simpleMethod · 0.72
test_coplanarMethod · 0.72
test_near_coplanarMethod · 0.72
test_chainMethod · 0.72