feat: add Draw Cut Direction view option and extract PlateRenderer

Add a "Draw Cut Direction" toggle to the View menu that draws small
arrowheads along cutting paths to indicate the direction of travel.
Arrows are placed on both linear and arc moves, spaced ~60px apart,
and correctly follow CW/CCW arc tangents.

Extract all rendering methods (~660 lines) from PlateView into a new
PlateRenderer class, reducing PlateView from 1640 to 979 lines.
PlateView retains input handling, selection, zoom, and part management.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-30 21:22:05 -04:00
parent 59a66173e1
commit 134771aa23
6 changed files with 744 additions and 525 deletions

View File

@@ -52,6 +52,7 @@
mnuViewDrawPiercePoints = new System.Windows.Forms.ToolStripMenuItem();
mnuViewDrawBounds = new System.Windows.Forms.ToolStripMenuItem();
mnuViewDrawOffset = new System.Windows.Forms.ToolStripMenuItem();
mnuViewDrawCutDirection = new System.Windows.Forms.ToolStripMenuItem();
toolStripMenuItem5 = new System.Windows.Forms.ToolStripSeparator();
mnuViewZoomTo = new System.Windows.Forms.ToolStripMenuItem();
mnuViewZoomToArea = new System.Windows.Forms.ToolStripMenuItem();
@@ -305,7 +306,7 @@
//
// mnuView
//
mnuView.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { mnuViewDrawRapids, mnuViewDrawPiercePoints, mnuViewDrawBounds, mnuViewDrawOffset, toolStripMenuItem5, mnuViewZoomTo, mnuViewZoomIn, mnuViewZoomOut });
mnuView.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { mnuViewDrawRapids, mnuViewDrawPiercePoints, mnuViewDrawBounds, mnuViewDrawOffset, mnuViewDrawCutDirection, toolStripMenuItem5, mnuViewZoomTo, mnuViewZoomIn, mnuViewZoomOut });
mnuView.Name = "mnuView";
mnuView.Size = new System.Drawing.Size(44, 20);
mnuView.Text = "&View";
@@ -340,7 +341,15 @@
mnuViewDrawOffset.Size = new System.Drawing.Size(222, 22);
mnuViewDrawOffset.Text = "Draw Offset";
mnuViewDrawOffset.Click += ToggleDrawOffset_Click;
//
//
// mnuViewDrawCutDirection
//
mnuViewDrawCutDirection.CheckOnClick = true;
mnuViewDrawCutDirection.Name = "mnuViewDrawCutDirection";
mnuViewDrawCutDirection.Size = new System.Drawing.Size(222, 22);
mnuViewDrawCutDirection.Text = "Draw Cut Direction";
mnuViewDrawCutDirection.Click += ToggleDrawCutDirection_Click;
//
// toolStripMenuItem5
//
toolStripMenuItem5.Name = "toolStripMenuItem5";
@@ -1144,6 +1153,7 @@
private System.Windows.Forms.ToolStripMenuItem mnuViewDrawPiercePoints;
private System.Windows.Forms.ToolStripMenuItem mnuViewDrawBounds;
private System.Windows.Forms.ToolStripMenuItem mnuViewDrawOffset;
private System.Windows.Forms.ToolStripMenuItem mnuViewDrawCutDirection;
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem5;
private System.Windows.Forms.ToolStripMenuItem mnuTools;
private System.Windows.Forms.ToolStripMenuItem mnuToolsMachineConfig;