mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 15:44:12 -06:00
Bugfix: prevent fatal error in the rare case that no bridge anchors are found. #1607
This commit is contained in:
parent
a40556ab56
commit
dfd9bc8958
1 changed files with 36 additions and 34 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue