def to_off(self, filepath, **kwargs): """Write a mesh object to an OFF file. Parameters ---------- filepath : str The path to the file. Examples -------- >>> """ off = OFF(filepath) off.write(self, **kwargs)
def to_off(self, filepath, **kwargs): """Write a mesh object to an OFF file. Parameters ---------- filepath : str The path to the file. Returns ------- None """ off = OFF(filepath) off.write(self, **kwargs)
def from_off(cls, filepath): """Construct a mesh object from the data described in a OFF file. Parameters ---------- filepath : str The path to the file. Returns ------- :class:`compas.datastructures.Mesh` A mesh object. """ off = OFF(filepath) vertices = off.reader.vertices faces = off.reader.faces mesh = cls.from_vertices_and_faces(vertices, faces) return mesh
def from_off(cls, filepath): """Construct a mesh object from the data described in a OFF file. Parameters ---------- filepath : str The path to the file. Returns ------- Mesh : A mesh object. Examples -------- >>> """ off = OFF(filepath) vertices = off.reader.vertices faces = off.reader.faces mesh = cls.from_vertices_and_faces(vertices, faces) return mesh
def from_off(cls, filepath, precision='3f'): """Construct a triangle mesh from the data in an OFF file.""" off = OFF(filepath, precision) return cls(off.reader.vertices, off.reader.faces)