fix(posts): Cincinnati CL sub-program frames, head raises and dead settings

Part sub-program calls restored the sheet frame with G92 at the part
corner while the tool sat at the sub-program's last endpoint, shifting
every later part. The call now raises the head, rapids back to local 0,0
and restores there. Parts share a sub-program only when their posted
toolpaths match, so per-part lead-ins are kept.

Suppressed moves are left uncut: the cut resumes with a rapid past them.

Head raises go before the rapid that leaves a feature, one per rapid:
the safety raise now precedes the rapid to a new part instead of
following its first feature, and sub-program mode no longer posts M47
then M47 P2000. M47Mode.Auto posts M47 before rapids longer than
M47OverrideDistanceThreshold and /M47 otherwise. ExteriorM47 applies to
the contour spanning the part's cut extents.

The sheet GOTO targets FeatureLineNumberStart and is omitted without line
numbers. PrepareForNest pre-selects only the gas- and thickness-matching
library. Part programs are read through absolute copies, never switched
to absolute in place.

Removes the unimplemented UseSheetSubprograms, CoordModeBetweenParts and
ProcessParameterMode (G89Mode); old configs still load.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ajandClaude Opus 5.5 committed 2026-10-19 01:56:28 -04:00
1 parent 5dc13a03ae
commit 2b3f8e7b52
16 files changed
+1203 -544

No files matched your search

@@ -24,13 +24,26 @@ public sealed class MaterialLibraryResolver
if (!string.IsNullOrEmpty(_selectedLibrary))
return EnsureLibExtension(_selectedLibrary);
var entry = _materialLibraries.FirstOrDefault(e =>
var entry = FindCutEntry(_materialLibraries, materialName, thickness, gas);
return EnsureLibExtension(entry?.Library ?? "");
}
/// <summary>
/// The first cut library entry for this material, thickness (within tolerance) and
/// assist gas, or null when none matches.
/// </summary>
public static MaterialLibraryEntry FindCutEntry(
IEnumerable<MaterialLibraryEntry> entries,
string materialName,
double thickness,
string gas
)
{
return entries?.FirstOrDefault(e =>
string.Equals(e.Material, materialName, StringComparison.OrdinalIgnoreCase)
&& System.Math.Abs(e.Thickness - thickness) <= ThicknessTolerance
&& string.Equals(e.Gas, gas, StringComparison.OrdinalIgnoreCase)
);
return EnsureLibExtension(entry?.Library ?? "");
}
public string ResolveEtchLibrary(string gas)