I've included a failure test case in the demo, here:
|
// this one fails due to numerical instability... it will detect an intersection between line |
This will fail due to numerical instability.
I'm not sure exactly how to fix it... the solveCubic function is returning a T value very close to 1, but not exactly 1 (and not within striking distance of the epsilon value), so it ends up thinking there is an intersection between a curve and a line, but in reality they just share an endpoint.
I think the solveCubic function needs to take the epsilon value into account in a smarter way, or perhaps rewritten entirely.
I've included a failure test case in the demo, here:
polybool/demo/demo.html
Line 117 in 3ee7c44
This will fail due to numerical instability.
I'm not sure exactly how to fix it... the
solveCubicfunction is returning a T value very close to 1, but not exactly 1 (and not within striking distance of the epsilon value), so it ends up thinking there is an intersection between a curve and a line, but in reality they just share an endpoint.I think the
solveCubicfunction needs to take the epsilon value into account in a smarter way, or perhaps rewritten entirely.