mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 23:23:59 -06:00
Fixed one typo in BridgeDetector and some improvements to support material
This commit is contained in:
parent
edeb0a90dd
commit
4311f30739
2 changed files with 12 additions and 10 deletions
|
@ -128,7 +128,11 @@ sub detect_angle {
|
|||
|
||||
# sum length of bridged lines
|
||||
$directions_coverage{$angle} = sum(@lengths) // 0;
|
||||
|
||||
|
||||
### The following produces more correct results in some cases and more broken in others.
|
||||
### TODO: investigate, as it looks more reliable than line clipping.
|
||||
###$directions_coverage{$angle} = sum(map $_->area, @{$self->coverage($angle)}) // 0;
|
||||
|
||||
# max length of bridged lines
|
||||
$directions_avg_length{$angle} = @lengths ? (max(@lengths)) : -1;
|
||||
}
|
||||
|
@ -241,13 +245,11 @@ sub unsupported_edges {
|
|||
$grown_lower,
|
||||
);
|
||||
|
||||
# filter out edges parallel to the bridging angle
|
||||
for (my $i = 0; $i <= $#$unsupported; ++$i) {
|
||||
if ($unsupported->[$i]->is_straight && abs($unsupported->[$i]->lines->[0]->direction < $angle) < epsilon) {
|
||||
splice @$unsupported, $i, 1;
|
||||
--$i;
|
||||
}
|
||||
}
|
||||
# split into individual segments and filter out edges parallel to the bridging angle
|
||||
@$unsupported = map $_->as_polyline,
|
||||
grep { abs($_->direction - $angle) < epsilon }
|
||||
map @{$_->lines},
|
||||
@$unsupported;
|
||||
|
||||
if (0) {
|
||||
require "Slic3r/SVG.pm";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue