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 = ();
|
@paths = ();
|
||||||
|
|
||||||
my $can_connect =
|
my $tolerance = scale epsilon;
|
||||||
$is_line_pattern ? sub {
|
my $diagonal_distance = $distance_between_lines * 5;
|
||||||
($_[X] >= ($distance_between_lines - $line_oscillation) - epsilon) && ($_[X] <= ($distance_between_lines + $line_oscillation) + epsilon)
|
my $can_connect = $is_line_pattern
|
||||||
&& abs($_[Y]) <= $distance_between_lines * 5
|
? sub {
|
||||||
} : sub {
|
($_[X] >= ($distance_between_lines - $line_oscillation) - $tolerance) && ($_[X] <= ($distance_between_lines + $line_oscillation) + $tolerance)
|
||||||
($_[X] >= $distance_between_lines - epsilon) && ($_[X] <= $distance_between_lines + epsilon) # $_[X] == $distance_between_lines +/- epsilon
|
&& abs($_[Y]) <= $diagonal_distance
|
||||||
&& abs($_[Y]) <= $distance_between_lines * 5
|
}
|
||||||
};
|
: sub { abs($_[X] - $distance_between_lines) <= $tolerance && abs($_[Y]) <= $diagonal_distance };
|
||||||
|
|
||||||
foreach my $path ($collection->shortest_path) {
|
foreach my $path ($collection->shortest_path) {
|
||||||
if (@paths) {
|
if (@paths) {
|
||||||
|
|
Loading…
Reference in a new issue