OrcaSlicer icon indicating copy to clipboard operation
OrcaSlicer copied to clipboard

Default U1 change filament gcode causes head crashes in object by object printing

Open Minecrafter8001 opened this issue 2 months ago • 3 comments

Is there an existing issue for this feature request?

  • [x] I have searched the existing issues

Is your feature request related to a problem?

the default code can cause a head crash the current code is this:

;===== date: 20251213=====================
; Change Tool[previous_extruder] -> Tool[next_extruder] (layer [layer_num])
{
local max_speed_toolchange = 350.0;
local wait_for_extruder_temp = true;
position[2] = position[2] + 2.0;
local speed_toolchange = max_speed_toolchange;
if travel_speed < max_speed_toolchange then
      speed_toolchange = travel_speed;
endif
"G91
G1 Z1.5 F1800
G90
";
"G1 F" + (speed_toolchange * 60) + "
";
if wait_for_extruder_temp and not((layer_num < 0) and (next_extruder == initial_tool)) then
      "
";
      "; " + layer_num + "
";
      if layer_num == 0 then
            "M109 S" + first_layer_temperature[next_extruder] + " T" + next_extruder + "
";
      else
            "M109 S" + temperature[next_extruder] + " T" + next_extruder + "
";
      endif
endif
"M400" + "
";
"T" + next_extruder + "
";
if filament_type[next_extruder] == "PVA" then
"SET_VELOCITY_LIMIT ACCEL=3000
";
else
endif
if previous_extruder != next_extruder and initial_extruder != next_extruder then
"SM_PRINT_PREEXTRUDE_FILAMENT INDEX=" + next_extruder + "
";
endif
"G90
";
}

which only lowers the Z axis by 2mm, this can cause issues if another object is in the path

Which printers will be beneficial to this feature?

All

Describe the solution you'd like

a simple modification, replacing this section:

position[2] = position[2] + 2.0;
local speed_toolchange = max_speed_toolchange;
if travel_speed < max_speed_toolchange then
      speed_toolchange = travel_speed;
endif
"G91
G1 Z1.5 F1800
G90
";

with this

position[2] = position[2] + 2.0;
local speed_toolchange = max_speed_toolchange;
if travel_speed < max_speed_toolchange then
      speed_toolchange = travel_speed;
endif
if print_sequence == "by object" then
      local safe_z = position[2];
      if safe_z < max_layer_z + 2.0 then
            safe_z = max_layer_z + 2.0;
      endif
      "G90
G1 Z" + safe_z + " F1800
";
else
      "G91
G1 Z1.5 F1800
G90
";
endif

this lowers the plate by the entire model Hight if printing by object, removing the risk of head crashes

Describe alternatives you've considered

No response

Additional context

No response

Minecrafter8001 avatar Sep 14 '26 19:09 Minecrafter8001

@Minecrafter8001 Hi, this issue is already known to us and a fix has been planned, and we expect the fix to be included in the next release. Thank you for your feedback.

zackaree-shen avatar Sep 15 '26 04:09 zackaree-shen

@zackaree-shen since this is planned for the next release: the version that reached main on Sep 30 fixes the 2 mm lift for print-by-object, but lifts by the target height on top of the current height. It rises further than needed, and on tall prints it can ask for more than the printable height and stop the print.

#958 puts back the exact, capped move from #453 for print-by-object, keeps the stock 1.5 mm lift for print-by-layer, and caps the end-of-print lift the same way. It is tested by slicing in both modes, with a forced height cap, and by printing.

KuzuriAo avatar Oct 03 '26 06:10 KuzuriAo

This is fixed in Snapmaker Orca 2.4.1, now the stable release: tool changes in print-by-object jobs lift just above the tallest printed object, capped at the max print height. The pause collision is separate and still needs the firmware fix in Snapmaker/u1-klipper#17.

KuzuriAo avatar Oct 28 '26 03:10 KuzuriAo