diff --git a/src/Mod/Arch/exportIFCStructuralTools.py b/src/Mod/Arch/exportIFCStructuralTools.py index b3f415c4e2..a154aa05d8 100644 --- a/src/Mod/Arch/exportIFCStructuralTools.py +++ b/src/Mod/Arch/exportIFCStructuralTools.py @@ -258,38 +258,38 @@ def createStructuralMember(ifcfile, ifcbin, obj): structuralMember = ifcfile.createIfcStructuralSurfaceMember( uid(), ownerHistory, obj.Label, None, None, localPlacement, prodDefShape, "SHELL", thickness) - # check for existing connection nodes - for vert in verts: - vertCoord = tuple(vert) - if vertCoord in structural_nodes: - if structural_nodes[vertCoord]: - # there is already another member using this point - structPntConn = structural_nodes[vertCoord] - else: - # there is another member with same point, create a new node connection - structPntConn = createStructuralNode(ifcfile, ifcbin, vert) - structural_nodes[vertCoord] = structPntConn - ifcfile.createIfcRelConnectsStructuralMember( - uid(), ownerHistory, None, None, structuralMember, structPntConn, None, None, None, None) + # check for existing connection nodes + for vert in verts: + vertCoord = tuple(vert) + if vertCoord in structural_nodes: + if structural_nodes[vertCoord]: + # there is already another member using this point + structPntConn = structural_nodes[vertCoord] else: - # just add the point, no other member using it yet - structural_nodes[vertCoord] = None + # there is another member with same point, create a new node connection + structPntConn = createStructuralNode(ifcfile, ifcbin, vert) + structural_nodes[vertCoord] = structPntConn + ifcfile.createIfcRelConnectsStructuralMember( + uid(), ownerHistory, None, None, structuralMember, structPntConn, None, None, None, None) + else: + # just add the point, no other member using it yet + structural_nodes[vertCoord] = None - # check for existing connection curves - for edge in edges: - if edge in structural_curves: - if structural_curves[edge]: - # there is already another member using this curve - strucCrvConn = structural_curves[edge] - else: - # there is another member with same edge, create a new curve connection - strucCrvConn = createStructuralCurve(ifcfile, ifcbin, edge) - structural_curves[edge] = strucCrvConn - ifcfile.createIfcRelConnectsStructuralMember( - uid(), None, None, None, structuralMember, strucCrvConn, None, None, None, None) + # check for existing connection curves + for edge in edges: + if edge in structural_curves: + if structural_curves[edge]: + # there is already another member using this curve + strucCrvConn = structural_curves[edge] else: - # just add the curve, no other member using it yet - structural_curves[edge] = None + # there is another member with same edge, create a new curve connection + strucCrvConn = createStructuralCurve(ifcfile, ifcbin, edge) + structural_curves[edge] = strucCrvConn + ifcfile.createIfcRelConnectsStructuralMember( + uid(), None, None, None, structuralMember, strucCrvConn, None, None, None, None) + else: + # just add the curve, no other member using it yet + structural_curves[edge] = None return structuralMember