More aggressive gap fill #2560
This commit is contained in:
parent
ba6ae12635
commit
5574e376d6
1 changed files with 6 additions and 3 deletions
|
@ -286,7 +286,7 @@ sub process {
|
||||||
# where 0.5*$pwidth < thickness < $pwidth, infill with width = 0.5*$pwidth
|
# where 0.5*$pwidth < thickness < $pwidth, infill with width = 0.5*$pwidth
|
||||||
my @gap_sizes = (
|
my @gap_sizes = (
|
||||||
[ $pwidth, 2*$pspacing, unscale 1.5*$pwidth ],
|
[ $pwidth, 2*$pspacing, unscale 1.5*$pwidth ],
|
||||||
[ 0.5*$pwidth, $pwidth, unscale 0.5*$pwidth ],
|
[ 0.1*$pwidth, $pwidth, unscale 0.5*$pwidth ],
|
||||||
);
|
);
|
||||||
foreach my $gap_size (@gap_sizes) {
|
foreach my $gap_size (@gap_sizes) {
|
||||||
my @gap_fill = $self->_fill_gaps(@$gap_size, \@gaps);
|
my @gap_fill = $self->_fill_gaps(@$gap_size, \@gaps);
|
||||||
|
@ -384,8 +384,8 @@ sub _traverse_loops {
|
||||||
push @paths, Slic3r::ExtrusionPath->new(
|
push @paths, Slic3r::ExtrusionPath->new(
|
||||||
polyline => $loop->polygon->split_at_first_point,
|
polyline => $loop->polygon->split_at_first_point,
|
||||||
role => $role,
|
role => $role,
|
||||||
mm3_per_mm => $self->_mm3_per_mm,
|
mm3_per_mm => ($is_external ? $self->_ext_mm3_per_mm : $self->_mm3_per_mm),
|
||||||
width => $self->perimeter_flow->width,
|
width => ($is_external ? $self->ext_perimeter_flow->width : $self->perimeter_flow->width),
|
||||||
height => $self->layer_height,
|
height => $self->layer_height,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -441,11 +441,14 @@ sub _traverse_loops {
|
||||||
sub _fill_gaps {
|
sub _fill_gaps {
|
||||||
my ($self, $min, $max, $w, $gaps) = @_;
|
my ($self, $min, $max, $w, $gaps) = @_;
|
||||||
|
|
||||||
|
$min *= (1 - &Slic3r::INSET_OVERLAP_TOLERANCE);
|
||||||
|
|
||||||
my $this = diff_ex(
|
my $this = diff_ex(
|
||||||
offset2([ map @$_, @$gaps ], -$min/2, +$min/2),
|
offset2([ map @$_, @$gaps ], -$min/2, +$min/2),
|
||||||
offset2([ map @$_, @$gaps ], -$max/2, +$max/2),
|
offset2([ map @$_, @$gaps ], -$max/2, +$max/2),
|
||||||
1,
|
1,
|
||||||
);
|
);
|
||||||
|
|
||||||
my @polylines = map @{$_->medial_axis($max, $min/2)}, @$this;
|
my @polylines = map @{$_->medial_axis($max, $min/2)}, @$this;
|
||||||
return if !@polylines;
|
return if !@polylines;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue