Project

Projects contain a list of PointSet, LineSet, Surface, and Volume. Projects can be serialized to file using OMFWriter:

proj = omf.Project()
...
proj.elements = [...]
...
OMFWriter(proj, 'outfile.omf')

For more details on how to build a project, see the OMF API Example.

class omf.base.Project(**kwargs)[source]

OMF Project for serializing to .omf file

Required Properties:

  • author (String): Author, a unicode string
  • description (String): Description, a unicode string
  • elements (a list of ProjectElement): Project Elements, a list (each item is an instance of ProjectElement)
  • name (String): Title, a unicode string
  • origin (Vector3): Origin point for all elements in the project, a 3D Vector of <type ‘float’> with shape (3), Default: [0.0, 0.0, 0.0]
  • revision (String): Revision, a unicode string
  • units (String): Spatial units of project, a unicode string

Optional Properties:

  • date (DateTime): Date associated with the project data, a datetime object

Other Properties:

  • date_created (GettableProperty): Date project was created
  • date_modified (GettableProperty): Date project was modified
  • uid (Uuid): Unique identifier, a unique ID auto-generated with uuid.uuid4()