Bug: extruder [re]activation applies the incorrect coordinate system

Thanks Sineos. I’m trying to figure out that line too.

It seems erroneous that the extruder base position (its frame of reference) should be overwritten and set to the last position of the same extruder. This makes “absolute” moves relative to the position before the tool-change.

What I just described would happen to T0 after switching to T1 and back, without T1 moving at all.

This behavior is certainly due to a bug, evidenced by this reduced test code:

T0 ; Change to T0, the default (optional).
M82 ; Set absolute coordinates for extrusion moves.
G0 E10 ; Move to E=10.

T1 ; Switch to T1.
T0 ; Switch back to T0.

G0 E10 ; Move to E=10.
M82 ; Set absolute coordinates for extrusion moves (optional).
; T0 should not move because it is already at E=10, but it does!

PS: For anyone else reading, the “base position” is used to calculate the final coordinate of an absolute move, by adding it to the E parameter in the GCODE command (relevant code here).

I’m not sure I understand that part. I expected base coordinates to be known, stored for each extruder, and restored on tool-change.

To which use case could that apply?

Thanks!