From 6a2a4a9bc9d8dafd78f22f9d2d310979c87b24bd Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Tue, 17 Nov 2026 08:17:38 -0500 Subject: [PATCH] fix(posts): word refusal hints for the console as well as the desktop Head raise, head-lock and single-pass common-line refusals also print from the console, which has no settings dialog or Plate menu. They now point at the post settings and at cutting common lines twice without naming desktop-only paths. Co-Authored-By: Claude Opus 5.5 --- OpenNest.Core/CNC/CommonLineCuts.cs | 3 +-- OpenNest.Core/CNC/HeadHeightLock.cs | 4 ++-- OpenNest.Core/CNC/HeadRaise.cs | 2 +- OpenNest.Tests/Cincinnati/HeadRaisePostTests.cs | 2 +- OpenNest.Tests/CommonLines/CommonLinePostTests.cs | 2 +- OpenNest.Tests/CutOffs/HeadLockedCutOffTests.cs | 2 +- 6 files changed, 7 insertions(+), 8 deletions(-) diff --git a/OpenNest.Core/CNC/CommonLineCuts.cs b/OpenNest.Core/CNC/CommonLineCuts.cs index 251d3047..27322ba9 100644 --- a/OpenNest.Core/CNC/CommonLineCuts.cs +++ b/OpenNest.Core/CNC/CommonLineCuts.cs @@ -57,8 +57,7 @@ namespace OpenNest.CNC throw new InvalidOperationException( $"Plate {p + 1}, part {i + 1} cuts a common line once, but the " + $"{postProcessor?.Name ?? "selected"} post cannot write single-pass common lines. " - + "Set the plate to cut its common lines twice (Plate > Arrange > Cut Common Lines Twice), " - + "plan cutting again, then post."); + + "Set the plate to cut its common lines twice, replan, then post."); } } } diff --git a/OpenNest.Core/CNC/HeadHeightLock.cs b/OpenNest.Core/CNC/HeadHeightLock.cs index 86c12b33..93da24bc 100644 --- a/OpenNest.Core/CNC/HeadHeightLock.cs +++ b/OpenNest.Core/CNC/HeadHeightLock.cs @@ -77,8 +77,8 @@ namespace OpenNest.CNC PostMarkers.EnsurePostable(nest, hasCodes, IsMarked, program => LockedMask(program.Codes), name => $"{name} overcuts past the sheet edge with the head height locked, but the " + $"{postName} post has no head-height lock and unlock codes. Enter them in " - + $"\"Head height lock\" and \"Head height unlock\" in the {postName} Settings " - + "dialog, which opens when you post, or delete the cut-off and add it again " + + $"\"Head height lock\" and \"Head height unlock\" in the {postName} post " + + "settings, or delete the cut-off and add it again " + "with \"Lock head height and overcut the far edge\" unchecked."); } } diff --git a/OpenNest.Core/CNC/HeadRaise.cs b/OpenNest.Core/CNC/HeadRaise.cs index 2117057a..d38dc140 100644 --- a/OpenNest.Core/CNC/HeadRaise.cs +++ b/OpenNest.Core/CNC/HeadRaise.cs @@ -82,6 +82,6 @@ namespace OpenNest.CNC PostMarkers.EnsurePostable(nest, hasCode, IsMarked, program => RaisedMask(program.Codes), name => $"{name} has rapids that must raise the head over parts already cut, but " + $"the {postName} post has no head-raise code. Enter it in \"Head raise\" in " - + $"the {postName} Settings dialog, which opens when you post."); + + $"the {postName} post settings."); } } diff --git a/OpenNest.Tests/Cincinnati/HeadRaisePostTests.cs b/OpenNest.Tests/Cincinnati/HeadRaisePostTests.cs index fcefdc55..6ccbc896 100644 --- a/OpenNest.Tests/Cincinnati/HeadRaisePostTests.cs +++ b/OpenNest.Tests/Cincinnati/HeadRaisePostTests.cs @@ -58,7 +58,7 @@ public class HeadRaisePostTests var refusal = Assert.Throws(() => post.Post(Nest(markSecond: true), new MemoryStream())); Assert.Contains("head-raise code", refusal.Message); - Assert.Contains("\"Head raise\" in the Cincinnati CI Fiber Settings dialog", refusal.Message); + Assert.Contains("\"Head raise\" in the Cincinnati CI Fiber post settings", refusal.Message); post.Post(Nest(markSecond: false), new MemoryStream()); // Nothing marked: nothing to refuse. } diff --git a/OpenNest.Tests/CommonLines/CommonLinePostTests.cs b/OpenNest.Tests/CommonLines/CommonLinePostTests.cs index 947c00f2..31d85006 100644 --- a/OpenNest.Tests/CommonLines/CommonLinePostTests.cs +++ b/OpenNest.Tests/CommonLines/CommonLinePostTests.cs @@ -130,7 +130,7 @@ public class CommonLinePostTests var gravograph = Assert.Throws(() => new GravographISPostProcessor().Post(nest, stream)); Assert.Contains("cannot write single-pass common lines", cincinnati.Message); - Assert.Contains("Cut Common Lines Twice", gravograph.Message); + Assert.Contains("cut its common lines twice, replan", gravograph.Message); Assert.Equal(0, stream.Length); } diff --git a/OpenNest.Tests/CutOffs/HeadLockedCutOffTests.cs b/OpenNest.Tests/CutOffs/HeadLockedCutOffTests.cs index a296e8cf..005ccd18 100644 --- a/OpenNest.Tests/CutOffs/HeadLockedCutOffTests.cs +++ b/OpenNest.Tests/CutOffs/HeadLockedCutOffTests.cs @@ -202,7 +202,7 @@ public class HeadLockedCutOffTests var refusal = Assert.Throws(() => HeadHeightLock.EnsurePostable(nest, false, "Test")); Assert.Contains("head-height lock and unlock codes", refusal.Message); - Assert.Contains("\"Head height lock\" and \"Head height unlock\" in the Test Settings", refusal.Message); + Assert.Contains("\"Head height lock\" and \"Head height unlock\" in the Test post settings", refusal.Message); Assert.Contains("\"Lock head height and overcut the far edge\" unchecked", refusal.Message); HeadHeightLock.EnsurePostable(nest, true, "Test"); }