Retract at end of print
This commit is contained in:
parent
ce4aca0b29
commit
92cdaf2f2d
@ -483,17 +483,17 @@ sub export_gcode {
|
|||||||
# write gcode commands layer by layer
|
# write gcode commands layer by layer
|
||||||
foreach my $layer (@{ $self->layers }) {
|
foreach my $layer (@{ $self->layers }) {
|
||||||
# go to layer
|
# go to layer
|
||||||
printf $fh $extruder->change_layer($layer);
|
print $fh $extruder->change_layer($layer);
|
||||||
|
|
||||||
# extrude skirts
|
# extrude skirts
|
||||||
printf $fh $extruder->extrude_loop($_, 'skirt') for @{ $layer->skirts };
|
print $fh $extruder->extrude_loop($_, 'skirt') for @{ $layer->skirts };
|
||||||
|
|
||||||
# extrude perimeters
|
# extrude perimeters
|
||||||
printf $fh $extruder->extrude($_, 'perimeter') for @{ $layer->perimeters };
|
print $fh $extruder->extrude($_, 'perimeter') for @{ $layer->perimeters };
|
||||||
|
|
||||||
# extrude fills
|
# extrude fills
|
||||||
for my $fill (@{ $layer->fills }) {
|
for my $fill (@{ $layer->fills }) {
|
||||||
printf $fh $extruder->extrude_path($_, 'fill')
|
print $fh $extruder->extrude_path($_, 'fill')
|
||||||
for $fill->shortest_path($extruder->last_pos);
|
for $fill->shortest_path($extruder->last_pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -502,6 +502,7 @@ sub export_gcode {
|
|||||||
$self->total_extrusion_length($extruder->total_extrusion_length);
|
$self->total_extrusion_length($extruder->total_extrusion_length);
|
||||||
|
|
||||||
# write end commands to file
|
# write end commands to file
|
||||||
|
print $fh $extruder->retract;
|
||||||
print $fh "$Slic3r::end_gcode\n";
|
print $fh "$Slic3r::end_gcode\n";
|
||||||
|
|
||||||
printf $fh "; filament used = %.1fmm (%.1fcm3)\n",
|
printf $fh "; filament used = %.1fmm (%.1fcm3)\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user