mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-03 22:51:36 -05:00
feat(post): declare placed order for CL nests that post in it
The Cincinnati CL post always drew an "incomplete final rapid sequence" warning because it never declared IPostVerificationSupport. It writes etch features before cuts, inserts or drops rapids, and with part sub-programs rapids to each part's corner, so it cannot declare it unconditionally. IPostVerificationSupport gains a nest-aware PlacedProgramOrderChange(nest) (null = preserved; otherwise the reason, shown in the warning). The CL post answers it from its own writer: part sub-programs and smart rapids off, and every part's and hole's posted motions exactly equal to its placed ones. Plan Cutting cuts scribes first, so planned nests qualify. CNC output is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ceddd8cf93
commit
72039a238b
9 files changed
+392
-26
No files matched your search
@@ -163,6 +163,17 @@ public sealed class CincinnatiPartSubprogramWriter
|
||||
return (mapping, entries);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The absolute copy a hole sub-program is written from: suppressed moves left uncut and
|
||||
/// a leading rapid ensured. <see cref="Write"/> then puts its etch features first.
|
||||
/// </summary>
|
||||
internal static Program PostedHole(Program hole)
|
||||
{
|
||||
var absolute = PostedCopy(hole);
|
||||
EnsureLeadingRapid(absolute);
|
||||
return absolute;
|
||||
}
|
||||
|
||||
// An absolute copy with suppressed moves left uncut, as the post writes it.
|
||||
private static Program PostedCopy(Program program)
|
||||
{
|
||||
@@ -203,8 +214,7 @@ public sealed class CincinnatiPartSubprogramWriter
|
||||
if (mapping.ContainsKey(call.Program) || !FeatureUtils.HasCut(call.Program))
|
||||
continue;
|
||||
|
||||
var absolute = PostedCopy(call.Program);
|
||||
EnsureLeadingRapid(absolute);
|
||||
var absolute = PostedHole(call.Program);
|
||||
|
||||
var canonical = ProgramToCanonical(absolute);
|
||||
if (!contentIndex.TryGetValue(canonical, out var subNum))
|
||||
|
||||
Reference in new issue
Block a user