Add overload for with GCodeFileStream param
This commit is contained in:
parent
402ce9fc24
commit
dfa455040b
1 changed files with 25 additions and 10 deletions
|
|
@ -208,19 +208,10 @@ namespace MatterHackers.MatterControl.Library.Export
|
|||
|
||||
public bool ApplyLeveling { get; set; } = true;
|
||||
|
||||
private void ApplyStreamPipelineAndExport(string gcodeFilename, string outputPath)
|
||||
private void ApplyStreamPipelineAndExport(GCodeFileStream gCodeFileStream, string outputPath)
|
||||
{
|
||||
try
|
||||
{
|
||||
var gCodeFileStream = new GCodeFileStream(
|
||||
GCodeFile.Load(
|
||||
gcodeFilename,
|
||||
new Vector4(),
|
||||
new Vector4(),
|
||||
new Vector4(),
|
||||
Vector4.One,
|
||||
CancellationToken.None));
|
||||
|
||||
bool addLevelingStream = printer.Settings.GetValue<bool>(SettingsKey.print_leveling_enabled) && this.ApplyLeveling;
|
||||
var queueStream = new QueuedCommandsStream(gCodeFileStream);
|
||||
|
||||
|
|
@ -252,5 +243,29 @@ namespace MatterHackers.MatterControl.Library.Export
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void ApplyStreamPipelineAndExport(string gcodeFilename, string outputPath)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.ApplyStreamPipelineAndExport(
|
||||
new GCodeFileStream(
|
||||
GCodeFile.Load(
|
||||
gcodeFilename,
|
||||
new Vector4(),
|
||||
new Vector4(),
|
||||
new Vector4(),
|
||||
Vector4.One,
|
||||
CancellationToken.None)),
|
||||
outputPath);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
UiThread.RunOnIdle(() =>
|
||||
{
|
||||
StyledMessageBox.ShowMessageBox(e.Message, "Couldn't load file".Localize());
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue