From d81979b807310fa1a6dc139edd87f653748fac0e Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Sun, 5 Jul 2026 12:03:52 +0300 Subject: [PATCH] fix(snap): don't draw extension guides from circles on intersection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Catching a plain line-line Intersection re-runs extension_bases_screen to draw the dashed guide(s) for an *extended* intersection (#247/#259). It scanned every wire including tessellated circles, and a full circle's chords point in every direction, so one almost always has an outward extension that grazes the crossing — drawing spurious guide lines radiating from nearby circles. Skip closed curves (full circle / ellipse) in that scan, identified by their Quadrant snap hints (arcs never carry them, so arc extension guides are unaffected). Closes #276 Co-Authored-By: Claude Opus 4.8 --- src/snap.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/snap.rs b/src/snap.rs index f94fa3e05..61c7a6e9a 100644 --- a/src/snap.rs +++ b/src/snap.rs @@ -1446,6 +1446,19 @@ 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. + if wire + .snap_pts + .iter() + .any(|(_, h)| matches!(h, SnapHint::Quadrant)) + { + continue; + } // Match the extension snap: every segment can be extended past either // endpoint, so scan them all to find the base(s) the snapped point sits on. for i in 0..n - 1 {