New bridge flow rate multiplier option. #85

This commit is contained in:
Alessandro Ranellucci 2011-12-04 20:29:21 +01:00
parent 3ac9dd513b
commit 28a89c70c9
6 changed files with 17 additions and 4 deletions

View File

@ -126,6 +126,7 @@ The author is Alessandro Ranellucci (me).
--extrusion-width-ratio --extrusion-width-ratio
Calculate the extrusion width as the layer height multiplied by Calculate the extrusion width as the layer height multiplied by
this value (> 0, default: calculated automatically) this value (> 0, default: calculated automatically)
--bridge-flow-ratio Multiplier for extrusion when bridging (> 0, default: 1)
Print options: Print options:
--perimeters Number of perimeters/horizontal skins (range: 1+, --perimeters Number of perimeters/horizontal skins (range: 1+,

View File

@ -61,6 +61,7 @@ our $layer_height = 0.4;
our $first_layer_height_ratio = 1; our $first_layer_height_ratio = 1;
our $infill_every_layers = 1; our $infill_every_layers = 1;
our $extrusion_width_ratio = 0; our $extrusion_width_ratio = 0;
our $bridge_flow_ratio = 1;
our $flow_speed_ratio = 1; our $flow_speed_ratio = 1;
our $flow_width; our $flow_width;

View File

@ -115,6 +115,11 @@ our $Options = {
cli => 'extrusion-width-ratio=f', cli => 'extrusion-width-ratio=f',
type => 'f', type => 'f',
}, },
'bridge_flow_ratio' => {
label => 'Bridge flow ratio',
cli => 'bridge-flow-ratio=f',
type => 'f',
},
'first_layer_height_ratio' => { 'first_layer_height_ratio' => {
label => 'First layer height ratio', label => 'First layer height ratio',
cli => 'first-layer-height-ratio=f', cli => 'first-layer-height-ratio=f',

View File

@ -88,14 +88,19 @@ sub make_fill {
my $filler = $Slic3r::fill_pattern; my $filler = $Slic3r::fill_pattern;
my $density = $Slic3r::fill_density; my $density = $Slic3r::fill_density;
my $flow_width = $Slic3r::flow_width; my $flow_width = $Slic3r::flow_width;
my $flow_ratio = 1;
my $is_bridge = $layer->id > 0 && $surface->surface_type eq 'bottom'; my $is_bridge = $layer->id > 0 && $surface->surface_type eq 'bottom';
my $is_solid = $surface->surface_type =~ /^(top|bottom)$/; my $is_solid = $surface->surface_type =~ /^(top|bottom)$/;
# force 100% density and rectilinear fill for external surfaces # force 100% density and rectilinear fill for external surfaces
if ($surface->surface_type ne 'internal') { if ($surface->surface_type ne 'internal') {
$density = 1; $density = 1;
$filler = $is_bridge ? 'rectilinear' : $Slic3r::solid_fill_pattern; $filler = $Slic3r::solid_fill_pattern;
$flow_width = $Slic3r::nozzle_diameter if $is_bridge; if ($is_bridge) {
$filler = 'rectilinear';
$flow_width = sqrt($Slic3r::bridge_flow_ratio * ($Slic3r::nozzle_diameter**2));
$flow_ratio = $Slic3r::bridge_flow_ratio;
}
} else { } else {
next SURFACE unless $density > 0; next SURFACE unless $density > 0;
} }
@ -114,7 +119,7 @@ sub make_fill {
[ @$_ ], [ @$_ ],
role => ($is_bridge ? 'bridge' : $is_solid ? 'solid-fill' : 'fill'), role => ($is_bridge ? 'bridge' : $is_solid ? 'solid-fill' : 'fill'),
depth_layers => $surface->depth_layers, depth_layers => $surface->depth_layers,
flow_ratio => $params->{flow_ratio}, flow_ratio => $flow_ratio * ($params->{flow_ratio} || 1),
), @paths, ), @paths,
], ],
); );

View File

@ -57,7 +57,7 @@ sub new {
}, },
extrusion => { extrusion => {
title => 'Extrusion', title => 'Extrusion',
options => [qw(extrusion_width_ratio)], options => [qw(extrusion_width_ratio bridge_flow_ratio)],
}, },
); );
$self->{panels} = \%panels; $self->{panels} = \%panels;

View File

@ -132,6 +132,7 @@ Usage: slic3r.pl [ OPTIONS ] file.stl
--extrusion-width-ratio --extrusion-width-ratio
Calculate the extrusion width as the layer height multiplied by Calculate the extrusion width as the layer height multiplied by
this value (> 0, default: calculated automatically) this value (> 0, default: calculated automatically)
--bridge-flow-ratio Multiplier for extrusion when bridging (> 0, default: $Slic3r::bridge_flow_ratio)
Print options: Print options:
--perimeters Number of perimeters/horizontal skins (range: 1+, --perimeters Number of perimeters/horizontal skins (range: 1+,