No Z hop on extruder change Orca Slicer

Hi All,

I’m trying to to a multi-color print that is somewhat challenging. Tall part, thin walls, lots of tree supports. I have had multiple issues with the extruders colliding with either the part, the supports, or the purge tower. I have been able to add z-hop to most of printers movements but it seems like in orca slicer there is no option to force z-hop on extruder swaps.

I’ve seen people address this problem by editing the machine g-code in prusa slicer, but the g-code’s are substantially different between orca slicer and prusa slicer. Can anybody advise on how/where I might add that z-hop in orca slicer?

Thanks

Here is the prusa thread: Z-lift with tool change (Prusa slicer)

And here is the corresponding machine G-code in orca:

;***** Update: 20240823
{if current_extruder != next_extruder}
; Change T[current_extruder] → T[next_extruder] (layer [layer_num] [toolchange_count]/[total_toolchanges])
; layer [layer_num] at [layer_z]mm
T[next_extruder]

M107 P[current_extruder] ;fan off T[current_extruder]

{if layer_num == 1 &&
((filament_type[current_extruder] == “PLA” || filament_type[current_extruder] == “TPU”)
|| (filament_type[next_extruder] == “PLA” || filament_type[next_extruder] == “TPU”))
}
; set bed temp: {filament_type[current_extruder]}({bed_temperature[current_extruder]}) → {filament_type[next_extruder]}({bed_temperature[next_extruder]})
M140 S{min(bed_temperature[current_extruder], bed_temperature[next_extruder])}
{endif}

M2000 S200 V[travel_speed] A[travel_acceleration] ;quick switch extruders, S:200 mode/V:speed/A:acceleration
M109 T[next_extruder] S{if layer_num < 1}[nozzle_temperature_initial_layer]{else}[nozzle_temperature]{endif} C3 W1 ;wait T[next_extruder]
{if layer_z > first_layer_height && layer_num >= close_fan_the_first_x_layers[next_extruder]}
M106 P[next_extruder] S{fan_min_speed[next_extruder] * 255.0 / 100.0} ;restore fan speed for T[next_extruder]
{endif}
{endif}

It would be a bit easier to read the gcode instead of code…

Mainly, if it’s your wish to zhop before tool change, you need to retract and lift the nozzle off by 1mm for example.

G91; use relative positions
G1 E-1 F2700; retract 1mm by 45mm/min
G1 Z1 F200; zhop 1mm

After the new tool is applied you have to revert the moves of retraction and lifting
G1 Z-1 F200; move down 1mm
G1 E1 F1000; extrude 1mm
G92 E0; set extruder to 0
G90; use absolute positioning again

Note, this is a start point for you and not perfect! I don’t know your settings and if you use absolute or relative coordinates. In case your gcode has all over relative movements you don’t need to set it to absolute, this wouldn’t work.

Thanks, I will have to tinker around with this and do some test prints. Right now I’m just hoping the current print finishes as is.

I only noticed the lack of tool change z-hop half way into a 24hr print.