OrcaSlicer/resources/profiles/Creality
davyd 2f2f0df6af
Some checks are pending
Build all / Build Linux (push) Waiting to run
Build all / Build Non-Linux (push) Waiting to run
Build all / Unit Tests (push) Blocked by required conditions
Build all / Flatpak (push) Waiting to run
feat: Add File header G-code option and print_time_sec/filament_length_m placeholders (#12186)
## Problem

Some Creality printers (e.g. Ender-3 V3 SE) rely on metadata comments in the first lines of G-code files to display print info on the screen (estimated time, filament usage, layer height). This follows a format originally used by Cura/Creality Print:
```
;FLAVOR:Marlin
;TIME:3708.97
;Filament used:6.21m
;Layer height:0.2
```

OrcaSlicer currently has no way to write content before the `HEADER_BLOCK` in the G-code output, and does not expose `print_time_sec` or `filament_length_m` as usable placeholders. As a result, these printers show zeroed-out print info on screen.

## Changes

### 1. New placeholders (post-processing)
Added two new G-code placeholders resolved during post-processing:
- `{print_time_sec}` — total estimated print time in seconds (double)
- `{filament_length_m}` — total filament length in meters (double)

These values are only available after G-code generation, so they use inline marker replacement (`@PRINT_TIME_SEC@`, `@FILAMENT_LENGTH_M@`) that `GCodeProcessor::run_post_process()` substitutes with actual computed values — the same pattern used by existing M73 and layer count placeholders.

### 2. New "File header G-code" option (`machine_top_gcode`)
Added a new G-code field in **Printer Settings > Machine G-code** that writes content at the very top of the output file, before `HEADER_BLOCK_START`. This allows users to add firmware-specific metadata that must appear in the first lines.

### 3. Creality Ender-3 V3 SE profile update
Pre-configured the Ender-3 V3 SE profiles (all 4 nozzle variants) with a default `machine_top_gcode` value matching the Cura-compatible header format, so print info displays correctly out of the box.

# Screenshots

| Before (current OrcaSlicer) | After (this PR) |
|---|---|
| ![IMG_5285](https://github.com/user-attachments/assets/fdd2cc96-6593-4108-83f4-e272d5547467) | ![IMG_5286](https://github.com/user-attachments/assets/6cb4091a-4560-4596-93d9-49f2ff8f0a2b) |

## Tests

- Sliced test model with Ender-3 V3 SE profile
- Verified G-code output contains correct values in first lines:
  - `;TIME:` with actual print time in seconds
  - `;Filament used:` with filament length in meters
  - `;Layer height:` with correct layer height
- Verified `{print_time_sec}` and `{filament_length_m}` work in both Machine Start G-code and File header G-code fields
- Verified empty `machine_top_gcode` produces no extra output
- Built and tested on macOS (arm64)
2026-02-08 23:56:28 +08:00
..
filament Profiles for Creality K2 Pro printer (#11315) 2025-11-21 06:41:48 +00:00
machine feat: Add File header G-code option and print_time_sec/filament_length_m placeholders (#12186) 2026-02-08 23:56:28 +08:00
process Profiles for Creality K2 Pro printer (#11315) 2025-11-21 06:41:48 +00:00
Creality CR-6 Max_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality CR-6 SE_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality CR-10 Max_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality CR-10 SE_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality CR-10 V2_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality CR-10 V3_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality CR-M4_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality Ender-3 Pro_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality Ender-3 S1 Plus_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality Ender-3 S1 Pro_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality Ender-3 S1_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality Ender-3 V2 Neo_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality Ender-3 V2_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality Ender-3 V3 KE_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality Ender-3 V3 Plus_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality Ender-3 V3 SE_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality Ender-3 V3_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality Ender-3_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality Ender-5 Max_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality Ender-5 Plus_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality Ender-5 Pro (2019)_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality Ender-5 S1_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality Ender-5_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality Ender-5S_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality Ender-6_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality Hi_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality K1 Max_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality K1 SE_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality K1_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality K1C_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality K2 Plus_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
Creality K2 Pro_cover.png Profiles for Creality K2 Pro printer (#11315) 2025-11-21 06:41:48 +00:00
Creality Sermoon V1_cover.png Fixes / Improvements for Covers & Printer Selection dialog (#11151) 2025-11-04 10:16:06 +08:00
creality_cr6max_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_cr6se_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_cr6se_buildplate_texture.png Creality textures and covers tweaks (#4274) 2024-03-01 21:40:37 +08:00
creality_cr10max_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_cr10max_buildplate_texture.png Creality textures and covers tweaks (#4274) 2024-03-01 21:40:37 +08:00
creality_cr10se_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_cr10se_buildplate_texture.png Add Creality CR-10 SE (#4757) 2024-03-29 17:57:01 +08:00
creality_cr10v2_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_cr10v2_buildplate_texture.png Optimized PNG files (#4294) 2024-03-04 22:00:47 +08:00
creality_cr10v3_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_cr10v3_buildplate_texture.png Add CR10 V3 (Marlin) Profile to Orcaslicer (#10122) 2025-07-18 07:49:50 +08:00
creality_crm4_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_crm4_buildplate_texture.png Initial add of CR-M4 2024-10-06 15:21:22 -04:00
creality_ender3s1_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_ender3s1_buildplate_texture.png Creality textures and covers tweaks (#4274) 2024-03-01 21:40:37 +08:00
creality_ender3s1plus_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_ender3s1plus_buildplate_texture.png Add Creality Ender-3 S1 Plus (#4674) 2024-03-29 18:14:56 +08:00
creality_ender3s1pro_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_ender3s1pro_buildplate_texture.png Creality textures and covers tweaks (#4274) 2024-03-01 21:40:37 +08:00
creality_ender3v2_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_ender3v2_buildplate_texture.png Creality textures and covers tweaks (#4274) 2024-03-01 21:40:37 +08:00
creality_ender3v2neo_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_ender3v2neo_buildplate_texture.png Creality textures and covers tweaks (#4274) 2024-03-01 21:40:37 +08:00
creality_ender3v3_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_ender3v3_buildplate_texture.png Ender 3 V3 initial commit (#5127) 2024-04-29 23:51:53 +08:00
creality_ender3v3ke_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_ender3v3ke_buildplate_texture.png Optimized PNG files (#4294) 2024-03-04 22:00:47 +08:00
creality_ender3v3plus_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_ender3v3plus_buildplate_texture.png.png Ender 3 V3 Plus profile (#5447) 2024-05-25 08:32:23 +08:00
creality_ender3v3se_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_ender3v3se_buildplate_texture.png Creality textures and covers tweaks (#4274) 2024-03-01 21:40:37 +08:00
creality_ender5_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_ender5_buildplate_texture.png Creality textures and covers tweaks (#4274) 2024-03-01 21:40:37 +08:00
creality_ender5max_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_ender5max_buildplate_texture.png Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_ender5plus_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_ender5plus_buildplate_texture.png Creality textures and covers tweaks (#4274) 2024-03-01 21:40:37 +08:00
creality_ender5pro_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_ender5pro_buildplate_texture.png Creality textures and covers tweaks (#4274) 2024-03-01 21:40:37 +08:00
creality_ender5s1_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_ender5s1_buildplate_texture.png Optimized PNG files (#4294) 2024-03-04 22:00:47 +08:00
creality_ender5s_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_ender5s_buildplate_texture.png Creality textures and covers tweaks (#4274) 2024-03-01 21:40:37 +08:00
creality_ender6_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_ender6_buildplate_texture.png Creality textures and covers tweaks (#4274) 2024-03-01 21:40:37 +08:00
creality_hi_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_hi_buildplate_texture.png Adding Creality Hi printer (#7964) 2025-01-22 14:37:42 +08:00
creality_k1_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_k1_buildplate_texture.png Optimized PNG files (#4294) 2024-03-04 22:00:47 +08:00
creality_k1c_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_k1c_buildplate_texture.png Creality textures and covers tweaks (#4274) 2024-03-01 21:40:37 +08:00
creality_k1max_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_k1max_buildplate_texture.png Optimized PNG files (#4294) 2024-03-04 22:00:47 +08:00
creality_k1se_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_k1se_buildplate_texture.png Initial add of K1 SE 2024-10-02 18:57:45 -04:00
creality_k2plus_buildplate_model.stl Profile folder optimizations (Anycubic, Artillery, Bambu Lab, BIQU, Creality, Flashforge, Prusa, Ratrig, Sovol, Volumic, Voron, VzBot, Z-Bolt, Wanhao and more) (#10806) 2025-10-25 15:41:29 +08:00
creality_k2plus_buildplate_texture.png Initial Add of K2 Plus 2024-10-03 19:51:04 -04:00
creality_k2pro_buildplate_model.stl Profiles for Creality K2 Pro printer (#11315) 2025-11-21 06:41:48 +00:00
creality_k2pro_buildplate_texture.png Profiles for Creality K2 Pro printer (#11315) 2025-11-21 06:41:48 +00:00