Connect infill segments and adjust spacing and flow rate to fill the area completely without leaving gaps. #89

This commit is contained in:
Alessandro Ranellucci 2011-12-04 16:24:46 +01:00
parent 4fe340cc56
commit 0aff5fab24
7 changed files with 56 additions and 14 deletions

View file

@ -18,7 +18,7 @@ sub add {
sub endpoints {
my $self = shift;
return map $_->endpoints, @{$self->paths};
return [ map $_->endpoints, @{$self->paths} ];
}
sub shortest_path {
@ -30,7 +30,7 @@ sub shortest_path {
CYCLE: while (@{$self->paths}) {
# find nearest point
$start_at = $start_near
? Slic3r::Point->new(Slic3r::Geometry::nearest_point($start_near, [ $self->endpoints ]))
? Slic3r::Point->new(Slic3r::Geometry::nearest_point($start_near, $self->endpoints))
: $self->endpoints->[0];
# loop through paths to find the one that starts or ends at the point found