diff --git a/lib/Slic3r/Config.pm b/lib/Slic3r/Config.pm index ae166b6c5..26ced03d7 100644 --- a/lib/Slic3r/Config.pm +++ b/lib/Slic3r/Config.pm @@ -3,7 +3,7 @@ use strict; use warnings; use utf8; -use List::Util qw(first); +use List::Util qw(first max); # cemetery of old config settings our @Ignore = qw(duplicate_x duplicate_y multiply_x multiply_y support_material_tool acceleration @@ -319,6 +319,15 @@ sub validate { if defined first { $_ } @{ $self->retract_layer_change }; } + # extrusion widths + { + my $max_nozzle_diameter = max(@{ $self->nozzle_diameter }); + die "Invalid extrusion width (too large)\n" + if defined first { $_ > 10 * $max_nozzle_diameter } + map $self->get("${_}_extrusion_width"), + qw(perimeter infill solid_infill top_infill support_material first_layer); + } + # general validation, quick and dirty foreach my $opt_key (@{$self->get_keys}) { my $opt = $Options->{$opt_key};