Bugfix: extrusion width ratio gave wrong flow rate under certain circumstances. #80

This commit is contained in:
Alessandro Ranellucci 2011-11-30 18:18:17 +01:00
parent 71c359bb29
commit 52270d6b95

View File

@ -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";