Merge branch 'master' into xs
This commit is contained in:
commit
28f8083ab7
7 changed files with 87 additions and 15 deletions
|
@ -6,7 +6,8 @@ use utf8;
|
|||
use List::Util qw(first);
|
||||
|
||||
# cemetery of old config settings
|
||||
our @Ignore = qw(duplicate_x duplicate_y multiply_x multiply_y support_material_tool acceleration);
|
||||
our @Ignore = qw(duplicate_x duplicate_y multiply_x multiply_y support_material_tool acceleration
|
||||
adjust_overhang_flow);
|
||||
|
||||
my $serialize_comma = sub { join ',', @{$_[0]} };
|
||||
my $serialize_comma_bool = sub { join ',', map $_ // 0, @{$_[0]} };
|
||||
|
@ -560,7 +561,7 @@ our $Options = {
|
|||
default => 70,
|
||||
},
|
||||
'extra_perimeters' => {
|
||||
label => 'Generate extra perimeters when needed',
|
||||
label => 'Extra perimeters if needed',
|
||||
tooltip => 'Add more perimeters when needed for avoiding gaps in sloping walls.',
|
||||
cli => 'extra-perimeters!',
|
||||
type => 'bool',
|
||||
|
@ -573,6 +574,34 @@ our $Options = {
|
|||
type => 'bool',
|
||||
default => 0,
|
||||
},
|
||||
'start_perimeters_at_concave_points' => {
|
||||
label => 'Concave points',
|
||||
tooltip => 'Prefer to start perimeters at a concave point.',
|
||||
cli => 'start-perimeters-at-concave-points!',
|
||||
type => 'bool',
|
||||
default => 0,
|
||||
},
|
||||
'start_perimeters_at_non_overhang' => {
|
||||
label => 'Non-overhang points',
|
||||
tooltip => 'Prefer to start perimeters at non-overhanging points.',
|
||||
cli => 'start-perimeters-at-non-overhang!',
|
||||
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,
|
||||
},
|
||||
'overhangs' => {
|
||||
label => 'Detect overhangs',
|
||||
tooltip => 'Experimental option to adjust flow for overhangs (bridge flow will be used), to apply bridge speed to them and enable fan.',
|
||||
cli => 'overhangs!',
|
||||
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.',
|
||||
|
|
|
@ -155,9 +155,14 @@ sub extrude_loop {
|
|||
|
||||
# find candidate starting points
|
||||
# start looking for concave vertices not being overhangs
|
||||
my @concave = $loop->polygon->concave_points;
|
||||
my @candidates = grep !Boost::Geometry::Utils::point_covered_by_multi_polygon($_, $self->_layer_overhangs),
|
||||
@concave;
|
||||
my @concave = ();
|
||||
if ($Slic3r::Config->start_perimeters_at_concave_points) {
|
||||
@concave = $loop->polygon->concave_points;
|
||||
}
|
||||
my @candidates = ();
|
||||
if ($Slic3r::Config->start_perimeters_at_non_overhang) {
|
||||
@candidates = grep !Boost::Geometry::Utils::point_covered_by_multi_polygon($_, $self->_layer_overhangs), @concave;
|
||||
}
|
||||
if (!@candidates) {
|
||||
# if none, look for any concave vertex
|
||||
@candidates = @concave;
|
||||
|
@ -192,7 +197,7 @@ sub extrude_loop {
|
|||
|
||||
my @paths = ();
|
||||
# detect overhanging/bridging perimeters
|
||||
if ($extrusion_path->is_perimeter && @{$self->_layer_overhangs}) {
|
||||
if ($Slic3r::Config->overhangs && $extrusion_path->is_perimeter && @{$self->_layer_overhangs}) {
|
||||
# get non-overhang paths by subtracting overhangs from the loop
|
||||
push @paths,
|
||||
$extrusion_path->subtract_expolygons($self->_layer_overhangs);
|
||||
|
|
|
@ -398,7 +398,7 @@ sub build {
|
|||
},
|
||||
{
|
||||
title => 'Vertical shells',
|
||||
options => [qw(perimeters randomize_start extra_perimeters)],
|
||||
options => [qw(perimeters spiral_vase)],
|
||||
},
|
||||
{
|
||||
title => 'Horizontal shells',
|
||||
|
@ -410,9 +410,23 @@ sub build {
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title => 'Quality (slower slicing)',
|
||||
options => [qw(extra_perimeters avoid_crossing_perimeters start_perimeters_at_concave_points start_perimeters_at_non_overhang thin_walls overhangs)],
|
||||
lines => [
|
||||
Slic3r::GUI::OptionsGroup->single_option_line('extra_perimeters'),
|
||||
Slic3r::GUI::OptionsGroup->single_option_line('avoid_crossing_perimeters'),
|
||||
{
|
||||
label => 'Start perimeters at',
|
||||
options => [qw(start_perimeters_at_concave_points start_perimeters_at_non_overhang)],
|
||||
},
|
||||
Slic3r::GUI::OptionsGroup->single_option_line('thin_walls'),
|
||||
Slic3r::GUI::OptionsGroup->single_option_line('overhangs'),
|
||||
],
|
||||
},
|
||||
{
|
||||
title => 'Advanced',
|
||||
options => [qw(avoid_crossing_perimeters external_perimeters_first spiral_vase)],
|
||||
options => [qw(randomize_start external_perimeters_first)],
|
||||
},
|
||||
]);
|
||||
|
||||
|
@ -421,9 +435,13 @@ sub build {
|
|||
title => 'Infill',
|
||||
options => [qw(fill_density fill_pattern solid_fill_pattern)],
|
||||
},
|
||||
{
|
||||
title => 'Reducing printing time',
|
||||
options => [qw(infill_every_layers infill_only_where_needed)],
|
||||
},
|
||||
{
|
||||
title => 'Advanced',
|
||||
options => [qw(infill_every_layers infill_only_where_needed solid_infill_every_layers fill_angle
|
||||
options => [qw(solid_infill_every_layers fill_angle
|
||||
solid_infill_below_area only_retract_when_crossing_perimeters infill_first)],
|
||||
},
|
||||
]);
|
||||
|
|
|
@ -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} ],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue