From a15e6127cfc7d9d5544ba9b1a553e29b517be911 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Thu, 8 Jun 2017 12:10:34 +0200 Subject: [PATCH] Relaxed the requirements on the layer height for the Wipe Tower to the span of 0.15mm to 0.35mm. --- lib/Slic3r/GUI/Tab.pm | 7 ++++--- xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp | 14 ++------------ 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/lib/Slic3r/GUI/Tab.pm b/lib/Slic3r/GUI/Tab.pm index 437c315c0..bcbf753cc 100644 --- a/lib/Slic3r/GUI/Tab.pm +++ b/lib/Slic3r/GUI/Tab.pm @@ -855,17 +855,18 @@ sub _update { } if ($config->wipe_tower && - ($config->first_layer_height != 0.2 || ($config->layer_height != 0.15 && $config->layer_height != 0.2))) { + ($config->first_layer_height != 0.2 || $config->layer_height < 0.15 || $config->layer_height > 0.35)) { my $dialog = Wx::MessageDialog->new($self, "The Wipe Tower currently supports only:\n" . "- first layer height 0.2mm\n" - . "- layer height 0.15mm or 0.2mm\n" + . "- layer height from 0.15mm to 0.35mm\n" . "\nShall I adjust those settings in order to enable the Wipe Tower?", 'Wipe Tower', wxICON_WARNING | wxYES | wxNO); my $new_conf = Slic3r::Config->new; if ($dialog->ShowModal() == wxID_YES) { $new_conf->set("first_layer_height", 0.2); - $new_conf->set("layer_height", 0.15) if $config->layer_height != 0.15 && $config->layer_height != 0.2; + $new_conf->set("layer_height", 0.15) if $config->layer_height < 0.15; + $new_conf->set("layer_height", 0.35) if $config->layer_height > 0.35; } else { $new_conf->set("wipe_tower", 0); } diff --git a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp index 329ee6f57..c799601ce 100644 --- a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp +++ b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp @@ -93,19 +93,9 @@ public: m_current_wipe_start_y = 0.f; m_current_shape = (! is_first_layer && m_current_shape == SHAPE_NORMAL) ? SHAPE_REVERSED : SHAPE_NORMAL; ++ m_num_layer_changes; - + // Extrusion rate for an extrusion aka perimeter width 0.35mm. + m_extrusion_flow = std::min(0.2f, layer_height) * 0.145f; int layer_idx = int(std::floor(layer_height * 1000) + 0.5f); - switch (layer_idx) - { - case 150: - m_extrusion_flow = (float)0.0218; - break; - case 200: - default: - // Extrusion rate for an extrusion aka perimeter width 0.35mm. - m_extrusion_flow = (float)0.029; - break; - } } // Return the wipe tower position.