From ba58e0733fffaa39e6ca6babf69a91de194ee575 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Fri, 24 Aug 2012 19:19:45 +0200 Subject: [PATCH] Avoid backwards moves when doing honeycomb infill. #492 --- lib/Slic3r/Fill/Honeycomb.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/Fill/Honeycomb.pm b/lib/Slic3r/Fill/Honeycomb.pm index cbc4f61d3..229c72568 100644 --- a/lib/Slic3r/Fill/Honeycomb.pm +++ b/lib/Slic3r/Fill/Honeycomb.pm @@ -83,7 +83,10 @@ sub fill_surface { $self->cache->{$cache_id} = [@polygons]; } - my @paths = map Slic3r::Polyline->new(@$_, $_->[0]), map @$_, @{intersection_ex( + # build polylines from polygons without re-appending the initial point: + # this cuts the last segment on purpose, so that the jump to the next + # path is more straight + my @paths = map Slic3r::Polyline->new(@$_), map @$_, @{intersection_ex( $self->cache->{$cache_id}, [ map @$_, $expolygon->offset_ex($overlap_distance) ], )};