First attempt at ripping out agnostic code into ifcopenshell.api namespace. See #1399.

This commit is contained in:
Dion Moult
2021-03-25 10:48:31 +11:00
parent 911d703f57
commit d77bc6bdaa
190 changed files with 388 additions and 437 deletions
@@ -0,0 +1,17 @@
class Data:
products = {}
@classmethod
def purge(cls):
cls.products = {}
@classmethod
def load(cls, file, product_id):
if not file:
return
product = file.by_id(product_id)
cls.products[product_id] = {
"type": product.is_a(),
"PredefinedType": product.PredefinedType if hasattr(product, "PredefinedType") else None,
"ObjectType": product.ObjectType if hasattr(product, "ObjectType") else None
}