Merge pull request #2779 from lordofhyphens/infill-combine

Infill combine, fix #1783
This commit is contained in:
Joseph Lenox 2016-06-29 23:08:39 -05:00 committed by GitHub
commit c09da450f6

View File

@ -214,6 +214,16 @@ sub make_fill {
# calculate flow spacing for infill pattern generation
my $using_internal_flow = 0;
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
@ -221,7 +231,8 @@ 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?
$infill_combined_flow,
0, # no bridge
0, # no first layer
-1, # auto width