Bugfix: previous brim and skirt were not cleared when disabled after first G-code export. #2024

issue2028-clipperbug
Alessandro Ranellucci 2014-05-10 20:54:12 +02:00
parent a02a7f1a0f
commit 47940a712d
2 changed files with 13 additions and 4 deletions

View File

@ -625,11 +625,14 @@ EOF
sub make_skirt {
my $self = shift;
# since this method must be idempotent, we clear skirt paths *before*
# checking whether we need to generate them
$self->skirt->clear;
return unless $self->config->skirts > 0
|| ($self->config->ooze_prevention && @{$self->extruders} > 1);
$self->skirt->clear; # method must be idempotent
# First off we need to decide how tall the skirt must be.
# The skirt_height option from config is expressed in layers, but our
# object might have different layer heights, so we need to find the print_z
@ -737,9 +740,12 @@ sub make_skirt {
sub make_brim {
my $self = shift;
return unless $self->config->brim_width > 0;
$self->brim->clear; # method must be idempotent
# since this method must be idempotent, we clear brim paths *before*
# checking whether we need to generate them
$self->brim->clear;
return unless $self->config->brim_width > 0;
# brim is only printed on first layer and uses support material extruder
my $first_layer_height = $self->objects->[0]->config->get_abs_value('first_layer_height');

View File

@ -965,6 +965,9 @@ sub combine_infill {
sub generate_support_material {
my $self = shift;
# TODO: make this method idempotent by removing all support layers
# before checking whether we need to generate support or not
return unless ($self->config->support_material || $self->config->raft_layers > 0)
&& scalar(@{$self->layers}) >= 2;