From fd5f1fae3e97aafc1262415591554692ebd90576 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Tue, 26 Jun 2018 15:17:22 -0300 Subject: [PATCH] Arch: Fixed IFC export of window openings --- src/Mod/Arch/importIFC.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Mod/Arch/importIFC.py b/src/Mod/Arch/importIFC.py index c00b0ceca4..76aacdca87 100644 --- a/src/Mod/Arch/importIFC.py +++ b/src/Mod/Arch/importIFC.py @@ -1199,8 +1199,15 @@ def export(exportList,filename): ifcfile.createIfcRelAggregates(ifcopenshell.guid.compress(uuid.uuid1().hex),history,'Addition','',product,[prod2]) # subtractions + guests = [] + for o in obj.InList: + if hasattr(o,"Hosts"): + for co in o.Hosts: + if co == obj: + if not o in guests: + guests.append(o) if hasattr(obj,"Subtractions") and (shapetype == "extrusion"): - for o in obj.Subtractions: + for o in obj.Subtractions + guests: r2,p2,c2 = getRepresentation(ifcfile,context,o,forcebrep=True,subtraction=True) if DEBUG: print(" subtracting ",c2," : ",o.Label) prod2 = ifcfile.createIfcOpeningElement(ifcopenshell.guid.compress(uuid.uuid1().hex),history,o.Label.encode("utf8"),None,None,p2,r2,None)