fix(snap): no spurious extension guide from arcs at line intersections

extension_bases_screen only skipped closed curves (circle/ellipse, keyed on
the Quadrant hint) when finding which endpoints' extension rays a snapped
point lies on. An arc is an open curve with no Quadrant hint, so its
tessellation chords were scanned; one straight chord-extension grazes a
nearby line-line intersection (beyond the arc endpoint, within 4px), drawing
a spurious dashed extension guide radiating from the arc.

Skip every round curve by the Center hint (which arcs, circles and ellipses
all carry and straight lines never do) — the same signal nearest_segment
uses. The intersection snap point itself was already correct; only the stray
guide line is removed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-07-10 12:59:02 +03:00
commit a84c1c0bcb

View file

@ -1644,16 +1644,18 @@ fn extension_bases_screen(
if n < 2 {
continue;
}
// A closed curve (full circle / ellipse) has no meaningful extension:
// its tessellation chords point every which way, so one almost always
// has an outward extension that grazes the snapped point, drawing a
// spurious dashed guide radiating from the circle when the user only
// caught a plain line-line intersection (#276). Skip it — same closed
// signal (Quadrant hints, which arcs never carry) as the Endpoint snap.
// A round curve (circle / arc / ellipse) has no meaningful straight
// extension: its tessellation chords point every which way, so one
// almost always has an outward chord-extension that grazes the snapped
// point, drawing a spurious dashed guide radiating from the curve when
// the user only caught a plain line-line intersection (#276). An arc is
// open, so it carries no Quadrant hint — key off the Center hint that
// every round curve carries (the same signal `nearest_segment` uses),
// which straight lines never have.
if wire
.snap_pts
.iter()
.any(|(_, h)| matches!(h, SnapHint::Quadrant))
.any(|(_, h)| matches!(h, SnapHint::Quadrant | SnapHint::Center))
{
continue;
}