Add prepare time override setting for printer profiles #670

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

Originally created by @AndyHazz on 2/21/2026

Description

Adds a Prepare time override setting to printer profiles (Printer > Basic information > Advanced) that allows users to specify a custom prepare time in seconds.

This addresses the issue where printers using start G-code macros (e.g. Klipper's PRINT_START) that perform bed leveling, heating, nozzle cleaning, etc., result in the slicer estimating only ~1 second of prepare time since it cannot parse the macro contents. In practice, these routines can take 5+ minutes.

When set to a value > 0, the override replaces the auto-estimated prepare time from the start G-code and adjusts the total print time accordingly. When set to 0 (default), the existing automatic estimate is used — no change in behavior.

Changes:

  • PrintConfig.hpp/cpp: New machine_prepare_time config option (float, seconds, default 0)
  • GCodeProcessor.hpp/cpp: Load config value, apply override in G-code export and time statistics
  • Preset.cpp: Register option in s_Preset_printer_options
  • Tab.cpp: Add GUI control in Printer > Basic information > Advanced section

Closes #5796

Screenshots

Setting location (Printer > Basic information > Advanced)

Screenshot_20260221_100235

Time estimation with 300s (5 min) override applied

Screenshot_20260221_100143

Tests

  • Setting appears in Printer > Basic information > Advanced section
  • Default value (0) preserves existing auto-estimate behavior
  • Setting value to 300s correctly shows "Prepare time: 5m0s" in time estimation
  • Total time correctly reflects override (Prepare + Model printing = Total)
  • Setting persists across profile save/load
  • Built and tested natively on Arch Linux (Wayland/KDE)
*Originally created by @AndyHazz on 2/21/2026* ## Description Adds a **Prepare time override** setting to printer profiles (Printer > Basic information > Advanced) that allows users to specify a custom prepare time in seconds. This addresses the issue where printers using start G-code macros (e.g. Klipper's `PRINT_START`) that perform bed leveling, heating, nozzle cleaning, etc., result in the slicer estimating only ~1 second of prepare time since it cannot parse the macro contents. In practice, these routines can take 5+ minutes. When set to a value > 0, the override replaces the auto-estimated prepare time from the start G-code and adjusts the total print time accordingly. When set to 0 (default), the existing automatic estimate is used — no change in behavior. **Changes:** - `PrintConfig.hpp/cpp`: New `machine_prepare_time` config option (float, seconds, default 0) - `GCodeProcessor.hpp/cpp`: Load config value, apply override in G-code export and time statistics - `Preset.cpp`: Register option in `s_Preset_printer_options` - `Tab.cpp`: Add GUI control in Printer > Basic information > Advanced section Closes #5796 ## Screenshots ### Setting location (Printer > Basic information > Advanced) <img width="520" height="418" alt="Screenshot_20260221_100235" src="https://github.com/user-attachments/assets/009dde2e-a1ef-4f11-bf01-a929948ccccc" /> ### Time estimation with 300s (5 min) override applied <img width="393" height="539" alt="Screenshot_20260221_100143" src="https://github.com/user-attachments/assets/b090aec9-a77b-48d9-a0e9-2828d9ff82ce" /> ## Tests - [x] Setting appears in Printer > Basic information > Advanced section - [x] Default value (0) preserves existing auto-estimate behavior - [x] Setting value to 300s correctly shows "Prepare time: 5m0s" in time estimation - [x] Total time correctly reflects override (Prepare + Model printing = Total) - [x] Setting persists across profile save/load - [x] Built and tested natively on Arch Linux (Wayland/KDE)
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/OrcaSlicer#670