mirror of https://github.com/vitalif/Slic3r
Fix minor bug causing some gaps to be infilled twice
parent
f79ba8cec0
commit
06fc1d1044
|
@ -13,7 +13,7 @@ use Slic3r::Fill::PlanePath;
|
||||||
use Slic3r::Fill::Rectilinear;
|
use Slic3r::Fill::Rectilinear;
|
||||||
use Slic3r::ExtrusionPath ':roles';
|
use Slic3r::ExtrusionPath ':roles';
|
||||||
use Slic3r::Geometry qw(X Y PI scale chained_path);
|
use Slic3r::Geometry qw(X Y PI scale chained_path);
|
||||||
use Slic3r::Geometry::Clipper qw(union_ex diff diff_ex intersection_ex offset);
|
use Slic3r::Geometry::Clipper qw(union_ex diff diff_ex intersection_ex offset offset2);
|
||||||
use Slic3r::Surface ':types';
|
use Slic3r::Surface ':types';
|
||||||
|
|
||||||
|
|
||||||
|
@ -97,14 +97,11 @@ sub make_fill {
|
||||||
# we are going to grow such regions by overlapping them with the void (if any)
|
# we are going to grow such regions by overlapping them with the void (if any)
|
||||||
# TODO: detect and investigate whether there could be narrow regions without
|
# TODO: detect and investigate whether there could be narrow regions without
|
||||||
# any void neighbors
|
# any void neighbors
|
||||||
my $distance_between_surfaces = $layerm->solid_infill_flow->scaled_spacing;
|
my $distance_between_surfaces = $layerm->solid_infill_flow->scaled_spacing * &Slic3r::INFILL_OVERLAP_OVER_SPACING;
|
||||||
{
|
{
|
||||||
my $collapsed = diff(
|
my $collapsed = diff(
|
||||||
[ map @{$_->expolygon}, @surfaces ],
|
[ map @{$_->expolygon}, @surfaces ],
|
||||||
offset(
|
offset2([ map @{$_->expolygon}, @surfaces ], -$distance_between_surfaces/2, +$distance_between_surfaces/2),
|
||||||
offset([ map @{$_->expolygon}, @surfaces ], -$distance_between_surfaces/2),
|
|
||||||
+$distance_between_surfaces/2
|
|
||||||
),
|
|
||||||
1,
|
1,
|
||||||
);
|
);
|
||||||
push @surfaces, map Slic3r::Surface->new(
|
push @surfaces, map Slic3r::Surface->new(
|
||||||
|
@ -121,7 +118,7 @@ sub make_fill {
|
||||||
}
|
}
|
||||||
|
|
||||||
# add spacing between surfaces
|
# add spacing between surfaces
|
||||||
@surfaces = map @{$_->offset(-$distance_between_surfaces / 2 * &Slic3r::INFILL_OVERLAP_OVER_SPACING)}, @surfaces;
|
@surfaces = map @{$_->offset(-$distance_between_surfaces / 2)}, @surfaces;
|
||||||
|
|
||||||
if (0) {
|
if (0) {
|
||||||
require "Slic3r/SVG.pm";
|
require "Slic3r/SVG.pm";
|
||||||
|
|
Loading…
Reference in New Issue