From 698ef40adac14d5774d8c272db05b9e08aca2596 Mon Sep 17 00:00:00 2001 From: Laurens Oostwegel Date: Sun, 7 Nov 2021 10:55:47 +0100 Subject: [PATCH] ifccityjson: prevent interior holes in faces as there is a bug in the geometry generation --- src/ifccityjson/geometry.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ifccityjson/geometry.py b/src/ifccityjson/geometry.py index 23e843a902..e278f6edfe 100644 --- a/src/ifccityjson/geometry.py +++ b/src/ifccityjson/geometry.py @@ -158,12 +158,12 @@ class GeometryIO: if len(face) == 1: return IFC_model.create_entity("IfcFace", Bounds=[outerbound]) - # return IFC_model.create_entity("IfcFace", [outerbound]) + return IFC_model.create_entity("IfcFace", [outerbound]) # interior face BUGS - innerbounds = [] - for interior_face in face[1:]: - for vertex in interior_face: - vertices.append(self.get_vertex(IFC_model, vertex)) - polyloop = IFC_model.create_entity("IfcPolyLoop", Polygon=vertices) - innerbounds.append(IFC_model.create_entity("IfcFaceBound", Bound=polyloop, Orientation=False)) - return IFC_model.create_entity("IfcFace", Bounds=[outerbound] + innerbounds) + # innerbounds = [] + # for interior_face in face[1:]: + # for vertex in interior_face: + # vertices.append(self.get_vertex(IFC_model, vertex)) + # polyloop = IFC_model.create_entity("IfcPolyLoop", Polygon=vertices) + # innerbounds.append(IFC_model.create_entity("IfcFaceBound", Bound=polyloop, Orientation=False)) + # return IFC_model.create_entity("IfcFace", Bounds=[outerbound] + innerbounds)