From 1a066caeccc111d3002d6579bdf195c5636ab0dc Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Thu, 17 Nov 2011 10:41:20 +0100 Subject: [PATCH] Compute bridge overlap as twice the total thickness of perimeters --- lib/Slic3r.pm | 1 - lib/Slic3r/Layer.pm | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r.pm b/lib/Slic3r.pm index 39342b10a..e0ca7326a 100644 --- a/lib/Slic3r.pm +++ b/lib/Slic3r.pm @@ -64,7 +64,6 @@ our $flow_width; # print options our $perimeters = 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'; diff --git a/lib/Slic3r/Layer.pm b/lib/Slic3r/Layer.pm index aac37979e..91d279452 100644 --- a/lib/Slic3r/Layer.pm +++ b/lib/Slic3r/Layer.pm @@ -438,7 +438,8 @@ sub process_bridges { # now, extend our bridge by taking a portion of supporting surfaces { # offset the bridge by the specified amount of mm - my $bridge_offset = ${ offset([$contour], $Slic3r::bridge_overlap / $Slic3r::resolution, $Slic3r::resolution * 100, JT_MITER, 2) }[0]; + my $bridge_overlap = 2 * $Slic3r::perimeters * $Slic3r::flow_width / $Slic3r::resolution; + my $bridge_offset = ${ offset([$contour], $bridge_overlap, $Slic3r::resolution * 100, JT_MITER, 2) }[0]; # calculate the new bridge my $intersection = intersection_ex(