Skip to content
This repository was archived by the owner on Nov 24, 2024. It is now read-only.

Commit de37aeb

Browse files
authored
faces in DXF polyfacemesh objects can have three or four sides (IfcOpenShell#1414)
1 parent 23be1a6 commit de37aeb

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/blenderbim/dxf2ifc.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import ifcopenshell
2+
import ezdxf
3+
14
class Dxf2Ifc:
25
def execute(self):
36
self.create_ifc_file()
@@ -14,7 +17,7 @@ def execute(self):
1417
[
1518
self.file.createIfcFaceOuterBound(
1619
self.file.createIfcPolyLoop(
17-
[self.file.createIfcCartesianPoint((v.dxf.location)) for v in face[0:3]]
20+
[self.file.createIfcCartesianPoint((face[index].dxf.location)) for index in range(len(face) -1)]
1821
),
1922
True,
2023
)

0 commit comments

Comments
 (0)