mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 19:15:56 +08:00
Only apply arc compensation to circular holes. #418
This commit is contained in:
parent
b00d960f4d
commit
ca8a91b2b0
@ -225,6 +225,11 @@ sub make_perimeters {
|
|||||||
foreach my $hole ($last_offsets[0]->holes) {
|
foreach my $hole ($last_offsets[0]->holes) {
|
||||||
my $circumference = abs($hole->length);
|
my $circumference = abs($hole->length);
|
||||||
next unless $circumference <= $Slic3r::small_perimeter_length;
|
next unless $circumference <= $Slic3r::small_perimeter_length;
|
||||||
|
# this compensation only works for circular holes, while it would
|
||||||
|
# overcompensate for hexagons and other shapes having straight edges.
|
||||||
|
# so we require a minimum number of vertices.
|
||||||
|
next unless $circumference / @$hole >= scale 3 * $Slic3r::flow->width;
|
||||||
|
|
||||||
# revert the compensation done in make_surfaces() and get the actual radius
|
# revert the compensation done in make_surfaces() and get the actual radius
|
||||||
# of the hole
|
# of the hole
|
||||||
my $radius = ($circumference / PI / 2) - scale $self->perimeters_flow->spacing/2;
|
my $radius = ($circumference / PI / 2) - scale $self->perimeters_flow->spacing/2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user