-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix stringing: support spiral lift/Z-hop with timelapse gcode injections #5736
base: master
Are you sure you want to change the base?
Fix stringing: support spiral lift/Z-hop with timelapse gcode injections #5736
Conversation
…imelapse gcode injection
…ayed Z-hop/lift execution Uses new travel_lift() method. The existing lift via retract() was delayed until next travel move AFTER gcode injection (move from safe pos to next object). Removes duplicate lift operation and ensure spiral lift is executed within print area. Compatible with both, enabled/disabled timelapse.
@ziehmon Awesome work, especially the diagram, very clear. Change the implementation of lift from lazy lift to instant lift seems to be able to solve the problem. Could you give us some time for thorough testing? We are currently busy with other matters. |
Thank you for the flowers 💐! Take your time on testing and let me know if and how I could help. |
@ziehmon Hello, we are currently incorporating the contents of this PR into our codebase and testing it internally. It seems to address this long-standing issue. If the tests pass, would you be open to us submitting the code internally in your name, rather than merging the PR directly from GitHub? |
Hi @XunZhangBambu, even though this is not my most appreciated workflow, if it works for you (and you need to do it), feel free. |
How can I test this point to see if it solves the chafing problem, greetings, I have Windows 11 |
This is the successor of #4848 and #4631. For a detailed explanation why injection of gcode for timelapse causes stringing, please see both PRs.
Summary
This PR improves the injection of timelapse gcode so that a lift/Z-hop operation is executed before the timelapse gcode is injected. When the print head returns from the timelapse macro position, no spiral Z-hop is generated in the slicer anymore - this was causing collisions. After thinking about the process (for a long time), I noticed that we do not actually require two Z-hops.
I created a diagram to show the differences.
Previous Implementation
Proposed Implementation
Details
To use only one Z-hop, we need to immediately execute one before the timelapse gcode is injected. With the current implementation (
lift
), this is not possible, since these operations are "scheduled"/"queued" to be executed at a later point (when usingtravel_to_xyz()
).This PR adds the new function
travel_lift
which immediately executed a lift operation to a givenz
height and flags existing scheduled/queued lift operations to be done (m_lifted = delta_z; m_to_lift = 0;
).Furthermore, it removes the second Z-hop from the
timelapse_gcode
in the printer profile, since we now can rely it was executed.Essentially, this means that no Z-hop will be executed within or after the timelapse gcode and thus, no collisions can occur because of an unknown position:
Testing
Since I have an AMS Lite now (thanks BambuLab and thanks @SaltWei!) I was able to test all different injection scenarios/positions. With and without AMS Lite, with/without purge/wiper tower. However I assume it would be great if BambuLab test on their end too.
Happy for your feedback!