From de37aeb515345af66501fbc579b1c53645e85885 Mon Sep 17 00:00:00 2001 From: Bruno Postle Date: Tue, 6 Apr 2021 23:28:11 +0100 Subject: [PATCH] faces in DXF polyfacemesh objects can have three or four sides (#1414) --- src/blenderbim/dxf2ifc.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/blenderbim/dxf2ifc.py b/src/blenderbim/dxf2ifc.py index ed0726ab5f..223e5b8fff 100644 --- a/src/blenderbim/dxf2ifc.py +++ b/src/blenderbim/dxf2ifc.py @@ -1,3 +1,6 @@ +import ifcopenshell +import ezdxf + class Dxf2Ifc: def execute(self): self.create_ifc_file() @@ -14,7 +17,7 @@ class Dxf2Ifc: [ self.file.createIfcFaceOuterBound( self.file.createIfcPolyLoop( - [self.file.createIfcCartesianPoint((v.dxf.location)) for v in face[0:3]] + [self.file.createIfcCartesianPoint((face[index].dxf.location)) for index in range(len(face) -1)] ), True, )