OBJReader

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

Bases: object

Read the contents of an obj file.

Parameters

filepath (str) – Path to the file.

Attributes
  • vertices (list) – Vertex coordinates.

  • weights (list) – Vertex weights.

  • textures (list) – Vertex textures.

  • normals (list) – Vertex normals.

  • points (list) – Point objects, referencing the list of vertices.

  • lines (list) – Line objects, referencing the list of vertices.

  • faces (list) – Face objects, referencing the list of vertices.

  • curves (list) – Curves

  • curves2 (list) – Curves

  • surfaces (list) – Surfaces

Notes

For more info, see 1.

References

1

Bourke, P. Object Files. Available at: http://paulbourke.net/dataformats/obj/.

Methods

__init__(filepath)

Initialize self.

open()

post()

pre()

read()

Read the contents of the file, line by line.