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
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+,

View File

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

View File

@ -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',

View File

@ -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,
],
);

View File

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

View File

@ -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+,