From b4caf3b2ddb534f65e00bb1e8c034c45e93400be Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Sun, 25 Jan 2026 15:27:23 +1100 Subject: [PATCH] Fix #7153. Fix regression in purging types in IFC2X3 from 56861b9 --- src/bonsai/bonsai/tool/type.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/bonsai/bonsai/tool/type.py b/src/bonsai/bonsai/tool/type.py index 6c98e8bb59..43d86d5076 100644 --- a/src/bonsai/bonsai/tool/type.py +++ b/src/bonsai/bonsai/tool/type.py @@ -74,11 +74,13 @@ class Type(bonsai.core.tool.Type): def get_model_types(cls) -> list[ifcopenshell.entity_instance]: ifc_file = tool.Ifc.get() types = ifc_file.by_type("IfcElementType") - types += ifc_file.by_type("IfcSpatialElementType") - types += ifc_file.by_type("IfcTypeProduct", include_subtypes=False) - if not tool.Ifc.get_schema().startswith("IFC4X3"): + if tool.Ifc.get_schema() == "IFC2X3": types += ifc_file.by_type("IfcWindowStyle") types += ifc_file.by_type("IfcDoorStyle") + types += ifc_file.by_type("IfcSpatialStructureElementType") + else: + types += ifc_file.by_type("IfcSpatialElementType") + types += ifc_file.by_type("IfcTypeProduct", include_subtypes=False) return types @classmethod