diff --git a/src/PrusaSlicer.cpp b/src/PrusaSlicer.cpp index 7662288d3..0cb4a38f3 100644 --- a/src/PrusaSlicer.cpp +++ b/src/PrusaSlicer.cpp @@ -162,10 +162,26 @@ int CLI::run(int argc, char **argv) // Initialize full print configs for both the FFF and SLA technologies. FullPrintConfig fff_print_config; -// SLAFullPrintConfig sla_print_config; - fff_print_config.apply(m_print_config, true); -// sla_print_config.apply(m_print_config, true); - + SLAFullPrintConfig sla_print_config; + + // Synchronize the default parameters and the ones received on the command line. + if (printer_technology == ptFFF) { + fff_print_config.apply(m_print_config, true); + m_print_config.apply(fff_print_config, true); + } else if (printer_technology == ptSLA) { + // The default value has to be different from the one in fff mode. + sla_print_config.output_filename_format.value = "[input_filename_base].sl1"; + + // The default bed shape should reflect the default display parameters + // and not the fff defaults. + double w = sla_print_config.display_width.getFloat(); + double h = sla_print_config.display_height.getFloat(); + sla_print_config.bed_shape.values = { Vec2d(0, 0), Vec2d(w, 0), Vec2d(w, h), Vec2d(0, h) }; + + sla_print_config.apply(m_print_config, true); + m_print_config.apply(sla_print_config, true); + } + // Loop through transform options. bool user_center_specified = false; for (auto const &opt_key : m_transforms) {