mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-12-11 16:00:17 -07:00
Make flow_spacing required for ExtrusionPath objects
This commit is contained in:
parent
37637c34f5
commit
be7e211bb6
5 changed files with 15 additions and 17 deletions
|
|
@ -59,8 +59,8 @@ sub fill_surface {
|
|||
|
||||
# connect lines
|
||||
unless ($params{dont_connect}) {
|
||||
my $collection = Slic3r::ExtrusionPath::Collection->new(
|
||||
paths => [ map Slic3r::ExtrusionPath->new(polyline => Slic3r::Polyline->new(@$_), role => -1), @paths ],
|
||||
my $collection = Slic3r::Polyline::Collection->new(
|
||||
polylines => [ map Slic3r::Polyline->new(@$_), @paths ],
|
||||
);
|
||||
@paths = ();
|
||||
|
||||
|
|
@ -75,17 +75,17 @@ sub fill_surface {
|
|||
|
||||
foreach my $path ($collection->shortest_path) {
|
||||
if (@paths) {
|
||||
my @distance = map abs($path->points->[0][$_] - $paths[-1][-1][$_]), (X,Y);
|
||||
my @distance = map abs($path->[0][$_] - $paths[-1][-1][$_]), (X,Y);
|
||||
|
||||
# TODO: we should also check that both points are on a fill_boundary to avoid
|
||||
# connecting paths on the boundaries of internal regions
|
||||
if ($can_connect->(@distance, $paths[-1][-1], $path->points->[0])
|
||||
&& $expolygon_off->encloses_line(Slic3r::Line->new($paths[-1][-1], $path->points->[0]), $tolerance)) {
|
||||
push @{$paths[-1]}, @{$path->points};
|
||||
if ($can_connect->(@distance, $paths[-1][-1], $path->[0])
|
||||
&& $expolygon_off->encloses_line(Slic3r::Line->new($paths[-1][-1], $path->[0]), $tolerance)) {
|
||||
push @{$paths[-1]}, @$path;
|
||||
next;
|
||||
}
|
||||
}
|
||||
push @paths, $path->points;
|
||||
push @paths, $path;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue