code: def export_off(mesh, digits=10):
      
      # make sure specified digits is an int
      digits = int(digits)
      # prepend a 3 (face count) to each face
      faces_stacked = np.column_stack((np.ones(len(mesh.faces)) * 3,
                                       mesh.faces)).astype(np.int64)
      export = 'OFF\n'
      # the header is vertex count, face count, another number
      export += str(len(mesh.vertices)) + ' ' + str(len(mesh.faces)) + ' 0\n'
      export += util.array_to_string(
          mesh.vertices, col_delim=' ', row_delim='\n', digits=digits) + '\n'
      export += util.array_to_string(
          faces_stacked, col_delim=' ', row_delim='\n')
      return export
docs: Export a mesh as an OFF file, a simple text format
  
      Parameters
      -----------
      mesh : trimesh.Trimesh
        Geometry to export
      digits : int
        Number of digits to include on floats
  
      Returns
      -----------
      export : str
        OFF format output