PLYReader

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

Bases: object

Class for reading raw geometric data from PLY files.

Parameters

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

Class Attributes
  • keywords (list[str]) – Reserved keywords in PLY format language.

  • property_types (dict[str, object]) – Mapping between PLY property types and Python types.

  • binary_property_types (dict[str, str]) – Mapping between PLY property types and binary type strings.

  • number_of_bytes_per_type (dict[str, int]) – Mapping between PLY property types and number of bytes.

  • struct_format_per_type (dict[str, str]) – Mapping between PLY property types and struct formats.

  • binary_byte_order (dict[str, str]) – Mapping between endian type and endian symbol.

Methods

is_ascii

Verify that the file is in ASCII format.

is_binary

Verify that the file is in binary format.

is_valid

Verify that the file is valid by reading the header.

read

Read the contents of the file.