From 2359a831326179e967915a23a791e7d2c06daacb Mon Sep 17 00:00:00 2001 From: Alexander Gessler Date: Wed, 30 Jan 2013 13:01:16 +0100 Subject: [PATCH] - Ifc: get rid of erroneous error messages. --- code/IFCGeometry.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/code/IFCGeometry.cpp b/code/IFCGeometry.cpp index 0f39c05fe..01ee50686 100644 --- a/code/IFCGeometry.cpp +++ b/code/IFCGeometry.cpp @@ -2686,10 +2686,6 @@ bool ProcessGeometricItem(const IfcRepresentationItem& geo, std::vectorIsEmpty()) { - return false; - } - // Do we just collect openings for a parent element (i.e. a wall)? // In such a case, we generate the polygonal mesh as usual, // but attach it to a TempOpening instance which will later be applied @@ -2698,13 +2694,19 @@ bool ProcessGeometricItem(const IfcRepresentationItem& geo, std::vectorpush_back(TempOpening(geo.ToPtr(), - IfcVector3(0,0,0), - meshtmp, - boost::shared_ptr(NULL))); + if (!meshtmp->IsEmpty()) { + conv.collect_openings->push_back(TempOpening(geo.ToPtr(), + IfcVector3(0,0,0), + meshtmp, + boost::shared_ptr(NULL))); + } return true; } + if (meshtmp->IsEmpty()) { + return false; + } + meshtmp->RemoveAdjacentDuplicates(); meshtmp->RemoveDegenerates();