refactor: move ProgramVariableManager to Core, add config file support
- Move ProgramVariable and ProgramVariableManager from OpenNest.Posts.Cincinnati to OpenNest.Core/CNC (namespace OpenNest.CNC) so they can be used internally in nest programs - Add parameterless constructor to CincinnatiPostProcessor that loads config from a .json file next to the DLL (creates defaults on first run) - Enums serialize as readable strings (e.g., "Inches", "ControllerSide") - Config file: OpenNest.Posts.Cincinnati.json in the Posts/ directory Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
18
OpenNest.Core/CNC/ProgramVariable.cs
Normal file
18
OpenNest.Core/CNC/ProgramVariable.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace OpenNest.CNC
|
||||
{
|
||||
public sealed class ProgramVariable
|
||||
{
|
||||
public int Number { get; }
|
||||
public string Name { get; }
|
||||
public string Expression { get; set; }
|
||||
|
||||
public ProgramVariable(int number, string name, string expression = null)
|
||||
{
|
||||
Number = number;
|
||||
Name = name;
|
||||
Expression = expression;
|
||||
}
|
||||
|
||||
public string Reference => $"#{Number}";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user