From f31cd1c79737f64c5dfe577dbfa84b12fea2cb6f Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Wed, 4 Nov 2026 23:01:58 -0500 Subject: [PATCH] fix(posts): name the post settings fields in head-raise and head-lock refusals --- OpenNest.Core/CNC/HeadHeightLock.cs | 8 +++++--- OpenNest.Core/CNC/HeadRaise.cs | 5 +++-- OpenNest.Tests/Cincinnati/HeadRaisePostTests.cs | 1 + OpenNest.Tests/CutOffs/HeadLockedCutOffTests.cs | 2 ++ 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/OpenNest.Core/CNC/HeadHeightLock.cs b/OpenNest.Core/CNC/HeadHeightLock.cs index 58973dc9..86c12b33 100644 --- a/OpenNest.Core/CNC/HeadHeightLock.cs +++ b/OpenNest.Core/CNC/HeadHeightLock.cs @@ -75,8 +75,10 @@ namespace OpenNest.CNC /// public static void EnsurePostable(Nest nest, bool hasCodes, string postName) => 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 the post's configuration, " - + "or delete the cut-off and add it again with the head-height lock off."); + 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 " + + "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 46bf7f4c..2117057a 100644 --- a/OpenNest.Core/CNC/HeadRaise.cs +++ b/OpenNest.Core/CNC/HeadRaise.cs @@ -80,7 +80,8 @@ namespace OpenNest.CNC /// public static void EnsurePostable(Nest nest, bool hasCode, string postName) => 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 the post's configuration before posting."); + 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."); } } diff --git a/OpenNest.Tests/Cincinnati/HeadRaisePostTests.cs b/OpenNest.Tests/Cincinnati/HeadRaisePostTests.cs index 09f5527e..fcefdc55 100644 --- a/OpenNest.Tests/Cincinnati/HeadRaisePostTests.cs +++ b/OpenNest.Tests/Cincinnati/HeadRaisePostTests.cs @@ -58,6 +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); post.Post(Nest(markSecond: false), new MemoryStream()); // Nothing marked: nothing to refuse. } diff --git a/OpenNest.Tests/CutOffs/HeadLockedCutOffTests.cs b/OpenNest.Tests/CutOffs/HeadLockedCutOffTests.cs index 00219434..c41db437 100644 --- a/OpenNest.Tests/CutOffs/HeadLockedCutOffTests.cs +++ b/OpenNest.Tests/CutOffs/HeadLockedCutOffTests.cs @@ -201,6 +201,8 @@ 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("\"Lock head height and overcut the far edge\" unchecked", refusal.Message); HeadHeightLock.EnsurePostable(nest, true, "Test"); }