Fix remove_representation error #6059

After to_delete was explicitly added as an attribute to ifcopenshell.file (previously it was kind of hacky assigned during batch remove).
This commit is contained in:
Andrej730
2025-01-29 16:00:56 +05:00
parent 85e0fa9147
commit 871710a0aa
@@ -66,7 +66,7 @@ def remove_representation(file: ifcopenshell.file, representation: ifcopenshell.
for colour in colours:
ifcopenshell.util.element.remove_deep2(file, colour)
to_delete = getattr(file, "to_delete", ())
to_delete = file.to_delete or set()
for element in styled_items:
if not element.Item or element.Item in to_delete:
file.remove(element)