diff --git a/MatterControlLib/PrinterCommunication/Io/GCodeStream.cs b/MatterControlLib/PrinterCommunication/Io/GCodeStream.cs index ce30f4434..9c035fcaa 100644 --- a/MatterControlLib/PrinterCommunication/Io/GCodeStream.cs +++ b/MatterControlLib/PrinterCommunication/Io/GCodeStream.cs @@ -36,14 +36,17 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io { public abstract class GCodeStream : IDisposable { - #region Abstract Functions /// - /// returns null when there are no more lines + /// Get the next gcode line from this stream. /// - /// + /// Returns the next gcode line after processing. public abstract string ReadLine(); + + /// + /// Sends the printer position back up the stream pipe. + /// + /// The position as seen from down stream. Effectively what this stream will output after computation. public abstract void SetPrinterPosition(PrinterMove position); - #endregion public abstract void Dispose(); @@ -81,11 +84,13 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io { sb.AppendFormat("X{0:0.##} ", destination.position.X); } + if (destination.position.Y != double.PositiveInfinity && destination.position.Y != start.position.Y) { sb.AppendFormat("Y{0:0.##} ", destination.position.Y); } + if (destination.position.Z != double.PositiveInfinity && destination.position.Z != start.position.Z) {