U1: Tool-change return loses Z clearance above 1.9 mm without prime tower (2.4.0 and 2.4.1 alpha)
Is there an existing issue for this problem?
- [x] I have searched the existing issues
Snapmaker_Orca Version
2.4.0, 2.4.1 alpha
Operating System (OS)
Windows
OS Version
Windows 11
Additional system information
No response
Printer
U1
How to reproduce
- Open the attached polar bear project in Snapmaker Orca 2.4.0 or 2.4.1 alpha.
- Select the stock Snapmaker U1 (0.4 nozzle) printer preset and print by layer.
- Disable the prime tower. Use a 0.25 mm first layer, 0.20 mm subsequent layers, and 0.4 mm Z-hop.
- Slice and export the G-code.
- Inspect the return moves following tool changes. Early-layer returns use Z = 1.9 mm, but from layer 10 (Z = 2.05 mm), the nozzle returns at the printing height with no extra clearance.
- For example, at layer 218 in the 2.4.1 file, the T1 return lowers to Z = 43.65 mm before moving XY back over the model:
G1 Z43.65 F30000
G1 X115.53 Y101.044
G1 Z43.65
G1 Z43.65
G1 E5 F1800
During printing, the incoming nozzle brushes the outside of the bear’s leg and deposits small dots of filament.
Actual results
After a tool change, the generated G-code lowers the incoming nozzle to the current printing height before the XY return over the model, removing the clearance provided by the tool-change lift.
Early-layer returns occur at Z = 1.9 mm. Once the printing height exceeds 1.9 mm—layer 10 in this project—the return travel occurs at the printing height with no additional Z clearance.
This behavior appears in exports from both 2.4.0 and 2.4.1 alpha. In the 2.4.1 export, all 1,076 measured tool returns after layer 10 have zero commanded clearance.
On the physical print, the incoming brown nozzle brushes the bear’s left leg and leaves small dots of filament along its outside edge.
Expected results
After a tool change, the incoming nozzle should maintain Z clearance above the printed model throughout its XY return travel, then lower to the printing height at the extrusion start position.
This clearance should remain effective at every layer height, including when the prime tower is disabled.
Project file & Debug log uploads
Checklist of files to include
- [ ] Log file
- [x] Project file
Anything else?
Reproduced in both Snapmaker Orca 2.4.0 and 2.4.1 alpha. The alpha export contains the updated tool-change template dated 20261003, so the behavior persists with the newer template.
Possible cause: the custom G-code position parser appears to read the relative G91 / G1 Z1.5 / G90 lift as an absolute Z position when updating slicer position tracking. Combined with 0.4 mm Z-hop, this would explain the observed return height of max(layer Z, 1.9 mm). This is a suspected cause, not a validated fix.
Related reports: #859, #958, #966, and #1066. Those address other collision or Z-position cases; this report concerns return travel during by-layer printing without a prime tower.
3MF is too large to apply here, but afaik the issue is not within the file's configuration.
I could reproduce this on a small plate with Snapmaker Orca 2.4.1 (command line, macOS), and the cause you suspected holds in an experiment. Since your project was too large to attach, here are files anyone can slice.
Plate: two 20 x 20 x 10 mm boxes, 40 mm apart, one per head, stock U1 0.4 nozzle and 0.20 mm profiles, by layer, prime tower off. 50 tool changes after the first layer.
| Slice | First move after T<n> |
Tool changes that come down to the height already printed before the XY move |
|---|---|---|
| stock tool-change G-code | G1 Z1.9 while the layer is below 1.9 mm, then G1 Z<layer> from layer 10 on |
42 of 50 |
same, move_z = 3.0 in the template |
G1 Z3.4 while the layer is below 3.4 mm, then G1 Z<layer> from layer 17 on |
34 of 50 |
| lift written as an absolute move | G1 Z<layer + 1.9>, XY move, then G1 Z<layer> at the part |
0 of 50 |
| stock, prime tower on | XY move to the tower | 0 of 50 |
So the return height is max(layer Z, lift + 0.4): the slicer takes the Z1.5 of the relative G91 / G1 Z1.5 / G90 lift as an absolute position. Changing the lift to 3.0 moved the layer where the clearance disappears from 10 to 17.
What removed it in the sliced file: printer preset, Machine G-code, Change filament G-code, in the by-layer branch replace
"G91
G1 Z" + move_z + " F600
G90
";
with
"G90
G1 Z" + (layer_z + move_z) + " F600
";
The real lift before the tool change stays 1.5 mm. At layer 26 the stock file has G1 Z5.25 F30000 then G1 X119.398 Y119.398; the changed one has G1 Z7.15 F30000, G1 X119.398 Y119.398, G1 Z5.25.
This looks like a different path from #1168 (prime tower near the bed edge, which a Snapmaker developer said will be fixed in the December version): here there is no tower and no detour, so that fix may not cover it.
Limits: sliced files only, read as text. I did not run them on the firmware or print them, I did not slice 2.4.0, and the changed template was applied to a copy of the stock profile from the command line, not saved from the Orca window. By object uses the other branch of the template and I did not touch it.
Both G-codes, the test and the write-up: https://github.com/DesignMaster-Solutions/u1-dryrun/blob/main/docs/orca-2.4.1-no-tower-return.md . To check your own file: python3 tools/dock_drops.py your.gcode from that repo. If you can try the template change on the bear, I would like to know whether the dots are gone.
Root cause confirmed — your suspicion was right: GCodeProcessor::get_last_z_from_gcode ignores G90/G91 mode. The U1 change-filament template uses a relative lift (G91 / G1 Z1.5 / G90), which the parser reads as absolute Z=1.5, so return travel loses clearance once the layer Z exceeds 1.9 mm.
Fix: get_last_z_from_gcode now takes the starting Z and tracks G90/G91 mode (absolute moves set the running Z, relative moves add to it); all 6 call sites pass the writer's current Z.
PR: https://github.com/Snapmaker/OrcaSlicer/pull/1191
Appreciate you both helping keep this alive and solved.