From ea609af3944cf8b77f994a23dcd8f3187498aba5 Mon Sep 17 00:00:00 2001 From: Balleux Benjamin Date: Fri, 21 Apr 2017 16:02:13 +0200 Subject: [PATCH] comments added --- src/ifcgeom/IfcGeomIterator.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ifcgeom/IfcGeomIterator.h b/src/ifcgeom/IfcGeomIterator.h index 36e53273b7..8b90046e69 100644 --- a/src/ifcgeom/IfcGeomIterator.h +++ b/src/ifcgeom/IfcGeomIterator.h @@ -574,22 +574,26 @@ namespace IfcGeom { else if (current_serialization) { ret = current_serialization; } else if (current_shape_model) { ret = current_shape_model; } + // If we want to organize the element by floors we need to get the floor of the element if (settings.get(IteratorSettings::SEARCH_FLOOR)) { + // if the element has a parent if (ret->parent_id() != -1) { const IfcGeom::Element

* parent_object = NULL; bool hasParent = true; + + // get the parent try { parent_object = getObject(ret->parent_id()); } catch (std::exception e) { hasParent = false; } + // We need to find an IfcBuildingStorey in the parent while (parent_object != NULL && parent_object->type() != "IfcBuildingStorey" && hasParent) { - try { parent_object = getObject(parent_object->parent_id()); } catch (std::exception e) {