fix(snap): extension guides stay visible at extended intersections (#247, #259)

Extension osnap now offers a ray off every polyline vertex, not just the
first and last, and snaps to where two segments' extension lines would
cross. That crossing is emitted as an Intersection so it outranks the
per-segment extension feet on their own lines. When it wins, both
contributing extensions are re-detected — off-ray distance measured in
screen space so the tolerance holds at UTM coordinates — and the overlay
draws a dashed guide from each endpoint through the crossing, so both
extension paths remain visible instead of vanishing when caught.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-07-03 17:46:08 +03:00
1 parent f4fffa1359
commit 0322128f48
4 files changed
+183 -52

No files matched your search

+2
View File
@@ -194,6 +194,7 @@ impl OpenCADStudio {
let sel = tab.scene.selection.borrow().clone();
let snap_info = tab.snap_result.map(|s| (s.screen, s.snap_type));
let snap_ext_base = tab.snap_result.and_then(|s| s.extension_base);
let snap_ext_base2 = tab.snap_result.and_then(|s| s.extension_base2);
let grips: Vec<crate::ui::overlay::GripMarker> =
if tab.active_cmd.is_none() && !tab.selected_grips.is_empty() {
@@ -399,6 +400,7 @@ impl OpenCADStudio {
sel,
snap_info,
snap_ext_base,
snap_ext_base2,
grips,
ucs_icons,
ost_points,