Skip to content

[port] Orca #16590 U1 purifier commands and start G-code - #635

Draft
aceRage wants to merge 1 commit into
mainfrom
cursor/port-orca-16590-u1-purifier-e33b
Draft

aceRage wants to merge 1 commit into
mainfrom
cursor/port-orca-16590-u1-purifier-e33b

Conversation

@aceRage

@aceRage aceRage commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Description

Delta port of OrcaSlicer #16590 (profile values from Snapmaker #1005). Edge already picks the purifier mode in C++.

Ported (all 5 U1 machine profiles, including Edge-only 0.4+0.6):

  • strong: MODE=1 DESIRE_TEMP=42 ALARM_TEMP=48 (was ALARM 45)
  • weak: MODE=1 DESIRE_TEMP=45 ALARM_TEMP=51 FAN_SPEED=0.6 DELAY_OFF=0 (was MODE=3 DESIRE_TEMP=0)
  • keep warm: unchanged
  • First-tool pre-extrude after auto feed and flow calibration: M104 / T / M109 / SM_PRINT_PREEXTRUDE_FILAMENT INDEX={initial_extruder}
  • M107 before G28 Z I140, before DETECT_BED_PLATE, after WAIT_CHAMBER_TEMP and before bed leveling
  • M106 S255 at the start of deep clean
  • U1 softening-temperature audit (resolved values): ASA 182→100, PETG Basic 178→70, PETG-CF 178→70, PLA 154→45, PLA Eco/Glow/Translucent 65→45, PLA Metal 154→45, TPU 95A 60→30 (base + json), TPU Flex 138→30 (TPE / High-Flow inherit). Left PET 230 and Polymaker alone.
  • Snapmaker.json version 02.03.03.11 → 02.03.03.12

Kept (do not take upstream):

Upstream SHA ported: 29f5dcf0 (merge of Orca OrcaSlicer#16590); command values from Snapmaker Snapmaker#1005.

Edge main at branch time: 67353f9885 (Release 2.4.6.2 / #624).

U1 test print is required before merge (Lance).

Russ round 1 (report only; no G-code change)

F2 — first-tool pre-extrude twice? No. The new start block always runs SM_PRINT_PREEXTRUDE_FILAMENT INDEX={initial_extruder} once, after auto-feed/flow cal. change_filament_gcode then only emits PREEXTRUDE when previous_extruder != next_extruder and initial_extruder != next_extruder, so the first tool is skipped. After start G-code, GCode::set_extruder(initial_extruder_id, 0.) does run the tool-change template (U1 is not BBL, so the Bambu skip-first-toolchange path does not apply), but at that point m_layer_index is still -1, so the template also skips M109 via not((layer_num < 0) and (next_extruder == initial_tool)). Same PREEXTRUDE gate exists on Edge before this port; upstream's start block is the same first-tool prime. Not a double pre-extrude that Edge uniquely introduced, so not fixed.

F1 — U1 send path vs bed-temp-too-high warning: GCodeProcessor still writes BED_TEMP_TOO_HIGH_THAN_FILAMENT / 1000C001 when bed ≥ vitrification (GCodeProcessor.cpp:5785-5795). Lowering PLA/PETG/TPU/ASA vitrification makes that fire more often. No U1 send path shows it. U1 send is SendFlow::SnapmakerConnect (WebPreprintDialog / SSWCP), which reads get_slice_result() for stats and filament mapping but never walks warnings. SelectMachine.cpp:2189 is the only send dialog that names this warning, and the enclosed-printer confirm is commented out. SendToPrinter, RemoteSend, and print-host dialogs do not read it. Plater::get_slice_warning_string maps the string but is only called from SelectMachine.

Screenshots/Recordings/Graphs

N/A (machine start G-code and filament vitrification values).

Tests

No Catch2 coverage (profile / start-G-code strings). Catch2 binaries were not compiled here. Owed: Edge CI, then a G-code export inspection of the five U1 machines (including 0.4+0.6) for SET_PURIFIER_MODE, first-tool SM_PRINT_PREEXTRUDE_FILAMENT, and the new M107/M106 lines.

U1 test-print checklist

  • PLA plate on strong: purifier MODE=1 DESIRE_TEMP=42 ALARM_TEMP=48; first-tool prime after calibration; fans off around probe (M107) and M106 S255 at deep clean.
  • PETG plate on weak: purifier MODE=1 DESIRE_TEMP=45 ALARM_TEMP=51 FAN_SPEED=0.6 DELAY_OFF=0.
  • ABS plate on keep warm: purifier command unchanged.
  • Mixed plate: mode follows chamber_cooling_mode C++ (not min_vitrification_temperature); first-tool prime still runs; no chamber-mode C++ regression.
  • 0.4+0.6 machine profile matches the other four nozzles for the purifier / M107 / pre-extrude lines.
  • Tool-change still uses Edge M109 + PREEXTRUDE (not upstream M104). Mesh remains 11x11. Confirm the first tool is primed once (start block), not again on the post-start tool-change.
Open in Web Open in Cursor 

Broker gate: job 323 (Windows, VM slot)

Comparator crashed (fixed in broker since); per-case results checked manually; clean GATE_RESULT rerun pending REAPER disk space.
The compare script in the gcode-gate skill crashed printing the Chinese pre-extrude comment through the cp1252 console (UnicodeEncodeError), so the job ended EDGEBUILD_EXIT=4 with no GATE_RESULT. The broker's eb/gate_job.sh now launches the comparator with -X utf8; no Windows gate has run since, so the fix itself is still unproven.

job 323: libslic3r_tests slic3rutils_tests fff_print_tests (+app/paho; VM slot, 36m47s), libslic3r_tests 2261/2264 passed (3 failed as expected) / slic3rutils_tests 1308 cases 17345 assertions passed / fff_print_tests 553 cases 337810 assertions passed, GATE_RESULT missing (comparator crash; manual per-case: identical=6 config_only=0 diff=0 expected=4), copy: none (gate-only test copy)

Head 667dc5e. Baseline 6b47212 (60 commits behind main; the gap only adds Elegoo profiles, Showcase and the version bump, none of which the gate cases use). --gate-cmp "--expect u1_cube,u1_benchy,u1_2col,u1_t4".

case result
x1c_cube IDENTICAL
x1c_benchy IDENTICAL
u1_cube DIFF (expected)
u1_benchy DIFF (expected)
u1_2col DIFF (expected)
u1_t4 DIFF (expected)
h2d_benchy_2n IDENTICAL
h2c_benchy_2n IDENTICAL
voron_cube IDENTICAL
voron_benchy IDENTICAL

All four U1 cases use Generic PLA @U1 0.4 (already 45 on main, so the mode stays strong). In each one, a manual diff of every non-comment line shows only:

  • strong purifier line ALARM_TEMP=45 -> 48;
  • the first-tool pre-extrude block: M104 T0 S220, T0, M109 T0 S220, SM_PRINT_PREEXTRUDE_FILAMENT INDEX=0, plus one blank line;
  • four M107 lines and one M106 S255.

The only header changes are the pre-extrude comment and the machine_start_gcode config line. These all match upstream Orca OrcaSlicer#16590.

U1 presets whose purifier mode changes (7)

Preset Softening temp Purifier mode
PLA @U1 154 -> 45 keep-warm -> strong
PLA Metal @U1 154 -> 45 keep-warm -> strong
PLA Eco @U1 65 -> 45 weak -> strong
PETG Basic @U1 178 -> 70 keep-warm -> weak
TPU 95A @U1 60 -> 30 weak -> strong
TPE @U1 138 -> 30 keep-warm -> strong
TPU High-Flow @U1 138 -> 30 keep-warm -> strong

ASA, PETG-CF, PLA Glow and PLA Translucent children already had the new values on main, so their purifier modes don't change. Every child of the changed filaments has compatible_printers limited to U1 machines, and no other vendor or non-U1 printer inherits from them. The five machine files inherit fdm_U1 and nothing else inherits from them.

CLI spot checks (20 mm cube, main baseline vs PR):

  • U1 + PLA @U1: MODE=3 DESIRE_TEMP=45 ... DELAY_OFF=600 -> MODE=1 DESIRE_TEMP=42 ALARM_TEMP=48 ....
  • U1 + PETG Basic @U1: keep-warm -> MODE=1 DESIRE_TEMP=45 ALARM_TEMP=51 ...; otherwise only the allowed lines above changed.

Non-U1 check: J1

Snapmaker J1 (0.4 nozzle) + Snapmaker PLA @j1, 0.20 Standard, 20 mm cube, main baseline vs PR: byte-identical apart from the ; generated by header line (version and timestamp). That is 2 of 10,351 lines.

Arrange

ModelArrange.cpp copies temperature_vitrification into vitrify_temp, but the only scoring that would use it (Arrange.cpp 635/639) is commented out, so arrange ignores it. Check: U1 + PLA @U1 with --arrange 1 on main vs PR gives the same printed area (X 125.71-145.29, Y 126.21-145.79).

Note: slice warning 1000C001

GCodeProcessor raises BED_TEMP_TOO_HIGH_THAN_FILAMENT (1000C001) when the bed temperature is at or above the filament's softening temperature. With the new values it will fire on most U1 PLA, PETG and TPU plates (for example a 60 C bed vs 45, or 70 vs 70), which is the same as upstream. The warning is stored in the plate's slice info in the 3MF. Its only GUI use (the send dialog in SelectMachine.cpp) is commented out. It doesn't change any G-code.

Clean rerun: job 329 (Windows, VM slot)

job 329: libslic3r_tests slic3rutils_tests fff_print_tests (+app/paho; Windows VM slot, build 704 s), libslic3r_tests 2261/2264 passed (3 failed as expected) / slic3rutils_tests 1308 cases 17344 assertions passed / fff_print_tests 553 cases 338104 assertions passed, GATE_RESULT identical=6 config_only=0 diff=0 expected=4 failed=0 missing=0, copy: none (gate-only test copy)

Head 667dc5e, baseline 6b47212, --expect u1_cube,u1_benchy,u1_2col,u1_t4, GATE_EXIT=0. The per-case table matches job 323 exactly: the four U1 cases are expected diffs (1 line removed, 12 added, 7 hunks each), and the six non-U1 cases are identical. This replaces the manual result above.

…ime, softening temps.

Keep Edge's chamber_cooling_mode C++. Update strong/weak SET_PURIFIER_MODE
values from Snapmaker Snapmaker#1005 in all five U1 machines including 0.4+0.6, add
first-tool pre-extrude and M107/M106 around probing, and set U1 PLA/PETG/TPU/
ASA softening temperatures. Leave PET, Polymaker, 11x11 mesh and M109 tool
change alone.

Co-authored-by: aceRage <aceRage@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants