Removing a material now also removes material properties

This commit is contained in:
Dion Moult
2022-03-21 10:50:19 +11:00
parent e909f25432
commit 0b4cfea3a9
2 changed files with 30 additions and 0 deletions
@@ -40,6 +40,10 @@ class Usecase:
self.file.remove(inverse)
elif inverse.is_a("IfcRelAssociatesMaterial"):
self.file.remove(inverse)
elif inverse.is_a("IfcMaterialProperties"):
for prop in inverse.Properties or []:
self.file.remove(prop)
self.file.remove(inverse)
elif inverse.is_a("IfcMaterialDefinitionRepresentation"):
for representation in inverse.Representations:
for item in representation.Items: