mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-13 03:11:50 +08:00
Bugfix: fatal error in the rare case that a bridge has no anchor points. #1607
This commit is contained in:
parent
4da71e8f13
commit
cfbbb539a5
@ -585,8 +585,9 @@ sub _detect_bridge_direction {
|
||||
# generate lines in this direction
|
||||
my $bounding_box = Slic3r::Geometry::BoundingBox->new_from_points([ map @$_, map @$_, @$anchors ]);
|
||||
|
||||
# note that @$anchors might be empty
|
||||
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] ];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user