I've been helping the open source 2D CAD project LibreCAD with some bug hunting; and found that the snap mode for intersections finds two intersections extremely close together instead of one point of tangency (regarding an incircle of a triangle).
The developer working on it has said:
"""
It's not a problem of detecting intersections.
the problem is that inscribed circle is generated correct up to relative precision of 1e-8, while the tangential points are test at a precision level of 1e-10. Therefore, the inscribed circle actually intersects with one line.
The reasonable way is to improve the equation solver to get the inscribed circle more accurate.
"""
and after some more investigation:
"""
the tolerance itself is always there, even if we can solve equations at higher precision:
currently, we can generate the tangential circle correct up to 10^-8, but intersection detection is up to 10^-10, causing a tangential point (by the definition of tangential circle) to be detected as intersection points.
because the actual precision is up to the floating point, there's no clear answer close to precision level.
One clear hint, if user specifies to draw with precision 10^-4(as in Current Drawing Preferences), there's no need to report two points 10^-8 apart.
Lots of work need to implement this idea;
"""
I'm wondering if anyone has any thoughts on this issue.
https://github.com/LibreCAD/LibreCAD/issues/523