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.
This commit is contained in:
parent
598ac290a1
commit
c7586e5713
2 changed files with 10 additions and 2 deletions
|
@ -484,6 +484,12 @@ int CLI::run(int argc, char **argv)
|
||||||
if (printer_technology == ptFFF) {
|
if (printer_technology == ptFFF) {
|
||||||
for (auto* mo : model.objects)
|
for (auto* mo : model.objects)
|
||||||
fff_print.auto_assign_extruders(mo);
|
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);
|
print->apply(model, m_print_config);
|
||||||
std::string err = print->validate();
|
std::string err = print->validate();
|
||||||
|
|
|
@ -182,8 +182,10 @@ namespace Slic3r {
|
||||||
void run_post_process_scripts(const std::string &path, const DynamicPrintConfig &config)
|
void run_post_process_scripts(const std::string &path, const DynamicPrintConfig &config)
|
||||||
{
|
{
|
||||||
const auto* post_process = config.opt<ConfigOptionStrings>("post_process");
|
const auto* post_process = config.opt<ConfigOptionStrings>("post_process");
|
||||||
assert(post_process);
|
if (// likely running in SLA mode
|
||||||
if (post_process->values.empty())
|
post_process == nullptr ||
|
||||||
|
// no post-processing script
|
||||||
|
post_process->values.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Store print configuration into environment variables.
|
// Store print configuration into environment variables.
|
||||||
|
|
Loading…
Reference in a new issue