From f5eb4f03e17790a6f9b36f75d8281376f598d7a5 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Fri, 16 Dec 2011 09:55:13 +0100 Subject: [PATCH] Skirt can be disabled by either setting skirts to 0 or skirt-height to 0 --- lib/Slic3r/Config.pm | 2 +- lib/Slic3r/Print.pm | 1 + slic3r.pl | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Slic3r/Config.pm b/lib/Slic3r/Config.pm index c8d900501..173bffe4e 100644 --- a/lib/Slic3r/Config.pm +++ b/lib/Slic3r/Config.pm @@ -434,7 +434,7 @@ sub validate { # --skirt-height die "Invalid value for --skirt-height\n" - if $Slic3r::skirt_height < 1; + if $Slic3r::skirt_height < 0; # legacy with existing config files $Slic3r::small_perimeter_speed ||= $Slic3r::perimeter_speed; diff --git a/lib/Slic3r/Print.pm b/lib/Slic3r/Print.pm index 0b3587432..6655fa6db 100644 --- a/lib/Slic3r/Print.pm +++ b/lib/Slic3r/Print.pm @@ -328,6 +328,7 @@ sub extrude_skirt { my @points = (); my @layers = map $self->layer($_), 0..($Slic3r::skirt_height-1); push @points, map @$_, map $_->p, map @{ $_->slices }, @layers; + return if !@points; # find out convex hull my $convex_hull = convex_hull(\@points); diff --git a/slic3r.pl b/slic3r.pl index 4f35f25a9..82c5b6111 100755 --- a/slic3r.pl +++ b/slic3r.pl @@ -159,10 +159,10 @@ Usage: slic3r.pl [ OPTIONS ] file.stl --retract-lift Lift Z by the given distance in mm when retracting (default: $Slic3r::retract_lift) Skirt options: - --skirts Number of skirts to draw (default: $Slic3r::skirts) + --skirts Number of skirts to draw (0+, default: $Slic3r::skirts) --skirt-distance Distance in mm between innermost skirt and object (default: $Slic3r::skirt_distance) - --skirt-height Height of skirts to draw (expressed in layers, default: $Slic3r::skirt_height) + --skirt-height Height of skirts to draw (expressed in layers, 0+, default: $Slic3r::skirt_height) Transform options: --scale Factor for scaling input object (default: $Slic3r::scale)