Bugfix: fatal error in the rare case that a bridge has no anchor points. #1607
This commit is contained in:
parent
4da71e8f13
commit
cfbbb539a5
1 changed files with 2 additions and 1 deletions
|
@ -585,8 +585,9 @@ sub _detect_bridge_direction {
|
||||||
# generate lines in this direction
|
# generate lines in this direction
|
||||||
my $bounding_box = Slic3r::Geometry::BoundingBox->new_from_points([ map @$_, map @$_, @$anchors ]);
|
my $bounding_box = Slic3r::Geometry::BoundingBox->new_from_points([ map @$_, map @$_, @$anchors ]);
|
||||||
|
|
||||||
|
# note that @$anchors might be empty
|
||||||
my @lines = ();
|
my @lines = ();
|
||||||
for (my $x = $bounding_box->x_min; $x <= $bounding_box->x_max; $x += $line_increment) {
|
for (my $x = ($bounding_box->x_min // 0); $x <= ($bounding_box->x_max // -1); $x += $line_increment) {
|
||||||
push @lines, [ [$x, $bounding_box->y_min], [$x, $bounding_box->y_max] ];
|
push @lines, [ [$x, $bounding_box->y_min], [$x, $bounding_box->y_max] ];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue