From ad9d178f0ad71f39fbe5d1e289c611b079d3a593 Mon Sep 17 00:00:00 2001 From: ulf Date: Fri, 13 Mar 2015 15:13:53 +0100 Subject: [PATCH] - Bugfix: IfcLoader lost nodes and geometry when they were stored in subnodes of IfcSpace and the setting "Filter IfcSpace" was enabled --- code/IFCLoader.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/code/IFCLoader.cpp b/code/IFCLoader.cpp index b6e6e0289..24ed772e0 100644 --- a/code/IFCLoader.cpp +++ b/code/IFCLoader.cpp @@ -677,10 +677,11 @@ aiNode* ProcessSpatialStructure(aiNode* parent, const IfcProduct& el, Conversion const STEP::DB::RefMap& refs = conv.db.GetRefs(); // skip over space and annotation nodes - usually, these have no meaning in Assimp's context + bool skipGeometry = false; if(conv.settings.skipSpaceRepresentations) { if(const IfcSpace* const space = el.ToPtr()) { IFCImporter::LogDebug("skipping IfcSpace entity due to importer settings"); - return NULL; + skipGeometry = true; } } @@ -850,8 +851,10 @@ aiNode* ProcessSpatialStructure(aiNode* parent, const IfcProduct& el, Conversion conv.apply_openings = &openings; } - ProcessProductRepresentation(el,nd.get(),subnodes,conv); - conv.apply_openings = conv.collect_openings = NULL; + if (!skipGeometry) { + ProcessProductRepresentation(el,nd.get(),subnodes,conv); + conv.apply_openings = conv.collect_openings = NULL; + } if (subnodes.size()) { nd->mChildren = new aiNode*[subnodes.size()]();