feature: Add granular print time placeholders for days, hours, minutes, and seconds #49

Open
opened 2026-04-05 16:18:16 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @matiasyocca on 4/1/2026

Description

This PR extends the work from https://github.com/OrcaSlicer/OrcaSlicer/pull/12186 by adding and updating the following placeholders:

  • Updated print_time_sec to print_time_total_sec to reflect that it represents the total time in seconds for the print.
  • Added print_time_day, print_time_hour, print_time_min, print_time_sec as the integer components for days, hours, minutes and seconds respectively.

This is motivated by using the expected format by Flashforge AD5M/AD5MP/AD5X printers that expect the file header to contain the following line for estimated time:

; estimated printing time (normal mode) = 11d 22h 25m 19s

The only difference between the implementation for this in the official Orca-Flashforge and this PR is that Orca-Flashforge will trim the leading units when they're zero but this implementation keeps those, as referenced in the "Tests" section.

Tests

Generated G-code in both Orca-Flashforge and OrcaSlicer with the current changes to compare the outputs. I had no issues having the leading zero units with the latest firmware, and the printer started showing the remaining time just fine.

Line generated by Orca-Flashforge:

; estimated printing time (normal mode) = 8m 13s

Line generated by current implementation:

; estimated printing time (normal mode) = 0d 0h 8m 13s
*Originally created by @matiasyocca on 4/1/2026* # Description <!-- > Please provide a summary of the changes made in this PR. Include details such as: > * What issue does this PR address or fix? > * What new features or enhancements does this PR introduce? > * Are there any breaking changes or dependencies that need to be considered? --> This PR extends the work from https://github.com/OrcaSlicer/OrcaSlicer/pull/12186 by adding and updating the following placeholders: - Updated `print_time_sec` to `print_time_total_sec` to reflect that it represents the total time in seconds for the print. - Added `print_time_day`, `print_time_hour`, `print_time_min`, `print_time_sec` as the integer components for days, hours, minutes and seconds respectively. This is motivated by using the expected format by Flashforge AD5M/AD5MP/AD5X printers that expect the file header to contain the following line for estimated time: ```text ; estimated printing time (normal mode) = 11d 22h 25m 19s ``` The only difference between the implementation for this in the official Orca-Flashforge and this PR is that Orca-Flashforge will trim the leading units when they're zero but this implementation keeps those, as referenced in the "Tests" section. # Tests <!-- > Please describe the tests that you have conducted to verify the changes made in this PR. --> Generated G-code in both Orca-Flashforge and OrcaSlicer with the current changes to compare the outputs. I had no issues having the leading zero units with the latest firmware, and the printer started showing the remaining time just fine. Line generated by Orca-Flashforge: ```text ; estimated printing time (normal mode) = 8m 13s ``` Line generated by current implementation: ```text ; estimated printing time (normal mode) = 0d 0h 8m 13s ```
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/OrcaSlicer#49