From 8197621232f9cd46b90fe72dd964bb8c978df76e Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Thu, 30 Jul 2020 17:08:49 +1000 Subject: [PATCH] Curves, if they are a swept disk solid, may belong to multiple items. Not sure if this is the best approach. It'll probably bite me in the future. --- src/ifcblenderexport/blenderbim/bim/export_ifc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ifcblenderexport/blenderbim/bim/export_ifc.py b/src/ifcblenderexport/blenderbim/bim/export_ifc.py index 38c60044cf..d5d2b2842c 100644 --- a/src/ifcblenderexport/blenderbim/bim/export_ifc.py +++ b/src/ifcblenderexport/blenderbim/bim/export_ifc.py @@ -1852,6 +1852,8 @@ class IfcExporter(): for mapped_item in representation.Items: items = mapped_item[0].MappedRepresentation.Items for i, item in enumerate(items): + if i >= len(product['raw'].material_slots): + i = 0 material_slots[product['raw'].material_slots[i].name] = item for styled_item_name, representation_item in material_slots.items(): if styled_item_name == styled_item['attributes']['Name']: