mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 09:17:52 -06:00
Bugfix: concave starting points were not correctly detected for slice holes. Includes regression test. #2857
This commit is contained in:
parent
97c701cdac
commit
f14c0e2183
5 changed files with 54 additions and 10 deletions
|
@ -129,9 +129,16 @@ sub extrude_loop {
|
|||
$loop->split_at($last_pos);
|
||||
} elsif ($self->config->seam_position eq 'nearest' || $self->config->seam_position eq 'aligned') {
|
||||
# simplify polygon in order to skip false positives in concave/convex detection
|
||||
# ($loop is always ccw as $polygon->simplify only works on ccw polygons)
|
||||
my $polygon = $loop->polygon;
|
||||
my @simplified = @{$polygon->simplify(scale $self->config->get_at('nozzle_diameter', $self->writer->extruder->id)/2)};
|
||||
|
||||
# restore original winding order so that concave and convex detection always happens
|
||||
# on the right/outer side of the polygon
|
||||
if ($was_clockwise) {
|
||||
$_->reverse for @simplified;
|
||||
}
|
||||
|
||||
# concave vertices have priority
|
||||
my @candidates = map @{$_->concave_points(PI*4/3)}, @simplified;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue