fix: The issue of contamination during tool change in parallel multi-tool machines. #7480
+14
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For printers using parallel multi-tools, such as the Snapmaker Artisan, their tool-changing actions are significantly different from those of typical multi-tool printers like the Prusa X5L.
The two tools of the Artisan are set at the same height by default, which eliminates the need for the time-consuming process of returning to the original position before changing tools as required in other multi-tool printers. Additionally, the other tool begins preheating before the tool change, significantly reducing the user's waiting time.
However, this approach introduces a problem: once the tool change is complete, the new tool is already at the model's height and preheated. If it then moves to wipe the filament tower, it can easily perform a wiping action on the model, causing contamination.
So I defined two template variables, next_wipe_x and next_wipe_y, to record the wiping position to which the tool should move after a tool change. These variables are used in the "change_filament_code" to move to the position before the tool change action takes place, thus solving the contamination issue.
These template variables only take effect if they are declared and used, so they won't affect other machines.