Regression test and incomplete fix for bug affecting wrong spiral vase output. #1773

Conflicts:

	lib/Slic3r/GCode/Layer.pm
This commit is contained in:
Alessandro Ranellucci 2014-02-13 01:00:17 +01:00
parent 94cb298eec
commit 0060873f1c
3 changed files with 108 additions and 14 deletions

View file

@ -48,13 +48,16 @@ sub process_layer {
my $object = $layer->object;
# check whether we're going to apply spiralvase logic
my $spiralvase = defined $self->spiralvase
&& ($layer->id > 0 || $self->print->config->brim_width == 0)
&& ($layer->id >= $self->print->config->skirt_height && $self->print->config->skirt_height != -1)
&& !defined(first { $_->config->bottom_solid_layers > $layer->id } @{$layer->regions});
if (defined $self->spiralvase) {
$self->spiralvase->enable(
($layer->id > 0 || $self->print->config->brim_width == 0)
&& ($layer->id >= $self->print->config->skirt_height && $self->print->config->skirt_height != -1)
&& !defined(first { $_->config->bottom_solid_layers > $layer->id } @{$layer->regions})
);
}
# if we're going to apply spiralvase to this layer, disable loop clipping
$self->gcodegen->enable_loop_clipping(!$spiralvase);
$self->gcodegen->enable_loop_clipping(!defined $self->spiralvase && !$self->spiralvase->enable);
if (!$self->second_layer_things_done && $layer->id == 1) {
for my $extruder_id (sort keys %{$self->extruders}) {
@ -186,8 +189,10 @@ sub process_layer {
}
# apply spiral vase post-processing if this layer contains suitable geometry
# (we must feed all the G-code into the post-processor otherwise it will
# mess with positions)
$gcode = $self->spiralvase->process_layer($gcode, $layer)
if $spiralvase;
if defined $self->spiralvase;
# apply vibration limit if enabled
$gcode = $self->vibration_limit->process($gcode)