diff --git a/lib/Slic3r/GCode.pm b/lib/Slic3r/GCode.pm index 662920401..da55942f6 100644 --- a/lib/Slic3r/GCode.pm +++ b/lib/Slic3r/GCode.pm @@ -661,7 +661,7 @@ sub set_extruder { } # set the current extruder to the standby temperature - if ($self->config->ooze_prevention && defined $self->extruder) { + if ($self->standby_points && defined $self->extruder) { # move to the nearest standby point $gcode .= $self->travel_to($self->last_pos->nearest_point($self->standby_points)); diff --git a/lib/Slic3r/Print.pm b/lib/Slic3r/Print.pm index 58dd40690..59d90af7d 100644 --- a/lib/Slic3r/Print.pm +++ b/lib/Slic3r/Print.pm @@ -607,9 +607,14 @@ sub make_skirt { my @points = (); foreach my $obj_idx (0 .. $#{$self->objects}) { my $object = $self->objects->[$obj_idx]; - my @layers = map $object->layers->[$_], 0..min($self->config->skirt_height-1, $#{$object->layers}); + + # get skirt layers + my $skirt_height = ($self->config->skirt_height == -1) + ? 1 + $#{$object->layers} + : 1 + min($self->config->skirt_height-1, $#{$object->layers}+1); + my @layer_points = ( - (map @$_, map @$_, map @{$_->slices}, @layers), + map @$_, map @$_, map @{$object->layers->[$_]->slices}, 0..($skirt_height-1), ); if (@{ $object->support_layers }) { my @support_layers = map $object->support_layers->[$_], 0..min($self->config->skirt_height-1, $#{$object->support_layers});