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 <noreply@anthropic.com>
This commit is contained in:
ajandClaude Opus 5.5 committed 2026-11-17 08:17:38 -05:00
1 parent 16ba05afec
commit 6a2a4a9bc9
6 files changed
+7 -8

No files matched your search

+1 -2
View File
@@ -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.");
}
}
}
+2 -2
View File
@@ -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.");
}
}
+1 -1
View File
@@ -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.");
}
}
@@ -58,7 +58,7 @@ public class HeadRaisePostTests
var refusal = Assert.Throws<InvalidOperationException>(() => 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.
}
@@ -130,7 +130,7 @@ public class CommonLinePostTests
var gravograph = Assert.Throws<InvalidOperationException>(() => 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);
}
@@ -202,7 +202,7 @@ public class HeadLockedCutOffTests
var refusal = Assert.Throws<InvalidOperationException>(() => 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");
}