Wipe tower: remove 'Purging volumes' button for printers with separate extruders:

the setting really only makes sense for single extruder MM, the others can use
filament_minimal_purge_on_wipe_tower
This commit is contained in:
Lukas Matena 2023-03-30 12:41:57 +02:00
parent 9775bf213d
commit b14855beda
2 changed files with 7 additions and 1 deletions

View File

@ -1352,6 +1352,11 @@ std::vector<std::vector<float>> WipeTower::extract_wipe_volumes(const PrintConfi
// Get wiping matrix to get number of extruders and convert vector<double> to vector<float>: // Get wiping matrix to get number of extruders and convert vector<double> to vector<float>:
std::vector<float> wiping_matrix(cast<float>(config.wiping_volumes_matrix.values)); std::vector<float> wiping_matrix(cast<float>(config.wiping_volumes_matrix.values));
// The values shall only be used when SEMM is enabled. The purging for other printers
// is determined by filament_minimal_purge_on_wipe_tower.
if (! config.single_extruder_multi_material.value)
std::fill(wiping_matrix.begin(), wiping_matrix.end(), 0.f);
// Extract purging volumes for each extruder pair: // Extract purging volumes for each extruder pair:
std::vector<std::vector<float>> wipe_volumes; std::vector<std::vector<float>> wipe_volumes;
const unsigned int number_of_extruders = (unsigned int)(sqrt(wiping_matrix.size())+EPSILON); const unsigned int number_of_extruders = (unsigned int)(sqrt(wiping_matrix.size())+EPSILON);

View File

@ -1122,10 +1122,11 @@ void Tab::update_wiping_button_visibility() {
return; // ys_FIXME return; // ys_FIXME
bool wipe_tower_enabled = dynamic_cast<ConfigOptionBool*>( (m_preset_bundle->prints.get_edited_preset().config ).option("wipe_tower"))->value; bool wipe_tower_enabled = dynamic_cast<ConfigOptionBool*>( (m_preset_bundle->prints.get_edited_preset().config ).option("wipe_tower"))->value;
bool multiple_extruders = dynamic_cast<ConfigOptionFloats*>((m_preset_bundle->printers.get_edited_preset().config).option("nozzle_diameter"))->values.size() > 1; bool multiple_extruders = dynamic_cast<ConfigOptionFloats*>((m_preset_bundle->printers.get_edited_preset().config).option("nozzle_diameter"))->values.size() > 1;
bool single_extruder_multi_material = dynamic_cast<ConfigOptionBool*>((m_preset_bundle->printers.get_edited_preset().config).option("single_extruder_multi_material"))->value;
auto wiping_dialog_button = wxGetApp().sidebar().get_wiping_dialog_button(); auto wiping_dialog_button = wxGetApp().sidebar().get_wiping_dialog_button();
if (wiping_dialog_button) { if (wiping_dialog_button) {
wiping_dialog_button->Show(wipe_tower_enabled && multiple_extruders); wiping_dialog_button->Show(wipe_tower_enabled && multiple_extruders && single_extruder_multi_material);
wiping_dialog_button->GetParent()->Layout(); wiping_dialog_button->GetParent()->Layout();
} }
} }