Skip to content

Commit

Permalink
Fixed regression causing poor adhesion of rectilinear infill to perim…
Browse files Browse the repository at this point in the history
…eters
  • Loading branch information
alranel committed May 4, 2012
1 parent abe0486 commit 4b7e9fc
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/Slic3r/Fill/Rectilinear.pm
Expand Up @@ -61,14 +61,14 @@ sub fill_surface {
);
@paths = ();

my $can_connect =
$is_line_pattern ? sub {
($_[X] >= ($distance_between_lines - $line_oscillation) - epsilon) && ($_[X] <= ($distance_between_lines + $line_oscillation) + epsilon)
&& abs($_[Y]) <= $distance_between_lines * 5
} : sub {
($_[X] >= $distance_between_lines - epsilon) && ($_[X] <= $distance_between_lines + epsilon) # $_[X] == $distance_between_lines +/- epsilon
&& abs($_[Y]) <= $distance_between_lines * 5
};
my $tolerance = scale epsilon;
my $diagonal_distance = $distance_between_lines * 5;
my $can_connect = $is_line_pattern
? sub {
($_[X] >= ($distance_between_lines - $line_oscillation) - $tolerance) && ($_[X] <= ($distance_between_lines + $line_oscillation) + $tolerance)
&& abs($_[Y]) <= $diagonal_distance
}
: sub { abs($_[X] - $distance_between_lines) <= $tolerance && abs($_[Y]) <= $diagonal_distance };

foreach my $path ($collection->shortest_path) {
if (@paths) {
Expand Down

0 comments on commit 4b7e9fc

Please sign in to comment.