mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 23:54:00 -06:00
Compensate perimeter/infill overlap for concentric infill
This commit is contained in:
parent
5c7b447f07
commit
78f1527ab7
1 changed files with 4 additions and 2 deletions
|
@ -4,7 +4,7 @@ use Moo;
|
||||||
extends 'Slic3r::Fill::Base';
|
extends 'Slic3r::Fill::Base';
|
||||||
|
|
||||||
use Slic3r::Geometry qw(scale unscale X);
|
use Slic3r::Geometry qw(scale unscale X);
|
||||||
use Slic3r::Geometry::Clipper qw(offset2 union_pt traverse_pt PFT_EVENODD);
|
use Slic3r::Geometry::Clipper qw(offset offset2 union_pt traverse_pt PFT_EVENODD);
|
||||||
|
|
||||||
sub fill_surface {
|
sub fill_surface {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
@ -27,7 +27,9 @@ sub fill_surface {
|
||||||
$flow_spacing = unscale $distance;
|
$flow_spacing = unscale $distance;
|
||||||
}
|
}
|
||||||
|
|
||||||
my @loops = my @last = @$expolygon;
|
# compensate the overlap which is good for rectilinear but harmful for concentric
|
||||||
|
# where the perimeter/infill spacing should be equal to any other loop spacing
|
||||||
|
my @loops = my @last = offset($expolygon, -&Slic3r::INFILL_OVERLAP_OVER_SPACING * $min_spacing / 2);
|
||||||
while (@last) {
|
while (@last) {
|
||||||
push @loops, @last = offset2(\@last, -1.5*$distance, +0.5*$distance);
|
push @loops, @last = offset2(\@last, -1.5*$distance, +0.5*$distance);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue