OBJParser
- class compas.files.OBJParser(reader, precision=None)[source]
Bases:
object
Class for parsing data from a OBJ file.
The parser converts the raw geometric data of the file into corresponding COMPAS geometry objects and data structures.
- Parameters
reader (
OBJReader
) – A OBJ file reader.precision (str) – COMPAS precision specification for parsing geometric data.
- Attributes
reader (
OBJReader
) – An OBJ file reader.vertices (list[list[float, float, float]]) – List of lists of parsed vertex coordinates. Parsed vertices are unique up to the specified precision.
points (list[int]) – List of references to parsed vertex coordinates.
lines (list[tuple[int, int]]) – List of pairs of references to parsed vertex coordinates.
polylines (list[list[int]) – List of lists of references to parsed vertex coordinates.
faces (list[list[int]) – List of lists of references to parsed vertex coordinates.
groups (dict[str, tuple[list[int], list[list[int]]]]) – Groups of mesh objects defined by their parsed vertices and faces.
objects (dict[str, tuple[list[int], list[list[int]]]]) – Named mesh objects defined by their parsed vertices and faces.
Methods
Parse the the data found by the reader.