New option to change perimeter order. #534

internal-support
Alessandro Ranellucci 2013-03-16 18:56:49 +01:00
parent 33b40eda18
commit db2e76a0df
5 changed files with 16 additions and 3 deletions

View File

@ -197,6 +197,7 @@ The author of the Silk icon set is Mark James.
--extra-perimeters Add more perimeters when needed (default: yes)
--randomize-start Randomize starting point across layers (default: yes)
--avoid-crossing-perimeters Optimize travel moves so that no perimeters are crossed (default: no)
--external-perimeters-first Reverse perimeter order. (default: no)
--only-retract-when-crossing-perimeters
Disable retraction when travelling between infill paths inside the same island.
(default: yes)

View File

@ -562,6 +562,13 @@ our $Options = {
type => 'bool',
default => 0,
},
'external_perimeters_first' => {
label => 'External perimeters first',
tooltip => 'Print contour perimeters from the outermost one to the innermost one instead of the default inverse order.',
cli => 'external-perimeters-first!',
type => 'bool',
default => 0,
},
'only_retract_when_crossing_perimeters' => {
label => 'Only retract when crossing perimeters',
tooltip => 'Disables retraction when travelling between infill paths inside the same island.',

View File

@ -407,7 +407,7 @@ sub build {
},
{
title => 'Advanced',
options => [qw(avoid_crossing_perimeters)],
options => [qw(avoid_crossing_perimeters external_perimeters_first)],
},
]);

View File

@ -404,10 +404,14 @@ sub make_perimeters {
}
}
# do holes, then contours starting from innermost one
# first do holes
$self->_add_perimeter($holes[$_], $is_external{$_} ? EXTR_ROLE_EXTERNAL_PERIMETER : undef)
for reverse 0 .. $#holes;
for my $depth (reverse 0 .. $#$island) {
# then do contours according to the user settings
my @contour_order = 0 .. $#$island;
@contour_order = reverse @contour_order if !$Slic3r::Config->external_perimeters_first;
for my $depth (@contour_order) {
my $role = $depth == $#$island ? EXTR_ROLE_CONTOUR_INTERNAL_PERIMETER
: $depth == 0 ? EXTR_ROLE_EXTERNAL_PERIMETER
: EXTR_ROLE_PERIMETER;

View File

@ -250,6 +250,7 @@ $j
--extra-perimeters Add more perimeters when needed (default: yes)
--randomize-start Randomize starting point across layers (default: yes)
--avoid-crossing-perimeters Optimize travel moves so that no perimeters are crossed (default: no)
--external-perimeters-first Reverse perimeter order. (default: no)
--only-retract-when-crossing-perimeters
Disable retraction when travelling between infill paths inside the same island.
(default: no)