From 86e1f2fb1173ed3071e41bf80bfaf3ae00cc4bd5 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Sun, 12 Apr 2015 15:51:16 -0500 Subject: [PATCH 1/3] Small change to actually infill every layer. Should fix #1783, but there's side effects in that there's no check against the nozzle size. Proper check would be to reduce infill_every_layers to the closest integer multiple below the nozzle size. I can't find the tooltip text either to note the possible overextrusion problem. --- lib/Slic3r/Fill.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Slic3r/Fill.pm b/lib/Slic3r/Fill.pm index 8c63fde59..960bae89c 100644 --- a/lib/Slic3r/Fill.pm +++ b/lib/Slic3r/Fill.pm @@ -221,7 +221,7 @@ sub make_fill { # layer height my $internal_flow = $layerm->region->flow( FLOW_ROLE_INFILL, - $layerm->layer->object->config->layer_height, # TODO: handle infill_every_layers? + $layerm->object->config->layer_height*$layerm->config->infill_every_layers, # TODO: handle infill_every_layers? 0, # no bridge 0, # no first layer -1, # auto width From d1f6cdf55f87c2ecac52359d401c6103d2235c46 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Wed, 29 Jun 2016 22:35:02 -0500 Subject: [PATCH 2/3] found the right spot for infill_every_layers. --- lib/Slic3r/Fill.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/Fill.pm b/lib/Slic3r/Fill.pm index 960bae89c..9cb831928 100644 --- a/lib/Slic3r/Fill.pm +++ b/lib/Slic3r/Fill.pm @@ -214,6 +214,14 @@ sub make_fill { # calculate flow spacing for infill pattern generation my $using_internal_flow = 0; + my $infill_combined_flow = 0; # multiply the required layer height by infill_every_layers + if ($layerm->region->config->infill_every_layers > 1) { + $infill_combined_flow = + $layerm->layer->object->config->layer_height*$layerm->region->config->infill_every_layers; + } else { + $infill_combined_flow = + $layerm->layer->object->config->layer_height; + } if (!$is_solid && !$is_bridge) { # it's internal infill, so we can calculate a generic flow spacing # for all layers, for avoiding the ugly effect of @@ -221,7 +229,8 @@ sub make_fill { # layer height my $internal_flow = $layerm->region->flow( FLOW_ROLE_INFILL, - $layerm->object->config->layer_height*$layerm->config->infill_every_layers, # TODO: handle infill_every_layers? + $infill_combined_flow, + 0, # no bridge 0, # no first layer -1, # auto width From 2ff9532f43b9375551035749d56382ed2cd86a7f Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Wed, 29 Jun 2016 23:02:30 -0500 Subject: [PATCH 3/3] Don't combine more layers than you have nozzle. --- lib/Slic3r/Fill.pm | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/Slic3r/Fill.pm b/lib/Slic3r/Fill.pm index 9cb831928..3bbe68ee9 100644 --- a/lib/Slic3r/Fill.pm +++ b/lib/Slic3r/Fill.pm @@ -214,14 +214,16 @@ sub make_fill { # calculate flow spacing for infill pattern generation my $using_internal_flow = 0; - my $infill_combined_flow = 0; # multiply the required layer height by infill_every_layers - if ($layerm->region->config->infill_every_layers > 1) { - $infill_combined_flow = - $layerm->layer->object->config->layer_height*$layerm->region->config->infill_every_layers; - } else { - $infill_combined_flow = - $layerm->layer->object->config->layer_height; + my $infill_combined_flow = $layerm->layer->object->config->layer_height * $layerm->region->config->infill_every_layers; # multiply the required layer height by infill_every_layers + if ($infill_combined_flow == 0) { + # just in case something happens we don't want to put in a 0mm layer. + $infill_combined_flow = $layerm->layer->object->config->layer_height; } + if ($infill_combined_flow > $flow->nozzle_diameter) { + # can't put out layers bigger than the nozzle width, go as big as possible + $infill_combined_flow = (($flow->nozzle_diameter / $layerm->layer->object->config->layer_height) % 1) * $layerm->layer->object->config->layer_height + } + if (!$is_solid && !$is_bridge) { # it's internal infill, so we can calculate a generic flow spacing # for all layers, for avoiding the ugly effect of