Skip to content

Commit

Permalink
Only apply arc compensation to circular holes. slic3r#418
Browse files Browse the repository at this point in the history
  • Loading branch information
alranel committed Jun 14, 2012
1 parent b00d960 commit ca8a91b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Slic3r/Layer.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ca8a91b

Please sign in to comment.