22 lines
594 B
Python
22 lines
594 B
Python
|
"""
|
||
|
Obj module parses obj files and import the geometry into the city model structure
|
||
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||
|
Copyright © 2020 Project Author Pilar Monsalvete Álvarez de Uribarri pilar.monsalvete@concordia.ca
|
||
|
"""
|
||
|
import trimesh.exchange.obj
|
||
|
|
||
|
|
||
|
class Obj:
|
||
|
"""
|
||
|
Obj class
|
||
|
"""
|
||
|
def __init__(self, path):
|
||
|
self._city = None
|
||
|
with open(path, 'r') as file:
|
||
|
self._scene = trimesh.exchange.obj.load_obj(file)
|
||
|
# todo: review class trimesh.exchange.load that returns Trimesh or Trimesh.scene
|
||
|
|
||
|
@property
|
||
|
def scene(self) -> dict:
|
||
|
return self._scene
|