Fixed regression causing poor adhesion of rectilinear infill to perimeters
This commit is contained in:
parent
abe048686b
commit
4b7e9fc284
1 changed files with 8 additions and 8 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue