From 52270d6b95bd2ea215bed9f3a14b601ac79eca3c Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Wed, 30 Nov 2011 18:18:17 +0100 Subject: [PATCH] Bugfix: extrusion width ratio gave wrong flow rate under certain circumstances. #80 --- lib/Slic3r/Config.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/Slic3r/Config.pm b/lib/Slic3r/Config.pm index 3e246691e..0787afe2c 100644 --- a/lib/Slic3r/Config.pm +++ b/lib/Slic3r/Config.pm @@ -295,14 +295,13 @@ sub validate { * $Slic3r::flow_speed_ratio * PI / (4 * $Slic3r::layer_height); my $max_flow_width = $Slic3r::layer_height + $Slic3r::nozzle_diameter; - if ($Slic3r::flow_width > $max_flow_width) { - $Slic3r::flow_speed_ratio = $max_flow_width / $Slic3r::flow_width; - $Slic3r::flow_width = $max_flow_width; - } if ($Slic3r::extrusion_width_ratio) { my $flow_width = $Slic3r::layer_height * $Slic3r::extrusion_width_ratio; $Slic3r::flow_speed_ratio = $flow_width / $Slic3r::flow_width; $Slic3r::flow_width = $flow_width; + } elsif ($Slic3r::flow_width > $max_flow_width) { + $Slic3r::flow_speed_ratio = $max_flow_width / $Slic3r::flow_width; + $Slic3r::flow_width = $max_flow_width; } Slic3r::debugf "Flow width = $Slic3r::flow_width\n";