Almost finished the implementation of --standby-temperature

This commit is contained in:
Alessandro Ranellucci 2013-09-18 20:03:59 +02:00
parent 9caf536aca
commit 0062c3b7fc
2 changed files with 20 additions and 2 deletions

View file

@ -270,6 +270,13 @@ sub init_extruders {
role => 'support_material',
));
}
# enforce tall skirt if using standby_temperature
# NOTE: this is not idempotent (i.e. switching standby_temperature off will not revert skirt settings)
if ($self->config->standby_temperature) {
$self->config->set('skirt_height', 9999999999);
$self->config->set('skirts', 1) if $self->config->skirts == 0;
}
}
sub layer_count {
@ -562,7 +569,8 @@ EOF
sub make_skirt {
my $self = shift;
return unless $Slic3r::Config->skirts > 0;
return unless $Slic3r::Config->skirts > 0
|| ($Slic3r::Config->standby_temperature && @{$self->extruders} > 1);
# collect points from all layers contained in skirt height
my @points = ();
@ -787,6 +795,12 @@ sub write_gcode {
));
}
# calculate wiping points if needed
if ($self->config->standby_temperature) {
my $outer_skirt = Slic3r::Polygon->new(@{convex_hull([ map $_->pp, map @$_, @{$self->skirt} ])});
$gcodegen->standby_points([ map $_->clone, map @$_, @{offset([$outer_skirt], scale 3)} ]);
}
# prepare the layer processor
my $layer_gcode = Slic3r::GCode::Layer->new(
print => $self,