make sure we do not send empty G1

order GCode export steams the same as the printing streams
This commit is contained in:
LarsBrubaker 2019-03-31 10:01:52 -07:00 committed by Lars Brubaker
parent 6421798c36
commit 474d3894ed
3 changed files with 75 additions and 4 deletions

View file

@ -275,13 +275,15 @@ namespace MatterHackers.MatterControl.Library.Export
var queuedCommandStream = new QueuedCommandsStream(printer, gCodeBaseStream);
GCodeStream accumulatedStream = queuedCommandStream;
accumulatedStream = new ProcessWriteRegexStream(printer, accumulatedStream, queuedCommandStream);
accumulatedStream = new RelativeToAbsoluteStream(printer, accumulatedStream);
if (printer.Settings.GetValue<int>(SettingsKey.extruder_count) > 1)
{
accumulatedStream = new ToolChangeStream(printer, accumulatedStream, queuedCommandStream);
}
accumulatedStream = new RelativeToAbsoluteStream(printer, accumulatedStream);
bool levelingEnabled = printer.Settings.GetValue<bool>(SettingsKey.print_leveling_enabled) && applyLeveling;
accumulatedStream = new BabyStepsStream(printer, accumulatedStream);
@ -307,8 +309,7 @@ namespace MatterHackers.MatterControl.Library.Export
accumulatedStream = softwareEndstopsExStream12;
}
// this is added to ensure we are rewriting the G0 G1 commands as needed
accumulatedStream = new ProcessWriteRegexStream(printer, accumulatedStream, queuedCommandStream);
accumulatedStream = new RemoveNOPsStream(printer, accumulatedStream);
return accumulatedStream;
}