pyFM.mesh.file_utils.write_off

pyFM.mesh.file_utils.write_off(filepath, vertices, faces, precision=None, face_colors=None)

Writes a mesh to a .off file

The number of significant digit to use can be specified for memory saving.

Parameters:
  • filepath (str) – path to the .off file to write

  • vertices (np.ndarray) – (n,3) array of vertices coordinates

  • faces (np.ndarray) – (m,3) array of indices of face vertices

  • precision (int, optional) – number of significant digits to write for each float. Defaults to 16

  • face_colors (np.ndarray, optional) – (m,3) array of colors for each face