feat: fit-to-plate splits use full plate work area with preview line

FitToPlate now places split lines at usable-width intervals so each
piece (except the last) fills the entire plate work area. Also adds a
live yellow preview line that follows the cursor during manual split
line placement, and piece dimension labels in the preview regions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-25 19:27:15 -04:00
parent 35218a7435
commit 269746b8a4
3 changed files with 51 additions and 28 deletions

View File

@@ -19,19 +19,11 @@ public static class AutoSplitCalculator
if (verticalSplits < 0) verticalSplits = 0;
if (horizontalSplits < 0) horizontalSplits = 0;
if (verticalSplits > 0)
{
var spacing = partBounds.Width / (verticalSplits + 1);
for (var i = 1; i <= verticalSplits; i++)
lines.Add(new SplitLine(partBounds.X + spacing * i, CutOffAxis.Vertical));
}
for (var i = 1; i <= verticalSplits; i++)
lines.Add(new SplitLine(partBounds.X + usableWidth * i, CutOffAxis.Vertical));
if (horizontalSplits > 0)
{
var spacing = partBounds.Length / (horizontalSplits + 1);
for (var i = 1; i <= horizontalSplits; i++)
lines.Add(new SplitLine(partBounds.Y + spacing * i, CutOffAxis.Horizontal));
}
for (var i = 1; i <= horizontalSplits; i++)
lines.Add(new SplitLine(partBounds.Y + usableHeight * i, CutOffAxis.Horizontal));
return lines;
}