diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index a514019412..9dacd594be 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -1161,10 +1161,15 @@ static std::vector get_path_of_change_filament(const Print& print) const bool is_ramming = (gcodegen.config().single_extruder_multi_material) || (!gcodegen.config().single_extruder_multi_material && gcodegen.config().filament_multitool_ramming.get_at(tcr.initial_tool)); + // Orca: user-facing override (Printer Settings > Wipe tower > "Tool change on wipe tower"). + // Forces the toolhead to travel over the wipe tower before issuing Tx even on multi-toolhead + // printers without ramming, where Orca would otherwise emit Tx in place (potentially over the part). + const bool tool_change_on_wipe_tower = gcodegen.config().tool_change_on_wipe_tower.value; const bool should_travel_to_tower = !tcr.priming && (tcr.force_travel // wipe tower says so || !needs_toolchange // this is just finishing the tower with no toolchange || will_go_down // Make sure to move to prime tower before moving down - || is_ramming); + || is_ramming + || tool_change_on_wipe_tower); if (should_travel_to_tower || gcodegen.m_need_change_layer_lift_z) { // FIXME: It would be better if the wipe tower set the force_travel flag for all toolchanges, diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index ea9d5a57b1..6780cb6188 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -1343,7 +1343,7 @@ static std::vector s_Preset_printer_options { "use_relative_e_distances", "extruder_type", "use_firmware_retraction", "printer_notes", "grab_length", "support_object_skip_flush", "physical_extruder_map", "cooling_tube_retraction", - "cooling_tube_length", "high_current_on_filament_swap", "parking_pos_retraction", "extra_loading_move", "wipe_tower_type", "purge_in_prime_tower", "enable_filament_ramming", + "cooling_tube_length", "high_current_on_filament_swap", "parking_pos_retraction", "extra_loading_move", "wipe_tower_type", "purge_in_prime_tower", "enable_filament_ramming", "tool_change_on_wipe_tower", "z_offset", "disable_m73", "preferred_orientation", "emit_machine_limits_to_gcode", "pellet_modded_printer", "support_multi_bed_types", "default_bed_type", "bed_mesh_min","bed_mesh_max","bed_mesh_probe_distance", "adaptive_bed_mesh_margin", "enable_long_retraction_when_cut","long_retractions_when_cut","retraction_distances_when_cut", "bed_temperature_formula", "nozzle_flush_dataset" diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index 57a17d01e3..d5a4296dcc 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -359,6 +359,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n || opt_key == "wipe_tower_filament" || opt_key == "wiping_volumes_extruders" || opt_key == "enable_filament_ramming" + || opt_key == "tool_change_on_wipe_tower" || opt_key == "purge_in_prime_tower" || opt_key == "z_offset" || opt_key == "support_multi_bed_types" diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index ac712818ca..0c0549f5c1 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -5806,6 +5806,16 @@ void PrintConfigDef::init_fff_params() def->mode = comAdvanced; def->set_default_value(new ConfigOptionBool(true)); + def = this->add("tool_change_on_wipe_tower", coBool); + def->label = L("Tool change on wipe tower"); + def->tooltip = L("Force the toolhead to travel to the wipe tower before issuing the tool change command (Tx). " + "Only relevant for multi-extruder (multi-toolhead) printers using a Type 2 wipe tower. " + "By default Orca skips the travel on multi-toolhead machines because the firmware handles the head swap, " + "which can result in the Tx command being issued above the printed part. " + "Enable this option if you want the tool change to always be issued above the wipe tower instead."); + def->mode = comAdvanced; + def->set_default_value(new ConfigOptionBool(false)); + def = this->add("wipe_tower_no_sparse_layers", coBool); def->label = L("No sparse layers (beta)"); diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index 416df9c98b..a7f29bda07 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -1452,6 +1452,7 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionEnum, wipe_tower_type)) ((ConfigOptionBool, purge_in_prime_tower)) ((ConfigOptionBool, enable_filament_ramming)) + ((ConfigOptionBool, tool_change_on_wipe_tower)) ((ConfigOptionBool, support_multi_bed_types)) // Small Area Infill Flow Compensation diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index b17be8a76c..9e58d7f9f5 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -4998,6 +4998,7 @@ if (is_marlin_flavor) optgroup->append_single_option_line("wipe_tower_type", "printer_multimaterial_wipe_tower"); optgroup->append_single_option_line("purge_in_prime_tower", "printer_multimaterial_wipe_tower#purge-in-prime-tower"); optgroup->append_single_option_line("enable_filament_ramming", "printer_multimaterial_wipe_tower#enable-filament-ramming"); + optgroup->append_single_option_line("tool_change_on_wipe_tower", "printer_multimaterial_wipe_tower#tool-change-on-wipe-tower"); optgroup = page->new_optgroup(L("Single extruder multi-material parameters"), "param_settings"); @@ -5447,6 +5448,12 @@ void TabPrinter::toggle_options() toggle_option("extruders_count", !bSEMM); toggle_option("manual_filament_change", bSEMM); toggle_option("purge_in_prime_tower", bSEMM && supports_wipe_tower_2); + + // Orca: "Tool change on wipe tower" only makes sense for multi-extruder (multi-toolhead) printers + // using a Type 2 wipe tower. SEMM already always travels to the tower as part of the purge, + // so the option is irrelevant there. + const size_t extruders_count = m_config->option("nozzle_diameter")->size(); + toggle_option("tool_change_on_wipe_tower", !bSEMM && supports_wipe_tower_2 && extruders_count > 1); } wxString extruder_number; long val = 1;