mirror of https://github.com/vitalif/Slic3r
Bugfix: prevent fatal error in the rare case that no bridge anchors are found. #1607
parent
a40556ab56
commit
dfd9bc8958
|
@ -484,6 +484,7 @@ sub _detect_bridge_direction {
|
|||
1, # safety offset required to avoid Clipper from detecting empty intersection while Boost actually found some @edges
|
||||
);
|
||||
|
||||
if (@$anchors) {
|
||||
# we'll now try several directions using a rudimentary visibility check:
|
||||
# bridge in several directions and then sum the length of lines having both
|
||||
# endpoints within anchors
|
||||
|
@ -523,6 +524,7 @@ sub _detect_bridge_direction {
|
|||
# the best direction is the one causing most lines to be bridged
|
||||
$bridge_angle = Slic3r::Geometry::rad2deg_dir($sorted_directions[-1]);
|
||||
}
|
||||
}
|
||||
|
||||
Slic3r::debugf " Optimal infill angle of bridge on layer %d is %d degrees\n",
|
||||
$self->id, $bridge_angle if defined $bridge_angle;
|
||||
|
|
Loading…
Reference in New Issue