mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
api.project.append_asset Material Layer orphan fix
Fixes typo introduced in b4740b6 where `element in MATERIAL_SETS` should
have been `element.is_a() in MATERIAL_SETS`. This resulted in
deduplication of layersets, but not of the layers themselves.
This commit is contained in:
@@ -264,7 +264,7 @@ class Usecase:
|
||||
name = element.Name
|
||||
return next((e for e in self.file.by_type("IfcMaterial") if e.Name == name), None)
|
||||
|
||||
elif element in MATERIAL_SETS:
|
||||
elif element.is_a() in MATERIAL_SETS:
|
||||
ifc_class = element.is_a()
|
||||
name_attr = "LayerSetName" if ifc_class == "IfcMaterialLayerSet" else "Name"
|
||||
material_set_name = getattr(element, name_attr)
|
||||
|
||||
Reference in New Issue
Block a user