Make sure all extruders are outside skirt at toolchange when standby_temperature is enabled

This commit is contained in:
Alessandro Ranellucci 2013-11-15 15:52:11 +01:00
parent f733ef5f6b
commit 5e78f8a0b0
2 changed files with 16 additions and 6 deletions

View file

@ -803,7 +803,13 @@ 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 @$_, map $_->subdivide(scale 10), @{offset([$outer_skirt], scale 3)} ]);
my @skirts = ();
foreach my $extruder (@{$self->extruders}) {
push @skirts, my $s = $outer_skirt->clone;
$s->translate(map scale($_), @{$extruder->extruder_offset});
}
my $convex_hull = Slic3r::Polygon->new(@{convex_hull([ map @$_, map $_->pp, @skirts ])});
$gcodegen->standby_points([ map $_->clone, map @$_, map $_->subdivide(scale 10), @{offset([$convex_hull], scale 3)} ]);
}
# prepare the layer processor