fix: ensure absolute coordinates and .lib extension in post output
Convert programs to absolute mode before extracting features for Cincinnati post output, fixing incorrect coordinates when programs are stored in incremental mode. Also ensure G89 library names always end with .lib extension. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -24,7 +24,7 @@ public sealed class MaterialLibraryResolver
|
||||
System.Math.Abs(e.Thickness - thickness) <= ThicknessTolerance &&
|
||||
string.Equals(e.Gas, gas, StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
return entry?.Library ?? "";
|
||||
return EnsureLibExtension(entry?.Library ?? "");
|
||||
}
|
||||
|
||||
public string ResolveEtchLibrary(string gas)
|
||||
@@ -32,7 +32,18 @@ public sealed class MaterialLibraryResolver
|
||||
var entry = _etchLibraries.FirstOrDefault(e =>
|
||||
string.Equals(e.Gas, gas, StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
return entry?.Library ?? "";
|
||||
return EnsureLibExtension(entry?.Library ?? "");
|
||||
}
|
||||
|
||||
private static string EnsureLibExtension(string library)
|
||||
{
|
||||
if (string.IsNullOrEmpty(library))
|
||||
return library;
|
||||
|
||||
if (!library.EndsWith(".lib", StringComparison.OrdinalIgnoreCase))
|
||||
return library + ".lib";
|
||||
|
||||
return library;
|
||||
}
|
||||
|
||||
public static string ResolveGas(Nest nest, CincinnatiPostConfig config)
|
||||
|
||||
Reference in New Issue
Block a user