From bf964b5273406bb1f607415c646c1428350a2154 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Mon, 26 Mar 2012 11:32:59 +0200 Subject: [PATCH] Allow perimeters = 0. #282 --- README.markdown | 2 +- lib/Slic3r/Config.pm | 2 +- lib/Slic3r/Perimeter.pm | 4 ---- slic3r.pl | 2 +- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/README.markdown b/README.markdown index da681c6d8..98cf1e4c2 100644 --- a/README.markdown +++ b/README.markdown @@ -143,7 +143,7 @@ The author is Alessandro Ranellucci (me). Infill every N layers (default: 1) Print options: - --perimeters Number of perimeters/horizontal skins (range: 1+, + --perimeters Number of perimeters/horizontal skins (range: 0+, default: 3) --solid-layers Number of solid layers to do for top/bottom surfaces (range: 1+, default: 3) diff --git a/lib/Slic3r/Config.pm b/lib/Slic3r/Config.pm index 146d6038f..2b8e74e6d 100644 --- a/lib/Slic3r/Config.pm +++ b/lib/Slic3r/Config.pm @@ -554,7 +554,7 @@ sub validate { # --perimeters die "Invalid value for --perimeters\n" - if $Slic3r::perimeters < 1; + if $Slic3r::perimeters < 0; # --solid-layers die "Invalid value for --solid-layers\n" diff --git a/lib/Slic3r/Perimeter.pm b/lib/Slic3r/Perimeter.pm index 20b593ba6..a7150456a 100644 --- a/lib/Slic3r/Perimeter.pm +++ b/lib/Slic3r/Perimeter.pm @@ -11,10 +11,6 @@ sub make_perimeter { my ($layer) = @_; Slic3r::debugf "Making perimeters for layer %d\n", $layer->id; - # at least one perimeter is required - die "Can't slice object with no perimeters!\n" - if $Slic3r::perimeters == 0; - # this array will hold one arrayref per original surface (island); # each item of this arrayref is an arrayref representing a depth (from outer # perimeters to inner); each item of this arrayref is an ExPolygon: diff --git a/slic3r.pl b/slic3r.pl index 10e8f1ec8..4156dd024 100755 --- a/slic3r.pl +++ b/slic3r.pl @@ -161,7 +161,7 @@ Usage: slic3r.pl [ OPTIONS ] file.stl Infill every N layers (default: $Slic3r::infill_every_layers) Print options: - --perimeters Number of perimeters/horizontal skins (range: 1+, + --perimeters Number of perimeters/horizontal skins (range: 0+, default: $Slic3r::perimeters) --solid-layers Number of solid layers to do for top/bottom surfaces (range: 1+, default: $Slic3r::solid_layers)