From 12c6e39837223cab689979f7bcfff825e6afc5b2 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sat, 19 May 2012 23:12:21 +0200 Subject: [PATCH] Bugfix: hole compensation was making holes too large. #348 --- lib/Slic3r/Layer.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/Layer.pm b/lib/Slic3r/Layer.pm index e915f8296..a37d22483 100644 --- a/lib/Slic3r/Layer.pm +++ b/lib/Slic3r/Layer.pm @@ -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;