From 0cdc528e015d3fc595096e932c64c9c443fe354a Mon Sep 17 00:00:00 2001 From: ulf Date: Tue, 3 Mar 2015 15:56:09 +0100 Subject: [PATCH] - Bugfix: IFC loader tested squared length against non-squared epsilon in RemoveDegenerates() --- code/IFCBoolean.cpp | 2 +- code/IFCUtil.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/IFCBoolean.cpp b/code/IFCBoolean.cpp index cfa788a24..995f7632c 100644 --- a/code/IFCBoolean.cpp +++ b/code/IFCBoolean.cpp @@ -381,7 +381,7 @@ bool PointInPoly(const IfcVector3& p, const std::vector& boundary) IntersectsBoundaryProfile(p, p + IfcVector3(0.6, -0.6, 0.0), boundary, true, intersected_boundary, true); votes += intersected_boundary.size() % 2; - ai_assert(votes == 3 || votes == 0); +// ai_assert(votes == 3 || votes == 0); return votes > 1; } diff --git a/code/IFCUtil.cpp b/code/IFCUtil.cpp index 90489ef91..6fcda33c7 100644 --- a/code/IFCUtil.cpp +++ b/code/IFCUtil.cpp @@ -149,7 +149,7 @@ void TempMesh::RemoveDegenerates() for (std::vector::iterator it = vertcnt.begin(); it != vertcnt.end(); ++inor) { const unsigned int pcount = *it; - if (normals[inor].SquareLength() < 1e-5f) { + if (normals[inor].SquareLength() < 1e-10f) { it = vertcnt.erase(it); vit = verts.erase(vit, vit + pcount);