#224 fixed Line3.distance() so it no longer depends on the magnitude of the Plucker direction vectors (w), only their direction — it was giving wrong results whenever a line's Plucker coordinates were rescaled by a factor other than 1, and crashing outright on parallel lines.
isparallel() (and hence __or__, ^/isintersecting, and commonperp(), all of which call it) has the same shape of bug: it tests norm(cross(l1.w, l2.w)) < tol * eps using the raw, non-unit direction vectors, rather than unit directions. Two lines with the same true angular separation can cross or miss the parallel threshold depending purely on how their Plucker coordinates happen to be scaled.
closest_to_line() wasn't checked for the same issue — worth a separate look.
Not urgent (no crash, unlike the distance() case), but the same class of bug and probably the same fix shape: normalize to unit vectors before the tolerance comparison.
Cross-ref: #224
#224 fixed
Line3.distance()so it no longer depends on the magnitude of the Plucker direction vectors (w), only their direction — it was giving wrong results whenever a line's Plucker coordinates were rescaled by a factor other than 1, and crashing outright on parallel lines.isparallel()(and hence__or__,^/isintersecting, andcommonperp(), all of which call it) has the same shape of bug: it testsnorm(cross(l1.w, l2.w)) < tol * epsusing the raw, non-unit direction vectors, rather than unit directions. Two lines with the same true angular separation can cross or miss the parallel threshold depending purely on how their Plucker coordinates happen to be scaled.closest_to_line()wasn't checked for the same issue — worth a separate look.Not urgent (no crash, unlike the
distance()case), but the same class of bug and probably the same fix shape: normalize to unit vectors before the tolerance comparison.Cross-ref: #224