New top-infill-extrusion-width option

This commit is contained in:
Alessandro Ranellucci 2013-03-07 16:00:58 +01:00
parent 36d24ccb0b
commit 97e864699e
7 changed files with 23 additions and 4 deletions

View File

@ -289,6 +289,8 @@ The author of the Silk icon set is Mark James.
Set a different extrusion width for perimeters
--infill-extrusion-width
Set a different extrusion width for infill
--top-infill-extrusion-width
Set a different extrusion width for top infill
--support-material-extrusion-width
Set a different extrusion width for support material
--bridge-flow-ratio Multiplier for extrusion when bridging (> 0, default: 1)

View File

@ -422,6 +422,14 @@ our $Options = {
type => 'f',
default => 0,
},
'top_infill_extrusion_width' => {
label => 'Top infill',
tooltip => 'Set this to a non-zero value to set a manual extrusion width for infill for top surfaces. You may want to use thinner extrudates to fill all narrow regions and get a smoother finish. If expressed as percentage (for example 90%) if will be computed over layer height.',
sidetext => 'mm or % (leave 0 for default)',
cli => 'top-infill-extrusion-width=s',
type => 'f',
default => 0,
},
'support_material_extrusion_width' => {
label => 'Support material',
tooltip => 'Set this to a non-zero value to set a manual extrusion width for support material. If expressed as percentage (for example 90%) if will be computed over layer height.',

View File

@ -102,7 +102,9 @@ sub make_fill {
SURFACE: foreach my $surface (@surfaces) {
my $filler = $Slic3r::Config->fill_pattern;
my $density = $Slic3r::Config->fill_density;
my $flow_spacing = $layerm->infill_flow->spacing;
my $flow_spacing = ($surface->surface_type == S_TYPE_TOP)
? $layerm->top_infill_flow->spacing
: $layerm->infill_flow->spacing;
my $is_bridge = $layerm->id > 0 && $surface->is_bridge;
my $is_solid = $surface->is_solid;

View File

@ -510,7 +510,7 @@ sub build {
{
title => 'Extrusion width',
label_width => 180,
options => [qw(extrusion_width first_layer_extrusion_width perimeter_extrusion_width infill_extrusion_width support_material_extrusion_width)],
options => [qw(extrusion_width first_layer_extrusion_width perimeter_extrusion_width infill_extrusion_width top_infill_extrusion_width support_material_extrusion_width)],
},
{
title => 'Flow',

View File

@ -16,6 +16,7 @@ has 'layer' => (
has 'region' => (is => 'ro', required => 1, handles => [qw(extruders)]);
has 'perimeter_flow' => (is => 'rw');
has 'infill_flow' => (is => 'rw');
has 'top_infill_flow' => (is => 'rw');
has 'infill_area_threshold' => (is => 'lazy');
has 'overhang_width' => (is => 'lazy');
@ -62,9 +63,12 @@ sub _update_flows {
($self->region->first_layer_flows->{perimeter} || $self->region->flows->{perimeter});
$self->infill_flow
($self->region->first_layer_flows->{infill} || $self->region->flows->{infill});
$self->top_infill_flow
($self->region->first_layer_flows->{top_infill} || $self->region->flows->{top_infill});
} else {
$self->perimeter_flow($self->region->flows->{perimeter});
$self->infill_flow($self->region->flows->{infill});
$self->top_infill_flow($self->region->flows->{top_infill});
}
}

View File

@ -200,10 +200,11 @@ sub init_extruders {
my $region = $self->regions->[$region_id];
# per-role extruders and flows
for (qw(perimeter infill)) {
for (qw(perimeter infill top_infill)) {
my $extruder_name = $_ eq 'top_infill' ? 'infill' : $_;
$region->extruders->{$_} = ($self->regions_count > 1)
? $self->extruders->[$extruder_mapping{$region_id}]
: $self->extruders->[$self->config->get("${_}_extruder")-1];
: $self->extruders->[$self->config->get("${extruder_name}_extruder")-1];
$region->flows->{$_} = $region->extruders->{$_}->make_flow(
width => $self->config->get("${_}_extrusion_width") || $self->config->extrusion_width,
);

View File

@ -337,6 +337,8 @@ $j
Set a different extrusion width for perimeters
--infill-extrusion-width
Set a different extrusion width for infill
--top-infill-extrusion-width
Set a different extrusion width for top infill
--support-material-extrusion-width
Set a different extrusion width for support material
--bridge-flow-ratio Multiplier for extrusion when bridging (> 0, default: $config->{bridge_flow_ratio})