Put a hard limit on manually configured extrusion widths (10 * the largest nozzle diameter configured) to prevent confusion when a bad value is entered. #1691
This commit is contained in:
parent
bb50dfb9ba
commit
a32f548a23
1 changed files with 10 additions and 1 deletions
|
@ -3,7 +3,7 @@ use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use utf8;
|
use utf8;
|
||||||
|
|
||||||
use List::Util qw(first);
|
use List::Util qw(first max);
|
||||||
|
|
||||||
# cemetery of old config settings
|
# cemetery of old config settings
|
||||||
our @Ignore = qw(duplicate_x duplicate_y multiply_x multiply_y support_material_tool acceleration
|
our @Ignore = qw(duplicate_x duplicate_y multiply_x multiply_y support_material_tool acceleration
|
||||||
|
@ -1472,6 +1472,15 @@ sub validate {
|
||||||
if ($self->perimeter_acceleration || $self->infill_acceleration || $self->bridge_acceleration || $self->first_layer_acceleration)
|
if ($self->perimeter_acceleration || $self->infill_acceleration || $self->bridge_acceleration || $self->first_layer_acceleration)
|
||||||
&& !$self->default_acceleration;
|
&& !$self->default_acceleration;
|
||||||
|
|
||||||
|
# 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
|
# general validation, quick and dirty
|
||||||
foreach my $opt_key (keys %$Options) {
|
foreach my $opt_key (keys %$Options) {
|
||||||
my $opt = $Options->{$opt_key};
|
my $opt = $Options->{$opt_key};
|
||||||
|
|
Loading…
Reference in a new issue