New system module with UI to browse systems in an IFC.

This commit is contained in:
Dion Moult
2021-07-22 17:40:50 +10:00
parent 1c71af058f
commit 8071e079b3
12 changed files with 476 additions and 2 deletions
@@ -0,0 +1,24 @@
class Data:
is_loaded = False
products = {}
systems = {}
@classmethod
def purge(cls):
cls.is_loaded = False
cls.products = {}
cls.systems = {}
@classmethod
def load(cls, file):
cls.products = {}
cls.systems = {}
for system in file.by_type("IfcSystem", include_subtypes=False):
if system.IsGroupedBy:
for rel in system.IsGroupedBy:
for product in rel.RelatedObjects:
cls.products.setdefault(product.id(), []).append(system.id())
data = system.get_info()
del data["OwnerHistory"]
cls.systems[system.id()] = data
cls.is_loaded=True