Fixed a divide by zero error in IFCBoolean that was latent, but nevertheless a bug
parent
9a6b141568
commit
f8c4002294
|
@ -272,7 +272,6 @@ bool IntersectsBoundaryProfile(const IfcVector3& e0, const IfcVector3& e1, const
|
||||||
const IfcVector3& b0 = boundary[i];
|
const IfcVector3& b0 = boundary[i];
|
||||||
const IfcVector3& b1 = boundary[(i + 1) % bcount];
|
const IfcVector3& b1 = boundary[(i + 1) % bcount];
|
||||||
IfcVector3 b = b1 - b0;
|
IfcVector3 b = b1 - b0;
|
||||||
IfcFloat b_sqlen_inv = 1.0 / b.SquareLength();
|
|
||||||
|
|
||||||
// segment-segment intersection
|
// segment-segment intersection
|
||||||
// solve b0 + b*s = e0 + e*t for (s,t)
|
// solve b0 + b*s = e0 + e*t for (s,t)
|
||||||
|
@ -281,6 +280,7 @@ bool IntersectsBoundaryProfile(const IfcVector3& e0, const IfcVector3& e1, const
|
||||||
// no solutions (parallel lines)
|
// no solutions (parallel lines)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
IfcFloat b_sqlen_inv = 1.0 / b.SquareLength();
|
||||||
|
|
||||||
const IfcFloat x = b0.x - e0.x;
|
const IfcFloat x = b0.x - e0.x;
|
||||||
const IfcFloat y = b0.y - e0.y;
|
const IfcFloat y = b0.y - e0.y;
|
||||||
|
|
Loading…
Reference in New Issue