From 282c751b0f0a0f459b7573ee738d04712677bbc8 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Fri, 5 Jul 2013 22:10:43 +0200 Subject: [PATCH] New option for disabling thin wall detection --- lib/Slic3r/Config.pm | 7 +++++++ lib/Slic3r/GUI/Tab.pm | 3 ++- lib/Slic3r/Layer/Region.pm | 2 +- slic3r.pl | 1 + 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/Config.pm b/lib/Slic3r/Config.pm index bf4119fc08..dace84fbad 100644 --- a/lib/Slic3r/Config.pm +++ b/lib/Slic3r/Config.pm @@ -587,6 +587,13 @@ our $Options = { type => 'bool', default => 0, }, + 'thin_walls' => { + label => 'Detect thin walls', + tooltip => 'Detect single-width walls (parts where two extrusions don\'t fit and we need to collapse them into a single trace).', + cli => 'thin-walls!', + type => 'bool', + default => 1, + }, 'avoid_crossing_perimeters' => { label => 'Avoid crossing perimeters', tooltip => 'Optimize travel moves in order to minimize the crossing of perimeters. This is mostly useful with Bowden extruders which suffer from oozing. This feature slows down both the print and the G-code generation.', diff --git a/lib/Slic3r/GUI/Tab.pm b/lib/Slic3r/GUI/Tab.pm index 1a102f90c3..2e0feb90bb 100644 --- a/lib/Slic3r/GUI/Tab.pm +++ b/lib/Slic3r/GUI/Tab.pm @@ -412,7 +412,7 @@ sub build { }, { title => 'Quality (slower slicing)', - options => [qw(extra_perimeters avoid_crossing_perimeters start_perimeters_at_concave_points start_perimeters_at_non_overhang)], + options => [qw(extra_perimeters avoid_crossing_perimeters start_perimeters_at_concave_points start_perimeters_at_non_overhang thin_walls)], lines => [ Slic3r::GUI::OptionsGroup->single_option_line('extra_perimeters'), Slic3r::GUI::OptionsGroup->single_option_line('avoid_crossing_perimeters'), @@ -420,6 +420,7 @@ sub build { label => 'Start perimeters at', options => [qw(start_perimeters_at_concave_points start_perimeters_at_non_overhang)], }, + Slic3r::GUI::OptionsGroup->single_option_line('thin_walls'), ], }, { diff --git a/lib/Slic3r/Layer/Region.pm b/lib/Slic3r/Layer/Region.pm index 8ab7a5a6b3..3b5bfe0dad 100644 --- a/lib/Slic3r/Layer/Region.pm +++ b/lib/Slic3r/Layer/Region.pm @@ -96,7 +96,7 @@ sub make_surfaces { $self->slices([ _merge_loops($loops) ]); # detect thin walls by offsetting slices by half extrusion inwards - { + if ($Slic3r::Config->thin_walls) { my $width = $self->perimeter_flow->scaled_width; my $diff = diff_ex( [ map $_->p, @{$self->slices} ], diff --git a/slic3r.pl b/slic3r.pl index 217e182db7..57e58a1ca5 100755 --- a/slic3r.pl +++ b/slic3r.pl @@ -277,6 +277,7 @@ $j Try to start perimeters at concave points if any (default: no) --start-perimeters-at-non-overhang Try to start perimeters at non-overhang points if any (default: no) + --thin-walls Detect single-width walls (default: yes) Support material options: --support-material Generate support material for overhangs