* K2 Plus: add print area bounding box for adaptive bed mesh
The K2 firmware reads MINX/MINY/MAXX/MAXY gcode comments to
determine the adaptive bed mesh area. Without these, it falls
back to full bed mesh even when calibration is enabled.
K2 Pro also reads these comments (its profiles already had them).
Signed-off-by: Igor Mammedov <niallain@gmail.com>
* K2: add print area bounding box for adaptive bed mesh
Same change as K2 Plus — prepend MINX/MINY/MAXX/MAXY gcode comments
so firmware can determine the adaptive bed mesh area.
K2 Pro already had these.
Signed-off-by: Igor Mammedov <niallain@gmail.com>
* Creality: bump profile version to 02.03.02.72
Signed-off-by: Igor Mammedov <niallain@gmail.com>
---------
Signed-off-by: Igor Mammedov <niallain@gmail.com>
Co-authored-by: SoftFever <softfeverever@gmail.com>
Fix Ender-3 V3 KE nozzle switching by adding printer_variant
The four Creality Ender-3 V3 KE 0.X nozzle profiles were missing the
printer_variant key, so OrcaSlicer could not map a UI nozzle selection
to a specific profile and reverted every choice to 0.2mm. Add the
matching printer_variant to each, following the CR-10 SE / K1C pattern.
Reduce the size of current and new JSONs by standardising them with 1 tab indentation instead of 4 spaces.
This effectively reduces the size by almost 20 MB.
| Current | New |
|---|---|
| 85.2 Mib | 67 Mib |
Used [JQ](https://jqlang.org/) `--tab` to automatically format every current JSON.
> [!NOTE]
> Some profiles had the arrays on the same line, but those created by Orca were in the standard format (each object below the previous one). In some cases, this increases the number of tabs due to the new lines, but the increase is negligible, and this way both the base profiles and those created by Orca maintain the same style.
## 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) |
|---|---|
|  |  |
## 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)
* Profiles for Creality K2 Pro printer
Added printer profiles for Creality K2 Pro based on existing K2 Plus profile and Creality Print modifications.
* Fixed filament start g-code for K2 series
K2 Plus filament profiles have additional move for filament start g-code on some filaments. This causes unnecessary moves and make filament profiles non-working on K2 series printers.
As these moves are already mirrored on printer profile and not used in rest of the K2 series they should be removed.
* Update Creality K2 Pro profiles for improved print quality
Added adaptive probing comments to machine start gcode for all nozzle sizes. Adjusted process profiles for various layer heights and nozzle sizes, including changes to bridge speeds, acceleration, wall generator and support line widths according to Creality profiles s to optimize print quality and reliability.
* Revert "Update Creality K2 Pro profiles for improved print quality"
This reverts commit ac84058c33.
* Update Creality K2 Pro profiles for improved slicing
Adjusted speeds, accelerations, line widths, and other slicing parameters for better print quality and compatibility. Updated machine start g-code to include print area comments for adaptive probing (Creality K2 Pro uses these comments to define adaptive probing area)
* feat: expand Creality Ender-3 V3 KE profile with multiple nozzle diameters and new machine configurations
* Merge branch 'main' into main
* Merge branch 'main' into main
* Update Creality K2 Plus 0.8 nozzle.json
* Update Creality K2 Plus 0.6 nozzle.json
* Update Creality K2 Plus 0.4 nozzle.json
* Update Creality K2 Plus 0.2 nozzle.json
* Increase PEI bed temp to 100C from 60C for ASA
* Merge branch 'main' into creality-patch
* add creality ender-5 max
* add filament profiles for ender-5 max
* update creality manifest
* fix references
* put creality.json at 4 space indent
* remove invalid parameters
* fix thumb format
* Merge branch 'main' into feature/ender-5-max
* added change g-code
* adjusted change_filament_gcode for all k2 profiles
* Merge branch 'main' into 7607-k2plus-filament-change-gcode
* Merge branch 'main' into 7607-k2plus-filament-change-gcode
* Merge branch 'main' into 7607-k2plus-filament-change-gcode
* Merge branch 'main' into 7607-k2plus-filament-change-gcode
* Merge branch 'main' into 7607-k2plus-filament-change-gcode
* Merge branch 'main' into 7607-k2plus-filament-change-gcode
* Merge branch 'main' into 7607-k2plus-filament-change-gcode
* removed extra space on new line characters. to exeactly match creality print
* Merge branch 'main' into 7607-k2plus-filament-change-gcode
* Merge branch 'main' into 7607-k2plus-filament-change-gcode
* disabled filamanet ramming and cleared Single Extruder Paramaters
* Merge branch '7607-k2plus-filament-change-gcode' of https://github.com/brandonfhall/OrcaSlicer into 7607-k2plus-filament-change-gcode
* Merge branch 'main' into 7607-k2plus-filament-change-gcode
* Merge branch 'main' into 7607-k2plus-filament-change-gcode
Using my Ender 3 V3 SE I noticed weird printing behaviour. Searching for
the cause, I found that the default layer height for a 0.2mm nozzle for
the printer was set to 0.08mm min and 0.32mm max, which are the default
20%/80% values for a 0.4mm nozzle. This commit changes the values for
all Creality printer which had not a reasonable default value for 0.2mm,
0.6mm and 0.8mm nozzles to 20% min and 80% max.
Co-authored-by: SoftFever <softfeverever@gmail.com>
* Fix crossing max x axis & rise max print height of Ender-3 V3 KE
* Merge branch 'main' into ender-3-V3-KE-4
* Merge branch 'main' into ender-3-V3-KE-4
* Update printer profiles
* Fix accelerations
* Fix z hop
* Small fixes
* Update layer height according to printer data sheet
---------
Co-authored-by: SoftFever <softfeverever@gmail.com>
* Replace M109 S[material_print_temperature_layer_0] with M109 S[first_layer_temperature]
* Change line width to match nozzle
* Change line_width for Ender-3 S1 Plus
* Update creality_cr10se_buildplate_model.stl
* Change line width to match nozzle size (Ender3v3SE)
* Fix Ender-3 S1 Plus 0.8 bed size
* Enable Z-hop for Ender-3 S1 Plus
* Trying something
* Update creality_ender3s1plus_buildplate_model.stl
* Fix CR-10 SE print size
* Various Flying Bear fixes
* Try fixing error
* Revert "Try fixing error"
This reverts commit e42e016e4a.
* Add minor Ender-3 V3 KE improvements
* Maybe this will fix the error?
* Revert "Maybe this will fix the error?"
This reverts commit 5e7873251b.
* Revert "Various Flying Bear fixes"
This reverts commit babca572dc.
* Fix CR-10 SE G-Code
Recommended by @bkonosky
* Minor changes to Ender-3 V3 KE
* Probe when bed is heated (Ender-3 V3 KE)
* Minor changes to Ender-3 V3 KE
* Fix oozing (Ende-3 V3 KE)
* Change retraction settings
* Use different retraction settings
* Revert "Use different retraction settings"
This reverts commit 854decf848.
* try this
* Remove "role_based_wipe_speed": "0",
* Add changes from CR-10 SE Config #4966
* Add "role_based_wipe_speed" : "0",
* Up retraction speed
* Missed this
* Resolve merge conflicts
* Resolve merge conflicts
* Change retraction & wipe speed
* Revert line removal
* Change wipe_speed to 200mm/s
* Forgot the 0.16mm
* Add BED_MESH_CALIBRATE PROBE_COUNT=6,6
* Improve for Matte PLA
* Compensate for fan speed
* Fix CANCEL_PRINT bug
* Move SET_VELOCITY_LIMIT ACCEL_TO_DECEL=2500 to start g-code
* Disable infill combination for 0.2 & 0.24
* Fix end G-Code
* Disable arc fitting
This fixes the merge conflict
* temp
* Revert "temp"
This reverts commit 4bbc028ade.
* e3v3se: remove jerk settings from processes
Remove jerk settings from Ender3 V3 SE processes to prevent emission of M205 into gcode.
This is due to E3 V3 SE does not use jerk, but has junction deviation
enabled instead. Those two modes are mutually exclusive according to
marlin configuration page:
https://marlinfw.org/docs/configuration/configuration.html#default-acceleration-https://marlinfw.org/docs/configuration/configuration.html#junction-deviation-
Based on M503 output, E3V3SE hase junction deviation enabled:
echo:; Advanced: B<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate> J<junc_dev>
echo: M205 B20000.00 S0.00 T0.00 J0.10
"M205" emitted into gcode is useless since setting jerk settings via
"M205 Xn Yn Zn" does not have any effect on the stock V3 SE firmware.
* e3v3se: update machine retraction settings
Set retraction speed to 40 mm/s as recommended by Creality
Source: https://wiki.creality.com/en/ender-series/ender-3-v3-se/quick-start-guide/user-manual
Set retraction acceleration to 500 mm/s2 to prevent extruder clicking on retraction.
* e3v3se: update start gcode
* Set and wait for bed temperature to stabilize prior to homing.
Bed mesh calibration is done with the bed temp set to 60C.
Performing G28 with bed at room temperature will not compensate
for thermal deformation introduced by heated bed if there are any.
* Remove explicit mesh levelling enable (M420).
Creality FW auto enables M420 once homing (G28) is complete:
"M420 S1 Z10.00"