SoftFever / OrcaSlicer

G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, Creality, etc.)
https://discord.gg/P4VE9UY9gJ
GNU Affero General Public License v3.0
7.07k stars 833 forks source link

If a plate is named, use the plate name as the default filename for Export G-Code and Print #2752

Closed jwyse closed 11 months ago

jwyse commented 11 months ago

Current behavior:

Export G-Code and Print will use the filename of one of the objects (presumably the first object that was added to the plate?) as the basis for the filename to export or send to the printer.

Desired behavior:

If a plate has been named, use the plate name as the basis for the gcode filename to export or send to the printer. If the user has not set the plate name, then either use the plate number (ex: plate_28_ABS_2h51m.gcode) or the first object name (current behavior) as the default gcode filename.

Example:

In the screenshot below, I have arranged several STL objects on a plate, and named the plate Controller mounts. When I clicked Print, the default filename is based off one of the objects on the plate. I would prefer that the default filename be Controller_mounts_ABS_2h51m.gcode instead ({plate_name}_{material}_{time}.gcode). As this plate is part of a much bigger project (printing Voron Trident parts on a small Voron 0.2), it's valuable to be able to (1) combine multiple parts on a plate (2) keep track of what has been printed, by plate rather than by individual part.

image

Of course the default filename can be modified before exporting or sending to the printer, but it would be a smoother workflow if the generated name used the plate name instead of a single part on the plate.

niklasb22 commented 11 months ago

Nice idea. I'll have a look at it

niklasb22 commented 11 months ago

@jwyse I have had a look at it. It is already possible to use the placeholder {plate_name}. If Filename Format is set as shown in the screenshot, the expected name should come out exactly.

image

jwyse commented 11 months ago

This is perfect! I was looking for a way to customize the filename format in Preferences, and somehow completely overlooked that setting in the "Others" area of print settings. Thanks!

jwyse commented 11 months ago

This formatting snippet will name the output with the plate name if it is specified, otherwise the model filename. This is exactly what I was looking for, and I like this as a default setting so that I don't always have to name every plate.

{if plate_name!=""}{plate_name}{else}{input_filename_base}{endif}

for example:

{if plate_name!=""}{plate_name}{else}{input_filename_base}{endif}_{filament_type[initial_tool]}_{print_time}.gcode
dstulken commented 8 months ago

The snippet above works great - is there any reason why something like this isn't the default behavior?