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

Method test_empty_mesh

python/pymesh/tests/test_compression.py:61–70  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

59 data = pymesh.compress(mesh)
60
61 def test_empty_mesh(self):
62 vertices = numpy.zeros((0, 3), dtype=float)
63 faces = np.zeros((0, 3), dtype=int)
64 mesh = pymesh.form_mesh(vertices, faces)
65
66 data = pymesh.compress(mesh)
67 mesh2 = pymesh.decompress(data)
68
69 self.assertEqual(mesh.num_vertices, mesh2.num_vertices)
70 self.assertEqual(mesh.num_faces, mesh2.num_faces)
71
72 def test_attributes(self):
73 mesh = pymesh.generate_icosphere(1.0, np.zeros(3), 2)

Callers

nothing calls this directly

Calls 3

form_meshMethod · 0.45
compressMethod · 0.45
decompressMethod · 0.45

Tested by

no test coverage detected