Only apply arc compensation to circular holes. #418

This commit is contained in:
Alessandro Ranellucci 2012-06-14 15:06:22 +02:00
parent b00d960f4d
commit ca8a91b2b0

View File

@ -225,6 +225,11 @@ sub make_perimeters {
foreach my $hole ($last_offsets[0]->holes) {
my $circumference = abs($hole->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
# of the hole
my $radius = ($circumference / PI / 2) - scale $self->perimeters_flow->spacing/2;