From a84c1c0bcbf9878695d3cec449253e4cbfdae417 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Fri, 10 Jul 2026 12:59:02 +0300 Subject: [PATCH] fix(snap): no spurious extension guide from arcs at line intersections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/snap.rs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/snap.rs b/src/snap.rs index 69bd3580f..f8a9a4180 100644 --- a/src/snap.rs +++ b/src/snap.rs @@ -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; }