Re-Slice does not extrude or retract any extra filament now

This commit is contained in:
Lars Brubaker 2018-10-08 18:24:17 -07:00
parent 8b10421609
commit 87599a60f0
3 changed files with 11 additions and 6 deletions

View file

@ -88,8 +88,9 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
// switch the first time we can
GCodeFile = switchToGCode;
LineIndex = switchToGCode.GetFirstLayerInstruction(i);
printerConnection.QueueLine($"G92 E{switchToGCode.Instruction(LineIndex).EPosition}");
var line = $"G92 E{switchToGCode.Instruction(LineIndex).EPosition}";
switchToGCode = null;
return line;
}
else // only switch if we are within one layer height of the new gcode
{
@ -97,7 +98,10 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
{
GCodeFile = switchToGCode;
LineIndex = switchToGCode.GetFirstLayerInstruction(i);
printerConnection.QueueLine($"G92 E{switchToGCode.Instruction(LineIndex).EPosition}");
switchToGCode = null;
var line = $"G92 E{switchToGCode.Instruction(LineIndex).EPosition}";
switchToGCode = null;
return line;
}
}
// we are done evaluating after the first found layer