Validate support material threshold in Config.pm (#3845)

straight value of 0 is illegal.
This commit is contained in:
Joseph Lenox 2017-04-03 11:33:19 -05:00 committed by GitHub
parent 7a4d2bd423
commit 6a3eb3d038

View File

@ -269,6 +269,13 @@ sub validate {
qw(perimeter infill solid_infill top_infill support_material first_layer); qw(perimeter infill solid_infill top_infill support_material first_layer);
} }
# support material
if ($self->support_material) {
die "Angle value of 0 is illegal. Use some % value instead (e.g. 150%)\n"
if $self->support_material_threshold == 0 || $self->support_material_threshold eq '0';
}
# general validation, quick and dirty # general validation, quick and dirty
foreach my $opt_key (@{$self->get_keys}) { foreach my $opt_key (@{$self->get_keys}) {
my $opt = $Options->{$opt_key}; my $opt = $Options->{$opt_key};