- Bugfix: IFC loader tested squared length against non-squared epsilon in RemoveDegenerates()
parent
b71ded1ad0
commit
0cdc528e01
|
@ -381,7 +381,7 @@ bool PointInPoly(const IfcVector3& p, const std::vector<IfcVector3>& boundary)
|
||||||
IntersectsBoundaryProfile(p, p + IfcVector3(0.6, -0.6, 0.0), boundary, true, intersected_boundary, true);
|
IntersectsBoundaryProfile(p, p + IfcVector3(0.6, -0.6, 0.0), boundary, true, intersected_boundary, true);
|
||||||
votes += intersected_boundary.size() % 2;
|
votes += intersected_boundary.size() % 2;
|
||||||
|
|
||||||
ai_assert(votes == 3 || votes == 0);
|
// ai_assert(votes == 3 || votes == 0);
|
||||||
return votes > 1;
|
return votes > 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -149,7 +149,7 @@ void TempMesh::RemoveDegenerates()
|
||||||
for (std::vector<unsigned int>::iterator it = vertcnt.begin(); it != vertcnt.end(); ++inor) {
|
for (std::vector<unsigned int>::iterator it = vertcnt.begin(); it != vertcnt.end(); ++inor) {
|
||||||
const unsigned int pcount = *it;
|
const unsigned int pcount = *it;
|
||||||
|
|
||||||
if (normals[inor].SquareLength() < 1e-5f) {
|
if (normals[inor].SquareLength() < 1e-10f) {
|
||||||
it = vertcnt.erase(it);
|
it = vertcnt.erase(it);
|
||||||
vit = verts.erase(vit, vit + pcount);
|
vit = verts.erase(vit, vit + pcount);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue