STLParser

class compas.files.STLParser(reader, precision=None)[source]

Bases: object

Class for parsing data from a STL file.

The parser converts the raw geometric data of the file into corresponding COMPAS geometry objects and data structures.

Parameters
  • reader (STLReader) – A STL file reader.

  • precision (str, optional) – COMPAS precision specification for parsing geometric data.

Attributes
  • vertices (list[list[float]]) – The vertex coordinates.

  • faces (list[list[int]]) – The faces as lists of vertex indices.

Methods

parse

Parse the the data found by the reader.