Increase small holes threshold to holes having a 6.5mm radius

This commit is contained in:
Alessandro Ranellucci 2012-02-25 16:14:28 +01:00
parent eba7c10018
commit 2d130061ed
2 changed files with 2 additions and 6 deletions

View file

@ -78,7 +78,7 @@ our $infill_acceleration = 50; # mm/s^2
# accuracy options
our $resolution = 0.00000001;
our $small_perimeter_area = (5 / $resolution) ** 2;
our $small_perimeter_area = ((6.5 / $resolution)**2)*PI;
our $layer_height = 0.4;
our $first_layer_height_ratio = 1;
our $infill_every_layers = 1;

View file

@ -6,8 +6,6 @@ use Slic3r::Geometry qw(X Y PI shortest_path scale unscale);
use Slic3r::Geometry::Clipper qw(diff_ex);
use XXX;
my $HOLE_COMPENSATION_THRESHOLD;
sub make_perimeter {
my $self = shift;
my ($layer) = @_;
@ -36,8 +34,6 @@ sub make_perimeter {
map [ $_->contour->[0], $_ ], @{$layer->slices},
])};
$HOLE_COMPENSATION_THRESHOLD ||= ((scale 6.5)**2)*PI;
# for each island:
foreach my $surface (@surfaces) {
my @last_offsets = ($surface->expolygon);
@ -46,7 +42,7 @@ sub make_perimeter {
# experimental hole compensation (see ArcCompensation in the RepRap wiki)
foreach my $hole ($last_offsets[0]->holes) {
my $area = abs($hole->area);last;
next unless $area <= $HOLE_COMPENSATION_THRESHOLD;
next unless $area <= $Slic3r::small_perimeter_area;
my $radius = sqrt($area / PI);
my $new_radius = (scale($Slic3r::flow_width) + sqrt((scale($Slic3r::flow_width)**2) + (4*($radius**2)))) / 2;
@$hole = map Slic3r::Point->new($_), @{ +($hole->offset(+ ($new_radius - $radius)))[0] };