diff --git a/src/libslic3r/GCode/ToolOrdering.cpp b/src/libslic3r/GCode/ToolOrdering.cpp index daa6e9d8a..0a5197132 100644 --- a/src/libslic3r/GCode/ToolOrdering.cpp +++ b/src/libslic3r/GCode/ToolOrdering.cpp @@ -842,7 +842,7 @@ void ToolOrdering::reorder_extruders_for_minimum_flush_volume() const unsigned int number_of_extruders = (unsigned int) (sqrt(flush_matrix.size()) + EPSILON); // Extract purging volumes for each extruder pair: std::vector> wipe_volumes; - if (print_config->purge_in_prime_tower || m_is_BBL_printer) { + if ((print_config->purge_in_prime_tower && print_config->single_extruder_multi_material) || m_is_BBL_printer) { for (unsigned int i = 0; i < number_of_extruders; ++i) wipe_volumes.push_back( std::vector(flush_matrix.begin() + i * number_of_extruders, flush_matrix.begin() + (i + 1) * number_of_extruders)); diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index b3a9db6f3..058a48514 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -2596,7 +2596,7 @@ const WipeTowerData &Print::wipe_tower_data(size_t filaments_cnt) const if (!is_step_done(psWipeTower) && filaments_cnt != 0) { double width = m_config.prime_tower_width; double layer_height = 0.2; // hard code layer height - if (m_config.purge_in_prime_tower) { + if (m_config.purge_in_prime_tower && m_config.single_extruder_multi_material) { // Calculating depth should take into account currently set wiping volumes. // For a long time, the initial preview would just use 900/width per toolchange (15mm on a 60mm wide tower) // and it worked well enough. Let's try to do slightly better by accounting for the purging volumes. @@ -2645,7 +2645,7 @@ void Print::_make_wipe_tower() const auto bUseWipeTower2 = is_BBL_printer() ? false : true; // Orca: itertate over wipe_volumes and change the non-zero values to the prime_volume - if (!m_config.purge_in_prime_tower && !is_BBL_printer()) { + if ((!m_config.purge_in_prime_tower || !m_config.single_extruder_multi_material) && !is_BBL_printer()) { for (unsigned int i = 0; i < number_of_extruders; ++i) { for (unsigned int j = 0; j < number_of_extruders; ++j) { if (wipe_volumes[i][j] > 0) { @@ -2824,7 +2824,7 @@ void Print::_make_wipe_tower() if ((first_layer && extruder_id == m_wipe_tower_data.tool_ordering.all_extruders().back()) || extruder_id != current_extruder_id) { float volume_to_wipe = m_config.prime_volume; - if (m_config.purge_in_prime_tower) { + if (m_config.purge_in_prime_tower && m_config.single_extruder_multi_material) { volume_to_wipe = wipe_volumes[current_extruder_id][extruder_id]; // total volume to wipe after this toolchange volume_to_wipe *= m_config.flush_multiplier; // Not all of that can be used for infill purging: diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index b95ace823..13805084b 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -1665,6 +1665,13 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value) wxGetApp().preset_bundle->export_selections(*wxGetApp().app_config); } + //Orca: disable purge_in_prime_tower if single_extruder_multi_material is disabled + if (opt_key == "single_extruder_multi_material" && m_config->opt_bool("single_extruder_multi_material") == false){ + DynamicPrintConfig new_conf = *m_config; + new_conf.set_key_value("purge_in_prime_tower", new ConfigOptionBool(false)); + m_config_manipulation.apply(m_config, &new_conf); + } + if (m_postpone_update_ui) { // It means that not all values are rolled to the system/last saved values jet. // And call of the update() can causes a redundant check of the config values,