OFFReader

class compas.files.OFFReader(filepath)[source]

Bases: object

Class for reading raw geometric data from OFF files.

Parameters

filepath (path string | file-like object | URL string) – A path, a file-like object or a URL pointing to a file.

Attributes
  • vertices (list[list[float, float, float]]) – List of lists of vertex coordinates.

  • faces (list[list[int]) – List of lists of references to vertex coordinates.

Notes

The OFF reader currently only supports reading of vertices and faces of polygon meshes.

Methods

open

Open the file and read its contents.

post

Post-process the contents.

pre

Pre-process the contents.

read

Read the contents of the file, line by line.