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

Method save_mesh

python/pymesh/TestCase.py:61–78  ·  view source on GitHub ↗

Save mesh to file. Args: filename: If filename is relative, it would be place in a tmp dir. mesh: Mesh object. *attributes: The list of attribute names to be saved. **setting: ascii: Boolean indicator of whether to save with a

(self, filename, mesh, *attributes, **setting)

Source from the content-addressed store, hash-verified

59 return form_mesh(vertices, faces, voxels)
60
61 def save_mesh(self, filename, mesh, *attributes, **setting):
62 """ Save mesh to file.
63
64 Args:
65 filename: If filename is relative, it would be place in a tmp dir.
66 mesh: Mesh object.
67 *attributes: The list of attribute names to be saved.
68 **setting:
69 ascii: Boolean indicator of whether to save with ascii encoding
70 when possible. Default is false.
71
72 Returns:
73 The absolute path to the saved file.
74 """
75 if not os.path.isabs(filename):
76 filename = os.path.join(self.tmp_dir, filename)
77 save_mesh(filename, mesh, *attributes, **setting)
78 return filename
79
80 def save_mesh_raw(self, filename, vertices, faces, voxels=None, **setting):
81 """ Save raw mesh data to file.

Callers 1

write_and_loadMethod · 0.45

Calls 1

save_meshFunction · 0.70

Tested by

no test coverage detected