feat: add VariableDefinition type for G-code user variables
Adds immutable VariableDefinition record to OpenNest.CNC with name, expression, resolved value, inline, and global flags. Fixes namespace collision in PatternTilerTests and PolygonHelperTests caused by the new OpenNest.Tests.CNC namespace. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
21
OpenNest.Core/CNC/VariableDefinition.cs
Normal file
21
OpenNest.Core/CNC/VariableDefinition.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
namespace OpenNest.CNC
|
||||
{
|
||||
public sealed class VariableDefinition
|
||||
{
|
||||
public string Name { get; }
|
||||
public string Expression { get; }
|
||||
public double Value { get; }
|
||||
public bool Inline { get; }
|
||||
public bool Global { get; }
|
||||
|
||||
public VariableDefinition(string name, string expression, double value,
|
||||
bool inline = false, bool global = false)
|
||||
{
|
||||
Name = name;
|
||||
Expression = expression;
|
||||
Value = value;
|
||||
Inline = inline;
|
||||
Global = global;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user