Follow-up 42d4f5c7: Reverted "export_sla" and "export_gcode" options into CLIActionsConfigDef

This commit is contained in:
YuSanka 2025-02-19 17:18:39 +01:00
parent e1ee817a69
commit c19ce2cbaa
2 changed files with 9 additions and 3 deletions

View File

@ -298,8 +298,16 @@ bool process_actions(Data& cli, const DynamicPrintConfig& print_config, std::vec
return 1;
}
if (actions.has("slice")) {
if (actions.has("slice") || actions.has("export_gcode") || actions.has("export_sla")) {
PrinterTechnology printer_technology = Preset::printer_technology(print_config);
if (actions.has("export_gcode") && printer_technology == ptSLA) {
boost::nowide::cerr << "error: cannot export G-code for an FFF configuration" << std::endl;
return 1;
}
else if (actions.has("export_sla") && printer_technology == ptFFF) {
boost::nowide::cerr << "error: cannot export SLA slices for a SLA configuration" << std::endl;
return 1;
}
const Vec2crd gap{ s_multiple_beds.get_bed_gap() };
arr2::ArrangeBed bed = arr2::to_arrange_bed(get_bed_shape(print_config), gap);

View File

@ -5792,7 +5792,6 @@ CLIActionsConfigDef::CLIActionsConfigDef()
def->cli = "slice|s";
def->set_default_value(new ConfigOptionBool(false));
/* looks like redundant actions. "slice" is complitely enough
def = this->add("export_sla", coBool);
def->label = L("Export SLA");
def->tooltip = L("Slice the model and export SLA printing layers as PNG.");
@ -5804,7 +5803,6 @@ CLIActionsConfigDef::CLIActionsConfigDef()
def->tooltip = L("Slice the model and export toolpaths as G-code.");
def->cli = "export-gcode|gcode|g";
def->set_default_value(new ConfigOptionBool(false));
*/
}
CLITransformConfigDef::CLITransformConfigDef()