Adds Dictionary<string,string> VariableRefs to Motion (cleared on Rotate/Offset) and string VariableRef to Feedrate, with deep-copy Clone() support, so post processors can emit variable references instead of literal coordinate values. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
38 lines
713 B
C#
38 lines
713 B
C#
namespace OpenNest.CNC
|
|
{
|
|
public class Feedrate : ICode
|
|
{
|
|
public const int UseDefault = -1;
|
|
|
|
public const int UseMax = -2;
|
|
|
|
public Feedrate()
|
|
{
|
|
}
|
|
|
|
public Feedrate(double value)
|
|
{
|
|
Value = value;
|
|
}
|
|
|
|
public double Value { get; set; }
|
|
|
|
public string VariableRef { get; set; }
|
|
|
|
public CodeType Type
|
|
{
|
|
get { return CodeType.SetFeedrate; }
|
|
}
|
|
|
|
public ICode Clone()
|
|
{
|
|
return new Feedrate(Value) { VariableRef = VariableRef };
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return string.Format("F{0}", Value);
|
|
}
|
|
}
|
|
}
|