Skip to content

U1: add the tool change prime G-code - #1

Open
abehrman wants to merge 2 commits into
Snapmaker:mainfrom
abehrman:u1-toolchange-prime
Open

abehrman wants to merge 2 commits into
Snapmaker:mainfrom
abehrman:u1-toolchange-prime

Conversation

@abehrman

Copy link
Copy Markdown

Adds toolchange_prime_gcode to the U1 machine profile (Snapmaker/machine/fdm_U1.json) and bumps the profile version to 02.03.04.05.

This is the profile half of Snapmaker/OrcaSlicer#1107. That PR used to carry this change in resources/profiles/Snapmaker/machine/fdm_U1.json. Snapmaker/OrcaSlicer#1128 moved the presets into this repo, so the change belongs here now.

What it does: when toolchange_prime_enable is on (off by default), the slicer primes the new tool into the purge chute after each tool change, in this order:

  1. Restore the tool change retraction.
  2. Prime by how long the tool was parked: 10 mm after a short park, 20 mm after 30 s or more, or after a pause.
  3. Retract 0.5 mm.
  4. Cut, wipe and discard.
  5. Leave the chute Y first, like SM_PRINT_PREEXTRUDE_FILAMENT.

With toolchange_prime_on_printer on, it calls the SMART_TOOLCHANGE_PRIME macro from Snapmaker/u1-klipper#21 instead.

Why the version bump: the app only refreshes its cached copy of the profile when the version goes up. Without the bump, an updated slicer keeps slicing with the old prime G-code.

Merge order: merge this together with Snapmaker/OrcaSlicer#1107, then update the submodule pin. A slicer without #1107 doesn't know toolchange_prime_gcode; it should skip the unknown key, but I haven't tested that.

🤖 Generated with Claude Code

Primes the new tool into the purge chute after a tool change when
toolchange_prime_enable is on (Snapmaker/OrcaSlicer#1107). It moved here
from resources/profiles/Snapmaker/machine/fdm_U1.json when main moved the
presets to this submodule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The stock cutter macro rams the head against the chute six times at
10000 mm/s^2; at every tool change it can skip steps. The wipe and
discard now run at 3000 mm/s^2 and 50 mm/s. Version 02.03.04.06.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
abehrman added a commit to abehrman/OrcaSlicer-arm64 that referenced this pull request Nov 2, 2026
…chute wipe

The stock cutter macro rams the head against the chute six times at
10000 mm/s^2. Run at every tool change it can skip steps; two U1 prints
with priming on failed on a T3 swap. The U1 profile change is in
Snapmaker/snapmaker-profiles#1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zhouzengping

Copy link
Copy Markdown
Collaborator

Thank you very much for your pull request. I will have my colleagues in the manufacturing team review and confirm the changes made in this pull request. If the manufacturing team confirms that the changes can be implemented, then you will see these modifications in the subsequent manufacturing versions.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants