New --first-layer-acceleration option
This commit is contained in:
parent
cde662cb51
commit
99816e07a6
@ -172,6 +172,9 @@ The author of the Silk icon set is Mark James.
|
||||
--bridge-acceleration
|
||||
Overrides firmware's default acceleration for bridges. (mm/s^2, set zero
|
||||
to disable; default: 0)
|
||||
--first-layer-acceleration
|
||||
Overrides firmware's default acceleration for first layer. (mm/s^2, set zero
|
||||
to disable; default: 0)
|
||||
--default-acceleration
|
||||
Acceleration will be reset to this value after the specific settings above
|
||||
have been applied. (mm/s^2, set zero to disable; default: 130)
|
||||
|
@ -369,6 +369,14 @@ our $Options = {
|
||||
type => 'f',
|
||||
default => 0,
|
||||
},
|
||||
'first_layer_acceleration' => {
|
||||
label => 'First layer',
|
||||
tooltip => 'This is the acceleration your printer will use for first layer. Set zero to disable acceleration control for first layer.',
|
||||
sidetext => 'mm/s²',
|
||||
cli => 'first-layer-acceleration=f',
|
||||
type => 'f',
|
||||
default => 0,
|
||||
},
|
||||
|
||||
# accuracy options
|
||||
'layer_height' => {
|
||||
|
@ -116,6 +116,13 @@ sub change_layer {
|
||||
int(99 * ($layer->id / ($self->layer_count - 1))),
|
||||
($self->config->gcode_comments ? ' ; update progress' : '');
|
||||
}
|
||||
if ($self->config->first_layer_acceleration) {
|
||||
if ($layer->id == 0) {
|
||||
$gcode .= $self->set_acceleration($self->config->first_layer_acceleration);
|
||||
} elsif ($layer->id == 1) {
|
||||
$gcode .= $self->set_acceleration($self->config->default_acceleration);
|
||||
}
|
||||
}
|
||||
return $gcode;
|
||||
}
|
||||
|
||||
@ -289,6 +296,7 @@ sub extrude_path {
|
||||
|
||||
# adjust acceleration
|
||||
my $acceleration;
|
||||
if (!$self->config->first_layer_acceleration || $self->layer->id != 0) {
|
||||
if ($self->config->perimeter_acceleration && $path->is_perimeter) {
|
||||
$acceleration = $self->config->perimeter_acceleration;
|
||||
} elsif ($self->config->infill_acceleration && $path->is_fill) {
|
||||
@ -297,6 +305,7 @@ sub extrude_path {
|
||||
$acceleration = $self->config->bridge_acceleration;
|
||||
}
|
||||
$gcode .= $self->set_acceleration($acceleration) if $acceleration;
|
||||
}
|
||||
|
||||
my $area; # mm^3 of extrudate per mm of tool movement
|
||||
if ($path->is_bridge) {
|
||||
|
@ -461,7 +461,7 @@ sub build {
|
||||
},
|
||||
{
|
||||
title => 'Acceleration control (advanced)',
|
||||
options => [qw(perimeter_acceleration infill_acceleration bridge_acceleration default_acceleration)],
|
||||
options => [qw(perimeter_acceleration infill_acceleration bridge_acceleration first_layer_acceleration default_acceleration)],
|
||||
},
|
||||
]);
|
||||
|
||||
|
@ -255,6 +255,9 @@ $j
|
||||
--bridge-acceleration
|
||||
Overrides firmware's default acceleration for bridges. (mm/s^2, set zero
|
||||
to disable; default: $config->{bridge_acceleration})
|
||||
--first-layer-acceleration
|
||||
Overrides firmware's default acceleration for first layer. (mm/s^2, set zero
|
||||
to disable; default: $config->{first_layer_acceleration})
|
||||
--default-acceleration
|
||||
Acceleration will be reset to this value after the specific settings above
|
||||
have been applied. (mm/s^2, set zero to disable; default: $config->{travel_speed})
|
||||
|
Loading…
Reference in New Issue
Block a user