From 6e02c8f117bdf02bb5f806fd99ad402660e04157 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Thu, 17 Nov 2011 10:38:23 +0100 Subject: [PATCH] Renamed perimeter_offsets to perimeters --- lib/Slic3r.pm | 2 +- lib/Slic3r/Config.pm | 5 +++-- lib/Slic3r/GUI/SkeinPanel.pm | 2 +- lib/Slic3r/Perimeter.pm | 4 ++-- slic3r.pl | 4 ++-- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/Slic3r.pm b/lib/Slic3r.pm index 27e3acfbc..39342b10a 100644 --- a/lib/Slic3r.pm +++ b/lib/Slic3r.pm @@ -62,7 +62,7 @@ our $thickness_ratio = 1; our $flow_width; # print options -our $perimeter_offsets = 3; +our $perimeters = 3; our $solid_layers = 3; our $bridge_overlap = 3; # mm our $perimeter_infill_overlap_ratio = 0.15; # factor for flow width diff --git a/lib/Slic3r/Config.pm b/lib/Slic3r/Config.pm index 6d5f081db..8c802d0eb 100644 --- a/lib/Slic3r/Config.pm +++ b/lib/Slic3r/Config.pm @@ -78,9 +78,10 @@ our $Options = { }, # print options - 'perimeter_offsets' => { + 'perimeters' => { label => 'Perimeters', type => 'i', + aliases => [qw(perimeter_offsets)], }, 'solid_layers' => { label => 'Solid layers', @@ -287,7 +288,7 @@ sub validate { # --perimeters die "Invalid value for --perimeters\n" - if $Slic3r::perimeter_offsets < 1; + if $Slic3r::perimeters < 1; # --solid-layers die "Invalid value for --solid-layers\n" diff --git a/lib/Slic3r/GUI/SkeinPanel.pm b/lib/Slic3r/GUI/SkeinPanel.pm index ea521be1a..55459642d 100644 --- a/lib/Slic3r/GUI/SkeinPanel.pm +++ b/lib/Slic3r/GUI/SkeinPanel.pm @@ -33,7 +33,7 @@ sub new { }, print => { title => 'Print settings', - options => [qw(perimeter_offsets solid_layers fill_density fill_angle fill_pattern solid_fill_pattern)], + options => [qw(perimeters solid_layers fill_density fill_angle fill_pattern solid_fill_pattern)], }, retract => { title => 'Retraction', diff --git a/lib/Slic3r/Perimeter.pm b/lib/Slic3r/Perimeter.pm index 5698ae22c..d14b0bff9 100644 --- a/lib/Slic3r/Perimeter.pm +++ b/lib/Slic3r/Perimeter.pm @@ -12,7 +12,7 @@ sub make_perimeter { # at least one perimeter is required die "Can't slice object with no perimeters!\n" - if $Slic3r::perimeter_offsets == 0; + if $Slic3r::perimeters == 0; # this array will hold one arrayref per original surface; # each item of this arrayref is an arrayref representing a depth (from inner @@ -40,7 +40,7 @@ sub make_perimeter { # create other offsets push @perimeters, []; - for (my $loop = 0; $loop < $Slic3r::perimeter_offsets; $loop++) { + for (my $loop = 0; $loop < $Slic3r::perimeters; $loop++) { # offsetting a polygon can result in one or many offset polygons @last_offsets = map $_->offset_ex(-$distance), @last_offsets; push @{ $perimeters[-1] }, [@last_offsets]; diff --git a/slic3r.pl b/slic3r.pl index 001bbb023..0d9e311d1 100755 --- a/slic3r.pl +++ b/slic3r.pl @@ -49,7 +49,7 @@ GetOptions( 'infill-every-layers=i' => \$Slic3r::infill_every_layers, # print options - 'perimeters=i' => \$Slic3r::perimeter_offsets, + 'perimeters=i' => \$Slic3r::perimeters, 'solid-layers=i' => \$Slic3r::solid_layers, 'fill-pattern=s' => \$Slic3r::fill_pattern, 'solid-fill-pattern=s' => \$Slic3r::solid_fill_pattern, @@ -168,7 +168,7 @@ Usage: slic3r.pl [ OPTIONS ] file.stl Print options: --perimeters Number of perimeters/horizontal skins (range: 1+, - default: $Slic3r::perimeter_offsets) + default: $Slic3r::perimeters) --solid-layers Number of solid layers to do for top/bottom surfaces (range: 1+, default: $Slic3r::solid_layers) --fill-density Infill density (range: 0-1, default: $Slic3r::fill_density)