Fix #7153. Fix regression in purging types in IFC2X3 from 56861b9

This commit is contained in:
Dion Moult
2026-01-25 15:27:23 +11:00
parent 0e4f2fada1
commit b4caf3b2dd
+5 -3
View File
@@ -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