Add support for notes field in configuration profiles. #130
This commit is contained in:
parent
4dd33c6b05
commit
121895d3fc
5 changed files with 28 additions and 1 deletions
|
@ -38,6 +38,9 @@ use Slic3r::TriangleMesh::IntersectionLine;
|
|||
|
||||
our $threads = 4;
|
||||
|
||||
# miscellaneous options
|
||||
our $notes = '';
|
||||
|
||||
# output options
|
||||
our $output_filename_format = '[input_filename_base].gcode';
|
||||
|
||||
|
|
|
@ -7,6 +7,18 @@ use constant PI => 4 * atan2(1, 1);
|
|||
|
||||
our $Options = {
|
||||
|
||||
# miscellaneous options
|
||||
'notes' => {
|
||||
label => 'Configuraton notes',
|
||||
cli => 'notes=s',
|
||||
type => 's',
|
||||
multiline => 1,
|
||||
width => 350,
|
||||
height => 300,
|
||||
serialize => sub { join '\n', split /\R/, $_[0] },
|
||||
deserialize => sub { join "\n", split /\\n/, $_[0] },
|
||||
},
|
||||
|
||||
# output options
|
||||
'output_filename_format' => {
|
||||
label => 'Output filename format',
|
||||
|
|
|
@ -67,6 +67,10 @@ sub new {
|
|||
title => 'Output',
|
||||
options => [qw(output_filename_format)],
|
||||
},
|
||||
notes => {
|
||||
title => 'Notes',
|
||||
options => [qw(notes)],
|
||||
},
|
||||
);
|
||||
$self->{panels} = \%panels;
|
||||
|
||||
|
@ -99,13 +103,15 @@ sub new {
|
|||
$make_tab->([qw(transform accuracy skirt)], [qw(print retract)]),
|
||||
$make_tab->([qw(printer filament)], [qw(print_speed speed)]),
|
||||
$make_tab->([qw(gcode)]),
|
||||
$make_tab->([qw(notes)]),
|
||||
$make_tab->([qw(extrusion)], [qw(output)]),
|
||||
);
|
||||
|
||||
$tabpanel->AddPage($tabs[0], "Print Settings");
|
||||
$tabpanel->AddPage($tabs[1], "Printer and Filament");
|
||||
$tabpanel->AddPage($tabs[2], "Start/End GCODE");
|
||||
$tabpanel->AddPage($tabs[3], "Advanced");
|
||||
$tabpanel->AddPage($tabs[3], "Notes");
|
||||
$tabpanel->AddPage($tabs[4], "Advanced");
|
||||
|
||||
my $buttons_sizer;
|
||||
{
|
||||
|
|
|
@ -463,6 +463,9 @@ sub export_gcode {
|
|||
my @lt = localtime;
|
||||
printf $fh "; generated by Slic3r $Slic3r::VERSION on %02d-%02d-%02d at %02d:%02d:%02d\n\n",
|
||||
$lt[5] + 1900, $lt[4]+1, $lt[3], $lt[2], $lt[1], $lt[0];
|
||||
|
||||
print $fh "; $_\n" foreach split /\R/, $Slic3r::notes;
|
||||
print $fh "\n" if $Slic3r::notes;
|
||||
|
||||
for (qw(layer_height perimeters solid_layers fill_density nozzle_diameter filament_diameter
|
||||
perimeter_speed infill_speed travel_speed extrusion_width_ratio scale)) {
|
||||
|
|
|
@ -191,6 +191,9 @@ Usage: slic3r.pl [ OPTIONS ] file.stl
|
|||
--duplicate-x Number of items along X axis (1+, default: $Slic3r::duplicate_x)
|
||||
--duplicate-y Number of items along Y axis (1+, default: $Slic3r::duplicate_y)
|
||||
--duplicate-distance Distance in mm between copies (default: $Slic3r::duplicate_distance)
|
||||
|
||||
Miscellaneous options:
|
||||
--notes Notes to be added as comments to the output file
|
||||
|
||||
Flow options (advanced):
|
||||
--extrusion-width-ratio
|
||||
|
|
Loading…
Reference in a new issue