- Bugfix: IfcLoader lost nodes and geometry when they were stored in subnodes of IfcSpace and the setting "Filter IfcSpace" was enabled

pull/497/head
ulf 2015-03-13 15:13:53 +01:00
parent e516a21bd9
commit ad9d178f0a
1 changed files with 6 additions and 3 deletions

View File

@ -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<IfcSpace>()) {
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()]();