From 7b7d2cd8d1bf67c543003819f30f08bd286897c5 Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Tue, 31 Mar 2026 15:28:55 -0400 Subject: [PATCH] feat: track hovered contour during lead-in mouse move Co-Authored-By: Claude Opus 4.6 (1M context) --- OpenNest/Actions/ActionLeadIn.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OpenNest/Actions/ActionLeadIn.cs b/OpenNest/Actions/ActionLeadIn.cs index a5783b1..3c4f178 100644 --- a/OpenNest/Actions/ActionLeadIn.cs +++ b/OpenNest/Actions/ActionLeadIn.cs @@ -23,6 +23,7 @@ namespace OpenNest.Actions private ContourType snapContourType; private double snapNormal; private bool hasSnap; + private ShapeInfo hoveredContour; private ContextMenuStrip contextMenu; private static readonly Brush grayOverlay = new SolidBrush(Color.FromArgb(160, 180, 180, 180)); @@ -55,6 +56,7 @@ namespace OpenNest.Actions profile = null; contours = null; hasSnap = false; + hoveredContour = null; plateView.Invalidate(); } @@ -78,6 +80,7 @@ namespace OpenNest.Actions // Find closest contour and point var bestDist = double.MaxValue; hasSnap = false; + hoveredContour = null; foreach (var info in contours) { @@ -92,6 +95,7 @@ namespace OpenNest.Actions snapContourType = info.ContourType; snapNormal = ContourCuttingStrategy.ComputeNormal(closest, entity, info.ContourType); hasSnap = true; + hoveredContour = info; } } @@ -324,6 +328,7 @@ namespace OpenNest.Actions profile = null; contours = null; hasSnap = false; + hoveredContour = null; plateView.Invalidate(); }