Fixed regression causing thin walls to be processed twice, thus producing overlapping straight paths and zigzag. #1035
This commit is contained in:
parent
a2702082b2
commit
fa41e15c68
3 changed files with 16 additions and 1 deletions
|
@ -277,6 +277,17 @@ sub make_perimeters {
|
||||||
if ($Slic3r::Config->gap_fill_speed > 0 && $Slic3r::Config->fill_density > 0) {
|
if ($Slic3r::Config->gap_fill_speed > 0 && $Slic3r::Config->fill_density > 0) {
|
||||||
my $filler = Slic3r::Fill::Rectilinear->new(layer_id => $self->layer->id);
|
my $filler = Slic3r::Fill::Rectilinear->new(layer_id => $self->layer->id);
|
||||||
|
|
||||||
|
# we should probably use this code to handle thin walls and remove that logic from
|
||||||
|
# make_surfaces(), but we need to enable dynamic extrusion width before as we can't
|
||||||
|
# use zigzag for thin walls.
|
||||||
|
# in the mean time we subtract thin walls from the detected gaps so that we don't
|
||||||
|
# reprocess them, causing overlapping thin walls and zigzag.
|
||||||
|
@gaps = @{diff_ex(
|
||||||
|
[ map @$_, @gaps ],
|
||||||
|
[ map $_->grow($self->perimeter_flow->scaled_width), @{$self->{thin_walls}} ],
|
||||||
|
1,
|
||||||
|
)};
|
||||||
|
|
||||||
my $w = $self->perimeter_flow->width;
|
my $w = $self->perimeter_flow->width;
|
||||||
my @widths = (1.5 * $w, $w, 0.5 * $w); # worth trying 0.2 too?
|
my @widths = (1.5 * $w, $w, 0.5 * $w); # worth trying 0.2 too?
|
||||||
foreach my $width (@widths) {
|
foreach my $width (@widths) {
|
||||||
|
|
|
@ -92,6 +92,11 @@ sub offset {
|
||||||
return map Slic3r::Polygon->new($_), Slic3r::Geometry::Clipper::offset([$self], @_);
|
return map Slic3r::Polygon->new($_), Slic3r::Geometry::Clipper::offset([$self], @_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub grow {
|
||||||
|
my $self = shift;
|
||||||
|
return $self->split_at_first_point->grow(@_);
|
||||||
|
}
|
||||||
|
|
||||||
# this method subdivides the polygon segments to that no one of them
|
# this method subdivides the polygon segments to that no one of them
|
||||||
# is longer than the length provided
|
# is longer than the length provided
|
||||||
sub subdivide {
|
sub subdivide {
|
||||||
|
|
|
@ -84,7 +84,6 @@ sub length {
|
||||||
return $length;
|
return $length;
|
||||||
}
|
}
|
||||||
|
|
||||||
# this only applies to polylines
|
|
||||||
sub grow {
|
sub grow {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
return Slic3r::Polygon->new(@$self, CORE::reverse @$self[1..($#$self-1)])->offset(@_);
|
return Slic3r::Polygon->new(@$self, CORE::reverse @$self[1..($#$self-1)])->offset(@_);
|
||||||
|
|
Loading…
Reference in a new issue