# Issue #15201 — SparkX i7 start gcode `G1 X-1 Z-0.3` scratches the bed Status: **reproduced** on current main (OrcaSlicer 2.6.0-dev, Release binary at $ORCA_BIN). ## What the bug is All four shipped SparkX i7 machine profiles end their `machine_start_gcode` with the purge line drawn at Z0.2, then: ``` G1 Z0.2 F600 ; absolute — nozzle at Z=0.2, purge line drawn here (X150 -> X95) ... G91 ; switch to RELATIVE moves G1 X-1 Z-0.3 ; relative: Z 0.2 - 0.3 = Z-0.1 -> nozzle 0.1 mm BELOW the bed G1 X-4 ; drags nozzle 5 mm across the plate at Z-0.1 G92 E0 ``` So right after the purge line the nozzle plunges ~0.1 mm into the build plate and is dragged 5 mm along X. Matches the issue report exactly. ## Faulty files (all 4, identical block, line 62 `machine_start_gcode`) - `resources/profiles/Creality/machine/Creality SPARKX i7 0.2 nozzle.json` - `resources/profiles/Creality/machine/Creality SPARKX i7 0.4 nozzle.json` - `resources/profiles/Creality/machine/Creality SPARKX i7 0.6 nozzle.json` - `resources/profiles/Creality/machine/Creality SPARKX i7 0.8 nozzle.json` Note: the same gcode family on Ender-3 V4 uses `G1 X1 Z-0.300` and is also suspect, but it starts that block after `G1 Z0.3` — out of scope for this issue; check when fixing. ## Reproduction steps (GUI via MCP harness, as a user would) 1. `orca-mcp launch --bin $ORCA_BIN --xvfb --vendor Creality --printer "Creality SPARKX i7@0.4" --filament "CR-PLA"` 2. `object_add_primitive {"shape":"cube"}` (answered the size dialog OK, 26 mm cube) 3. `plate_slice {"plate":"all"}` — sliced fine (130 layers) 4. `project_export {"format":"gcode","path":"repro/out/sparkx_cube.gcode"}` 5. Grep the exported G-code around line 123: after the purge line (`G1 X95 E.3742`), the file contains literally: ``` G91 G1 X-1 Z-0.3 G1 X-4 G92 E0 ``` (see `repro/gcode_purge_excerpt.txt`; full export in `repro/out/sparkx_cube.gcode`, `machine_start_gcode` also echoed in the config header at line 14064). ## Side observation (separate bug, blocks CLI-only workflows) The pure CLI path (`--load-settings --slice 0`) aborts with: ``` Param values in 3mf/config error: retraction_distances_when_cut: 28 not in range [10, 18] ``` The SPARKX i7 machine profiles ship `retraction_distances_when_cut: 28`, but the option def in `src/libslic3r/PrintConfig.cpp:6408-6413` has `min = 10; max = 18`. The GUI tolerates it (slice+export worked), but CLI slicing dies. Worth its own issue. ## Suggested fix (as proposed in the issue) Replace `G1 X-1 Z-0.3` in all four profiles with a safe move, e.g. `G1 X-1 Z0.1` (positive Z lift while still relative), or drop the Z part. Nothing in the gcode relies on the nozzle going down; the following `G1 X-4` is a wipe move. ## Artifacts - `repro/cube.stl` — 10 mm test cube (script-generated) - `repro/out/sparkx_cube.gcode` — full slice+export with the SparkX i7 0.4 profile - `repro/gcode_purge_excerpt.txt` — the offending lines from the export - `repro/screenshot_preview.png` — app screenshot after slicing - `repro/repro_cli.sh` — CLI attempt showing the profile validation failure