mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-15 08:56:07 +08:00
Merge branch 'master' into cppgui
This commit is contained in:
commit
cc17b2e279
@ -50,7 +50,6 @@ notifications:
|
|||||||
on_success: change
|
on_success: change
|
||||||
on_failure: always
|
on_failure: always
|
||||||
use_notice: true
|
use_notice: true
|
||||||
sudo: required
|
|
||||||
dist: trusty
|
dist: trusty
|
||||||
env:
|
env:
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -153,6 +153,10 @@ sub export {
|
|||||||
foreach my $start_gcode (@{ $self->config->start_filament_gcode }) { # process filament gcode in order
|
foreach my $start_gcode (@{ $self->config->start_filament_gcode }) { # process filament gcode in order
|
||||||
$include_start_extruder_temp = $include_start_extruder_temp && ($start_gcode !~ /M(?:109|104)/i);
|
$include_start_extruder_temp = $include_start_extruder_temp && ($start_gcode !~ /M(?:109|104)/i);
|
||||||
}
|
}
|
||||||
|
my $include_end_extruder_temp = $self->config->end_gcode !~ /M(?:109|104)/i;
|
||||||
|
foreach my $end_gcode (@{ $self->config->end_filament_gcode }) { # process filament gcode in order
|
||||||
|
$include_end_extruder_temp = $include_end_extruder_temp && ($end_gcode !~ /M(?:109|104)/i);
|
||||||
|
}
|
||||||
$self->_print_first_layer_temperature(0)
|
$self->_print_first_layer_temperature(0)
|
||||||
if $include_start_extruder_temp;
|
if $include_start_extruder_temp;
|
||||||
printf $fh "%s\n", Slic3r::ConditionalGCode::apply_math($gcodegen->placeholder_parser->process($self->config->start_gcode));
|
printf $fh "%s\n", Slic3r::ConditionalGCode::apply_math($gcodegen->placeholder_parser->process($self->config->start_gcode));
|
||||||
@ -301,6 +305,14 @@ sub export {
|
|||||||
printf $fh "%s\n", Slic3r::ConditionalGCode::apply_math($gcodegen->placeholder_parser->process($end_gcode));
|
printf $fh "%s\n", Slic3r::ConditionalGCode::apply_math($gcodegen->placeholder_parser->process($end_gcode));
|
||||||
}
|
}
|
||||||
printf $fh "%s\n", Slic3r::ConditionalGCode::apply_math($gcodegen->placeholder_parser->process($self->config->end_gcode));
|
printf $fh "%s\n", Slic3r::ConditionalGCode::apply_math($gcodegen->placeholder_parser->process($self->config->end_gcode));
|
||||||
|
|
||||||
|
$self->_print_off_temperature(0)
|
||||||
|
if $include_end_extruder_temp;
|
||||||
|
# set bed temperature
|
||||||
|
if (($self->config->has_heatbed) && $self->config->end_gcode !~ /M(?:190|140)/i) {
|
||||||
|
printf $fh $gcodegen->writer->set_bed_temperature(0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
print $fh $gcodegen->writer->update_progress($gcodegen->layer_count, $gcodegen->layer_count, 1); # 100%
|
print $fh $gcodegen->writer->update_progress($gcodegen->layer_count, $gcodegen->layer_count, 1); # 100%
|
||||||
print $fh $gcodegen->writer->postamble;
|
print $fh $gcodegen->writer->postamble;
|
||||||
|
|
||||||
@ -356,6 +368,16 @@ sub _print_first_layer_temperature {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub _print_off_temperature {
|
||||||
|
my ($self, $wait) = @_;
|
||||||
|
|
||||||
|
for my $t (@{$self->print->extruders}) {
|
||||||
|
printf {$self->fh} $self->_gcodegen->writer->set_temperature(0, $wait, $t)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Called per object's layer.
|
# Called per object's layer.
|
||||||
# First a $gcode string is collected,
|
# First a $gcode string is collected,
|
||||||
# then filtered and finally written to a file $fh.
|
# then filtered and finally written to a file $fh.
|
||||||
|
@ -221,7 +221,7 @@ PrintConfigDef::PrintConfigDef()
|
|||||||
|
|
||||||
def = this->add("end_gcode", coString);
|
def = this->add("end_gcode", coString);
|
||||||
def->label = "End G-code";
|
def->label = "End G-code";
|
||||||
def->tooltip = "This end procedure is inserted at the end of the output file. Note that you can use placeholder variables for all Slic3r settings.";
|
def->tooltip = "This end procedure is inserted at the end of the output file. Note that you can use placeholder variables for all Slic3r settings. If Slic3r detects M104, M109, M140 or M190 in your custom codes, such commands will not be prepended automatically so you're free to customize the order of heating commands and other custom actions.";
|
||||||
def->cli = "end-gcode=s";
|
def->cli = "end-gcode=s";
|
||||||
def->multiline = true;
|
def->multiline = true;
|
||||||
def->full_width = true;
|
def->full_width = true;
|
||||||
@ -230,7 +230,7 @@ PrintConfigDef::PrintConfigDef()
|
|||||||
|
|
||||||
def = this->add("end_filament_gcode", coStrings);
|
def = this->add("end_filament_gcode", coStrings);
|
||||||
def->label = "End G-code";
|
def->label = "End G-code";
|
||||||
def->tooltip = "This end procedure is inserted at the end of the output file, before the printer end gcode. Note that you can use placeholder variables for all Slic3r settings. If you have multiple extruders, the gcode is processed in extruder order.";
|
def->tooltip = "This end procedure is inserted at the end of the output file, before the printer end gcode. Note that you can use placeholder variables for all Slic3r settings. If you have multiple extruders, the gcode is processed in extruder order. If Slic3r detects M104, M109, M140 or M190 in your custom codes, such commands will not be prepended automatically so you're free to customize the order of heating commands and other custom actions.";
|
||||||
def->cli = "end-filament-gcode=s@";
|
def->cli = "end-filament-gcode=s@";
|
||||||
def->multiline = true;
|
def->multiline = true;
|
||||||
def->full_width = true;
|
def->full_width = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user