From fe9ed84f645f82ad927ad08091ae9c173ad0841b Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sun, 13 Nov 2011 19:25:15 +0100 Subject: [PATCH] Infill is now overlapped with perimeters by 15%. #19 --- lib/Slic3r.pm | 1 + lib/Slic3r/Perimeter.pm | 1 + lib/Slic3r/STL.pm | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r.pm b/lib/Slic3r.pm index da48c2ecd..527e3eb2e 100644 --- a/lib/Slic3r.pm +++ b/lib/Slic3r.pm @@ -62,6 +62,7 @@ our $flow_width; our $perimeter_offsets = 3; our $solid_layers = 3; our $bridge_overlap = 3; # mm +our $perimeter_infill_overlap_ratio = 0.15; # factor for flow width our $fill_pattern = 'rectilinear'; our $solid_fill_pattern = 'rectilinear'; our $fill_density = 0.4; # 1 = 100% diff --git a/lib/Slic3r/Perimeter.pm b/lib/Slic3r/Perimeter.pm index 2ffa44640..bf93315cb 100644 --- a/lib/Slic3r/Perimeter.pm +++ b/lib/Slic3r/Perimeter.pm @@ -51,6 +51,7 @@ sub make_perimeter { # create one more offset to be used as boundary for fill { + $distance -= $Slic3r::flow_width * $Slic3r::perimeter_infill_overlap_ratio / $Slic3r::resolution; my @fill_surfaces = map Slic3r::Surface->cast_from_expolygon ($_, surface_type => $surface->surface_type), map $_->offset(-$distance), @last_offsets; diff --git a/lib/Slic3r/STL.pm b/lib/Slic3r/STL.pm index 6fc7ff80c..872957b0b 100644 --- a/lib/Slic3r/STL.pm +++ b/lib/Slic3r/STL.pm @@ -138,7 +138,7 @@ sub _facet { sub intersect_facet { my $self = shift; my ($vertices, $z) = @_; - printf "Slicing at $z\n"; + # build the three segments of the triangle facet my @edges = ( [ $vertices->[0], $vertices->[1] ],