internal static CoordinatOffsetManager Instance() { if (self == null) { self = new CoordinatOffsetManager(); } return(self); }
public override void end(GCodeParser parser, MachineStatus machineStatus) { CoordinatOffsetManager.Instance().AddValue(listOffset); mcsData = NXToolsViewModel.Instance.McsData; SCM_CW.Remove(startIndex, endIndex - startIndex); SCM_CW.Insert(startIndex, "MSYS/" + mcsData.OffsetX.ToString("F6") + ";" + mcsData.OffsetY.ToString("F6") + ";" + mcsData.OffsetZ.ToString("F6") + ";" + mcsData.M11.ToString("F9") + ";" + mcsData.M12.ToString("F9") + ";" + mcsData.M13.ToString("F9") + ";" + mcsData.M21.ToString("F9") + ";" + mcsData.M22.ToString("F9") + ";" + mcsData.M23.ToString("F9")).Replace(',', '.'); }
public void MSYSChange() { CoordinatOffsetManager.Instance().AddValue(listOffset); // CoordinatOffsetManager.Instance().ClearOffsetList() ; mcsData = NXToolsViewModel.Instance.McsData; SCM_CW.Remove(startIndex, endIndex - startIndex); SCM_CW.Insert(startIndex, "MSYS/" + mcsData.OffsetX.ToString("F6") + ";" + mcsData.OffsetY.ToString("F6") + ";" + mcsData.OffsetZ.ToString("F6") + ";" + mcsData.M11.ToString("F9") + ";" + mcsData.M12.ToString("F9") + ";" + mcsData.M13.ToString("F9") + ";" + mcsData.M21.ToString("F9") + ";" + mcsData.M22.ToString("F9") + ";" + mcsData.M23.ToString("F9")).Replace(',', '.'); }
public virtual void end(GCodeParser parser, MachineStatus machineStatus) { CoordinatOffsetManager.Instance().AddValue(listOffset); // CoordinatOffsetManager.Instance().ClearOffsetList() ; mcsData = NXToolsViewModel.Instance.McsData; SCM_CW.Remove(startIndex, endIndex - startIndex); SCM_CW.Insert(startIndex, "MSYS/" + mcsData.OffsetX.ToString("F6") + ";" + mcsData.OffsetY.ToString("F6") + ";" + mcsData.OffsetZ.ToString("F6") + ";" + mcsData.M11.ToString("F9") + ";" + mcsData.M12.ToString("F9") + ";" + mcsData.M13.ToString("F9") + ";" + mcsData.M21.ToString("F9") + ";" + mcsData.M22.ToString("F9") + ";" + mcsData.M23.ToString("F9")).Replace(',', '.'); // SCM_CW.Append("END-OF-PATH") ; // SCM_CW.Append('\n') ; }