Bugfix: hole compensation was making holes too large. #348

degen-loop-screen
Alessandro Ranellucci 2012-05-19 23:12:21 +02:00
parent 0bb487fe9f
commit 12c6e39837
1 changed files with 3 additions and 1 deletions

View File

@ -198,7 +198,9 @@ sub make_perimeters {
foreach my $hole ($last_offsets[0]->holes) {
my $circumference = abs($hole->length);
next unless $circumference <= $Slic3r::small_perimeter_length;
my $radius = ($circumference / PI / 2);
# revert the compensation done in make_surfaces() and get the actual radius
# of the hole
my $radius = ($circumference / PI / 2) - scale $Slic3r::flow_spacing/2;
my $new_radius = (scale($Slic3r::flow_width) + sqrt((scale($Slic3r::flow_width)**2) + (4*($radius**2)))) / 2;
# holes are always turned to contours, so reverse point order before and after
$hole->reverse;