Only skip objects with no layers without stopping the whole job

This commit is contained in:
Alessandro Ranellucci 2013-06-03 11:39:23 +02:00
parent 8c74d2f41e
commit 7134df4638
2 changed files with 7 additions and 4 deletions

View file

@ -322,6 +322,13 @@ sub export_gcode {
$status_cb->(10, "Processing triangulated mesh");
$_->slice for @{$self->objects};
# remove empty layers and abort if there are no more
# as some algorithms assume all objects have at least one layer
# note: this will change object indexes
@{$self->objects} = grep @{$_->layers}, @{$self->objects};
die "No layers were detected. You might want to repair your STL file(s) or check their size and retry.\n"
if !@{$self->objects};
if ($Slic3r::Config->resolution) {
$status_cb->(15, "Simplifying input");
$self->_simplify_slices(scale $Slic3r::Config->resolution);