From 45611d674263951a23ab42bd9ef10eeff1c1c488 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sun, 16 Jun 2013 18:05:56 +0200 Subject: [PATCH] Fix connection algorithm for rectilinear infill as sometimes it wasn't connecting segments correctly --- lib/Slic3r/Fill/Rectilinear.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/Fill/Rectilinear.pm b/lib/Slic3r/Fill/Rectilinear.pm index 895f2fdcd..08bbee21f 100644 --- a/lib/Slic3r/Fill/Rectilinear.pm +++ b/lib/Slic3r/Fill/Rectilinear.pm @@ -78,13 +78,13 @@ sub fill_surface { @paths = (); my $tolerance = 10 * scaled_epsilon; - my $diagonal_distance = $distance_between_lines * 5; + my $diagonal_distance = $distance_between_lines * 2; my $can_connect = $is_line_pattern ? sub { ($_[X] >= ($distance_between_lines - $line_oscillation) - $tolerance) && ($_[X] <= ($distance_between_lines + $line_oscillation) + $tolerance) && $_[Y] <= $diagonal_distance } - : sub { abs($_[X] - $distance_between_lines) <= $tolerance && $_[Y] <= $diagonal_distance }; + : sub { $_[X] <= $diagonal_distance && $_[Y] <= $diagonal_distance }; foreach my $path ($collection->chained_path) { if (@paths) {