mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 17:57:02 +00:00
fix bug in adding psets for materials
This commit is contained in:
@@ -43,8 +43,8 @@ class Usecase:
|
|||||||
self.settings["product"].HasPropertySets = has_property_sets
|
self.settings["product"].HasPropertySets = has_property_sets
|
||||||
return pset
|
return pset
|
||||||
elif self.settings["product"].is_a("IfcMaterialDefinition"):
|
elif self.settings["product"].is_a("IfcMaterialDefinition"):
|
||||||
for definition in self.settings["product"].HasPropertySets or []:
|
for definition in self.settings["product"].HasProperties or []:
|
||||||
if definition.Name == self.settings["name"]:
|
if definition.Name == self.settings["Name"]:
|
||||||
return definition
|
return definition
|
||||||
|
|
||||||
return self.file.create_entity(
|
return self.file.create_entity(
|
||||||
|
|||||||
@@ -59,8 +59,9 @@ class Data:
|
|||||||
@classmethod
|
@classmethod
|
||||||
def add_pset(cls, pset, product_id):
|
def add_pset(cls, pset, product_id):
|
||||||
data = pset.get_info()
|
data = pset.get_info()
|
||||||
del data["OwnerHistory"]
|
if not pset.is_a("IfcMaterialProperties"):
|
||||||
del data["HasProperties"]
|
del data["OwnerHistory"]
|
||||||
|
del data["HasProperties"]
|
||||||
if hasattr(pset, "HasProperties"):
|
if hasattr(pset, "HasProperties"):
|
||||||
props = pset.HasProperties or []
|
props = pset.HasProperties or []
|
||||||
elif hasattr(pset, "Properties"):
|
elif hasattr(pset, "Properties"):
|
||||||
|
|||||||
Reference in New Issue
Block a user