mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-29 03:37:21 +00:00
Only allow material assignment if we have available materials to assign. See #1222.
This commit is contained in:
@@ -31,25 +31,33 @@ class Data:
|
||||
|
||||
@classmethod
|
||||
def load_materials(cls):
|
||||
cls.materials = {}
|
||||
cls.load_element("IfcMaterial", cls.materials)
|
||||
|
||||
@classmethod
|
||||
def load_constituents(cls):
|
||||
cls.constituent_sets = {}
|
||||
cls.constituents = {}
|
||||
cls.load_element("IfcMaterialConstituent", cls.constituents)
|
||||
cls.load_element("IfcMaterialConstituentSet", cls.constituent_sets)
|
||||
|
||||
@classmethod
|
||||
def load_layers(cls):
|
||||
cls.layer_sets = {}
|
||||
cls.layers = {}
|
||||
cls.load_element("IfcMaterialLayer", cls.layers)
|
||||
cls.load_element("IfcMaterialLayerSet", cls.layer_sets)
|
||||
|
||||
@classmethod
|
||||
def load_profiles(cls):
|
||||
cls.profile_sets = {}
|
||||
cls.profiles = {}
|
||||
cls.load_element("IfcMaterialProfile", cls.profiles)
|
||||
cls.load_element("IfcMaterialProfileSet", cls.profile_sets)
|
||||
|
||||
@classmethod
|
||||
def load_lists(cls):
|
||||
cls.lists = {}
|
||||
cls.load_element("IfcMaterialList", cls.lists)
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user