Previous topic

Parser (off_parser.parser)

Next topic

off_parser.parser.OffParser.from_data

This Page

off_parser.parser.OffParser

class off_parser.parser.OffParser(path, label=None)[source]

An object for parsing and storing data from OFF (Object File Format) files, which store 3D model data. See wikipedia for the file format specification.

Parameters:
path : str

The path to the ASCII .OFF file.

label : str

The data label.

Attributes:
label : str

The data label.

points : array

The array of vertex points of shape (N, 3).

faces : list

A list of lists of point indices constructing each face.

Methods

from_data(data[, label]) Creates a new object from parsed data.
load_ascii(path) Loads an ASCII .OFF file into the object.
load_list(data) Loads a list of file data into the object.
plot([ax, symbols]) Plots the model in 3D.