mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-05 13:04:03 -06:00
New algorithm for overhang detection
This commit is contained in:
parent
015580629b
commit
7e875393f5
3 changed files with 65 additions and 42 deletions
|
@ -267,15 +267,6 @@ sub make_perimeters {
|
|||
$role = EXTR_ROLE_CONTOUR_INTERNAL_PERIMETER;
|
||||
}
|
||||
|
||||
if ($self->id > 0) {
|
||||
# A perimeter is considered overhang if its centerline exceeds the lower layer slices
|
||||
my $is_overhang = $is_contour
|
||||
? @{diff([$polygon], \@lower_slices)}
|
||||
: !@{intersection([$polygon], \@lower_slices)};
|
||||
|
||||
$role = EXTR_ROLE_OVERHANG_PERIMETER if $is_overhang;
|
||||
}
|
||||
|
||||
push @loops, Slic3r::ExtrusionLoop->pack(
|
||||
polygon => $polygon,
|
||||
role => $role,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue