refactor(fillet): find the tangent arc in the kernel

FILLET enumerated its own candidates twice, once for a line against an
arc and once for two arcs, each with its own quadratic, its own four
sign combinations and its own conventions about which root meant what.
Both are the same construction: a circle of the given radius tangent to
a curve has its centre on one of that curve's offsets, so the fillet
centre is where an offset of one crosses an offset of the other.

That now comes from the kernel, which does it for any pair of straight
and circular curves and agrees with the corner formula where both apply.
What stays here is the part that genuinely belongs to the command —
which candidate the two picks meant, whether the touch lands on the
drawn part of an arc rather than elsewhere on its circle, and which side
of each entity to keep.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 5 committed 2026-08-09 01:37:11 +03:00
1 parent f9a0d73dc6
commit 9babf355b1
3 files changed
+132 -189

No files matched your search

+2 -2
View File
@@ -1,6 +1,6 @@
use super::*;
use acadrust::kernel::geom2d::{bounded_faces, Line};
use acadrust::kernel::geom2d::{bounded_faces, Line, Tolerance};
/// How far apart two points may be and still be taken for the same one.
///
@@ -65,6 +65,6 @@ impl Scene {
}
}
bounded_faces(&segments, WELD_TOLERANCE)
bounded_faces(&segments, Tolerance::new(WELD_TOLERANCE))
}
}