Allow for different speed on bottom layer

This commit is contained in:
Alessandro Ranellucci 2011-09-05 12:22:54 +02:00
parent 9e111d0a6d
commit 778e4f6ffa
2 changed files with 4 additions and 2 deletions

View File

@ -35,6 +35,7 @@ Slic3r is able to:
* generate rectilinear feed (100% solid for external surfaces or with customizable less density for inner surfaces); * generate rectilinear feed (100% solid for external surfaces or with customizable less density for inner surfaces);
* use relative or absolute extrusion commands; * use relative or absolute extrusion commands;
* center print around bed center point; * center print around bed center point;
* use different speed for bottom layer;
* output relevant GCODE. * output relevant GCODE.
Roadmap include the following goals: Roadmap include the following goals:

View File

@ -109,12 +109,13 @@ sub export_gcode {
($point->x * $Slic3r::resolution) + $shift[X], ($point->x * $Slic3r::resolution) + $shift[X],
($point->y * $Slic3r::resolution) + $shift[Y], #** ($point->y * $Slic3r::resolution) + $shift[Y], #**
$z; $z;
my $speed_multiplier = $z == 0 ? $Slic3r::bottom_layer_speed_ratio : 1;
if ($extrusion_distance) { if ($extrusion_distance) {
printf $fh " F%.${dec}f E%.${dec}f", printf $fh " F%.${dec}f E%.${dec}f",
$print_feed_rate, ($print_feed_rate * $speed_multiplier),
($extrusion_distance * $extrusion_speed_ratio * $Slic3r::resolution); ($extrusion_distance * $extrusion_speed_ratio * $Slic3r::resolution);
} else { } else {
printf $fh " F%.${dec}f", $travel_feed_rate; printf $fh " F%.${dec}f", ($travel_feed_rate * $speed_multiplier);
} }
printf $fh " ; %s", $comment if $comment; printf $fh " ; %s", $comment if $comment;
print $fh "\n"; print $fh "\n";