Bugfix: use proper spacing for first support layer instead of trying to align it to upper layers. #2662

This commit is contained in:
Alessandro Ranellucci 2015-02-27 18:43:15 +01:00
parent 45c91b2ae9
commit 70ace8c76f

View file

@ -723,6 +723,11 @@ sub generate_toolpaths {
if (@$base) {
my $filler = $fillers{support};
$filler->angle($angles[ ($layer_id) % @angles ]);
# We don't use $base_flow->spacing because we need a constant spacing
# value that guarantees that all layers are correctly aligned.
$filler->spacing($flow->spacing);
my $density = $support_density;
my $base_flow = $_flow;
@ -737,6 +742,10 @@ sub generate_toolpaths {
$filler->angle($self->object_config->support_material_angle + 90);
$density = 0.5;
$base_flow = $self->first_layer_flow;
# use the proper spacing for first layer as we don't need to align
# its pattern to the other layers
$filler->spacing($base_flow->spacing);
} else {
# draw a perimeter all around support infill
# TODO: use brim ordering algorithm
@ -753,10 +762,6 @@ sub generate_toolpaths {
$to_infill = offset_ex([ map @$_, @$to_infill ], -$_flow->scaled_spacing);
}
# We don't use $base_flow->spacing because we need a constant spacing
# value that guarantees that all layers are correctly aligned.
$filler->spacing($flow->spacing);
my $mm3_per_mm = $base_flow->mm3_per_mm;
foreach my $expolygon (@$to_infill) {
my @p = $filler->fill_surface(