diff --git a/code/IFCGeometry.cpp b/code/IFCGeometry.cpp index f6c7e9b02..ffee5cb6a 100644 --- a/code/IFCGeometry.cpp +++ b/code/IFCGeometry.cpp @@ -1448,6 +1448,12 @@ bool TryAddOpenings_Quadrulate(std::vector& openings, } BoundingBox bb = BoundingBox(vpmin,vpmax); + + // Skip over very small openings - these are likely projection errors + // (i.e. they don't belong to this side of the wall) + if(fabs(vpmax.x - vpmin.x) * fabs(vpmax.y - vpmin.y) < static_cast(1e-5)) { + continue; + } std::vector joined_openings(1, &opening); // See if this BB intersects any other, in which case we could not use the Quadrify() @@ -1477,7 +1483,7 @@ bool TryAddOpenings_Quadrulate(std::vector& openings, break; } else { - IFCImporter::LogDebug("merging overlapping openings, this should not happen"); + IFCImporter::LogDebug("merging overlapping openings"); contour.clear(); BOOST_FOREACH(const ClipperLib::IntPoint& point, poly[0].outer) {