Merge pull request #9649 from yorikvanhavre/arch-ifc-rectange

Arch: Fixed wrong IFC export of rectangles
This commit is contained in:
Yorik van Havre
2023-05-30 15:13:11 +02:00
committed by GitHub

View File

@@ -1919,6 +1919,9 @@ def getProfile(ifcfile,p):
#h = min(abs((semiPerimeter + diff)/2),abs((semiPerimeter - diff)/2))
b = p.Edges[0].Length
h = p.Edges[1].Length
if h == b:
# are these edges unordered? To be on the safe side, check the next one
h = p.Edges[2].Length
profile = ifcbin.createIfcRectangleProfileDef("AREA",'rectangular',pt,b,h)
elif (len(p.Faces) == 1) and (len(p.Wires) > 1):
# face with holes