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

Function cut_to_disk

python/pymesh/cut_to_disk.py:4–16  ·  view source on GitHub ↗

Cut a mesh open into disk topology. (Note the cut may not be optimal.) This method assumes the input mesh is edge-manifold. Args: mesh (:class:`Mesh`): Input mesh. Returns: The same mesh as input but cutted so it is topologically equivalent to a disk.

(mesh)

Source from the content-addressed store, hash-verified

2from .meshio import form_mesh
3
4def cut_to_disk(mesh):
5 """ Cut a mesh open into disk topology. (Note the cut may not be optimal.)
6 This method assumes the input mesh is edge-manifold.
7
8 Args:
9 mesh (:class:`Mesh`): Input mesh.
10
11 Returns: The same mesh as input but cutted so it is topologically equivalent
12 to a disk.
13 """
14 cutter = PyMesh.DiskCutter.create(mesh.raw_mesh)
15 cutter.run()
16 return form_mesh(cutter.vertices, cutter.faces)

Callers 4

test_cut_sphereMethod · 0.90
test_cut_tubeMethod · 0.90
test_cut_nonmanifoldMethod · 0.90
runMethod · 0.85

Calls 3

form_meshFunction · 0.85
createMethod · 0.45
runMethod · 0.45

Tested by 3

test_cut_sphereMethod · 0.72
test_cut_tubeMethod · 0.72
test_cut_nonmanifoldMethod · 0.72