diff options
author | Vojtech Bubnik <bubnikv@gmail.com> | 2020-12-07 20:39:15 +0300 |
---|---|---|
committer | Vojtech Bubnik <bubnikv@gmail.com> | 2020-12-07 20:39:33 +0300 |
commit | c7586e571363a3a79bc0039fa2ebef8449d61514 (patch) | |
tree | 49187b10632ef9ce2d11e679b84993c011e13b0f /src/PrusaSlicer.cpp | |
parent | 598ac290a1c4d305450252de7422c224966bb494 (diff) |
Fix of Command line slicing bad gcode #5029
SL1 file was exported with a .gcode suffix if the user did not provide
output file name for SLA command line slicing.
Diffstat (limited to 'src/PrusaSlicer.cpp')
-rw-r--r-- | src/PrusaSlicer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/PrusaSlicer.cpp b/src/PrusaSlicer.cpp index 0a22305ec..f7350dace 100644 --- a/src/PrusaSlicer.cpp +++ b/src/PrusaSlicer.cpp @@ -484,6 +484,12 @@ int CLI::run(int argc, char **argv) if (printer_technology == ptFFF) { for (auto* mo : model.objects) fff_print.auto_assign_extruders(mo); + } else { + // The default for "output_filename_format" is good for FDM: "[input_filename_base].gcode" + // Replace it with a reasonable SLA default. + std::string &format = m_print_config.opt_string("output_filename_format", true); + if (format == static_cast<const ConfigOptionString*>(m_print_config.def()->get("output_filename_format")->default_value.get())->value) + format = "[input_filename_base].SL1"; } print->apply(model, m_print_config); std::string err = print->validate(); |