def test_write_mesh(basic_mesh, tmpdir): filepath = str(tmpdir.join('test.h5')) basic_mesh.write_to_file(filepath) new_mesh = trimesh_io.read_mesh_h5(filepath) assert (np.all(basic_mesh.vertices == new_mesh[0]))
def test_write_mesh(basic_mesh, tmpdir): tempfile = str(tmpdir.join('test.h5')) trimesh_io.write_mesh_h5(tempfile, basic_mesh.vertices, basic_mesh.faces) new_mesh = trimesh_io.read_mesh_h5(tempfile) assert (np.all(basic_mesh.vertices == new_mesh[0]))
def build_full_cell_mesh(): filepath = 'test/test_files/648518346349499581.h5' vertices, faces, normals, link_edges, node_mask = trimesh_io.read_mesh_h5( filepath) mesh = trimesh_io.Mesh(vertices, faces) yield mesh