New high_res_perimeters option (like the "Skin" plugin for Skeinforge)

This commit is contained in:
Alessandro Ranellucci 2011-10-06 17:11:59 +02:00
parent 1978a99416
commit 119eb0693f
7 changed files with 28 additions and 4 deletions

View file

@ -211,6 +211,18 @@ sub export_gcode {
# write gcode commands layer by layer
foreach my $layer (@{ $self->layers }) {
# with the --high-res-perimeters options enabled we extrude perimeters for
# each layer twice at half height
if ($Slic3r::high_res_perimeters && $layer->id > 0) {
# go to half-layer
printf $fh $extruder->move_z($Slic3r::z_offset + $layer->z * $Slic3r::resolution - $Slic3r::layer_height/2);
# extrude perimeters
$extruder->flow_ratio(0.5);
printf $fh $extruder->extrude_loop($_, 'perimeter') for @{ $layer->perimeters };
$extruder->flow_ratio(1);
}
# go to layer
printf $fh $extruder->move_z($Slic3r::z_offset + $layer->z * $Slic3r::resolution);