Skip to content

Commit bf4b592

Browse files
committed
Fail on empty face early
1 parent 3840bd1 commit bf4b592

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/ifcgeom/IfcGeomFaces.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@
106106
bool IfcGeom::Kernel::convert(const IfcSchema::IfcFace* l, TopoDS_Shape& face) {
107107
IfcSchema::IfcFaceBound::list::ptr bounds = l->Bounds();
108108

109+
// Fail on this early as it can cause issues later on
110+
if (bounds->size() == 0) {
111+
return false;
112+
}
113+
109114
Handle(Geom_Surface) face_surface;
110115
const bool is_face_surface = l->is(IfcSchema::Type::IfcFaceSurface);
111116

0 commit comments

Comments
 (0)