Path Precision Tools: check each place along the first segment once

When the same segment appears more than once among the second segments,
its roots were found once per copy, and each copy's places were checked
against every second segment. The sorted places now drop exact repeats
before they are checked. Places that differ, however close, are all kept,
so the circles found do not change.
This commit is contained in:
dotCooCoo
2026-11-20 19:16:06 -08:00
parent 7884babf0a
commit f4b114ae78
@@ -265,7 +265,9 @@ pub fn circles_of_radius(first: CubicBez, second: &[CubicBez], radius: f64) -> V
roots(&samples, dist, CONTACT * radius)
})
.collect();
// A segment repeated in `second` gives the same places again; each is checked once.
ts.sort_by(f64::total_cmp);
ts.dedup();
for t in ts {
if let Some(c) = center(t)
&& let Some(touch) = touching(c, radius, second, own)