diff --git a/README.markdown b/README.markdown index fe0cc8180..3f9e28972 100644 --- a/README.markdown +++ b/README.markdown @@ -126,6 +126,7 @@ The author is Alessandro Ranellucci (me). --extrusion-width-ratio Calculate the extrusion width as the layer height multiplied by this value (> 0, default: calculated automatically) + --bridge-flow-ratio Multiplier for extrusion when bridging (> 0, default: 1) Print options: --perimeters Number of perimeters/horizontal skins (range: 1+, diff --git a/lib/Slic3r.pm b/lib/Slic3r.pm index 12bdd2b9f..49b1b2dc0 100644 --- a/lib/Slic3r.pm +++ b/lib/Slic3r.pm @@ -61,6 +61,7 @@ our $layer_height = 0.4; our $first_layer_height_ratio = 1; our $infill_every_layers = 1; our $extrusion_width_ratio = 0; +our $bridge_flow_ratio = 1; our $flow_speed_ratio = 1; our $flow_width; diff --git a/lib/Slic3r/Config.pm b/lib/Slic3r/Config.pm index 316405e27..b84b2443c 100644 --- a/lib/Slic3r/Config.pm +++ b/lib/Slic3r/Config.pm @@ -115,6 +115,11 @@ our $Options = { cli => 'extrusion-width-ratio=f', type => 'f', }, + 'bridge_flow_ratio' => { + label => 'Bridge flow ratio', + cli => 'bridge-flow-ratio=f', + type => 'f', + }, 'first_layer_height_ratio' => { label => 'First layer height ratio', cli => 'first-layer-height-ratio=f', diff --git a/lib/Slic3r/Fill.pm b/lib/Slic3r/Fill.pm index d90af89a9..7d596d8ef 100644 --- a/lib/Slic3r/Fill.pm +++ b/lib/Slic3r/Fill.pm @@ -88,14 +88,19 @@ sub make_fill { my $filler = $Slic3r::fill_pattern; my $density = $Slic3r::fill_density; my $flow_width = $Slic3r::flow_width; + my $flow_ratio = 1; my $is_bridge = $layer->id > 0 && $surface->surface_type eq 'bottom'; my $is_solid = $surface->surface_type =~ /^(top|bottom)$/; # force 100% density and rectilinear fill for external surfaces if ($surface->surface_type ne 'internal') { $density = 1; - $filler = $is_bridge ? 'rectilinear' : $Slic3r::solid_fill_pattern; - $flow_width = $Slic3r::nozzle_diameter if $is_bridge; + $filler = $Slic3r::solid_fill_pattern; + if ($is_bridge) { + $filler = 'rectilinear'; + $flow_width = sqrt($Slic3r::bridge_flow_ratio * ($Slic3r::nozzle_diameter**2)); + $flow_ratio = $Slic3r::bridge_flow_ratio; + } } else { next SURFACE unless $density > 0; } @@ -114,7 +119,7 @@ sub make_fill { [ @$_ ], role => ($is_bridge ? 'bridge' : $is_solid ? 'solid-fill' : 'fill'), depth_layers => $surface->depth_layers, - flow_ratio => $params->{flow_ratio}, + flow_ratio => $flow_ratio * ($params->{flow_ratio} || 1), ), @paths, ], ); diff --git a/lib/Slic3r/GUI/SkeinPanel.pm b/lib/Slic3r/GUI/SkeinPanel.pm index 4651515a6..b26e47234 100644 --- a/lib/Slic3r/GUI/SkeinPanel.pm +++ b/lib/Slic3r/GUI/SkeinPanel.pm @@ -57,7 +57,7 @@ sub new { }, extrusion => { title => 'Extrusion', - options => [qw(extrusion_width_ratio)], + options => [qw(extrusion_width_ratio bridge_flow_ratio)], }, ); $self->{panels} = \%panels; diff --git a/slic3r.pl b/slic3r.pl index e09c48d9d..90fdcb9fd 100755 --- a/slic3r.pl +++ b/slic3r.pl @@ -132,6 +132,7 @@ Usage: slic3r.pl [ OPTIONS ] file.stl --extrusion-width-ratio Calculate the extrusion width as the layer height multiplied by this value (> 0, default: calculated automatically) + --bridge-flow-ratio Multiplier for extrusion when bridging (> 0, default: $Slic3r::bridge_flow_ratio) Print options: --perimeters Number of perimeters/horizontal skins (range: 1+,