From 306ce83553a90d65a5fb8fe39c179081d06575f1 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Tue, 30 Oct 2018 12:15:35 +0100 Subject: [PATCH] Use all representations if no representations found through context check --- src/ifcgeom/IfcGeomIterator.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ifcgeom/IfcGeomIterator.h b/src/ifcgeom/IfcGeomIterator.h index ec153c715b..c48e934a5c 100644 --- a/src/ifcgeom/IfcGeomIterator.h +++ b/src/ifcgeom/IfcGeomIterator.h @@ -273,10 +273,15 @@ namespace IfcGeom { } if (representations->size() == 0) { - Logger::Message(Logger::LOG_ERROR, "No geometries found"); - return false; + Logger::Message(Logger::LOG_ERROR, "No representations encountered in relevant contexts, using all"); + representations = ifc_file->entitiesByType(); } + if (representations->size() == 0) { + Logger::Message(Logger::LOG_ERROR, "No representations encountered, aborting"); + return false; + } + representation_iterator = representations->begin(); ifcproducts.reset();