-
-
Notifications
You must be signed in to change notification settings - Fork 889
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
Reduce the interleaved prime tower wasted filament #2094
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…asses' into smaller-prime-tower
The previous implementation could generate a circle with a final point very close to the first one, or not, depending on double-precision rouding imprecision. This new version makes sure that the last generated point is always the same (non-explicitely closed polygon)
The previous versions used an embedded object which was always present as a member variable. We now instantiate the primer tower object only if a prime tower will be actually generated, and use this pointer presence as a test to having a prime tower. This is also in prevision of a future change where multiple implementations of the prime tower will exist.
We now have specific classes for normal and interleaved prime towers, so that it will become easier to fine-tune their behavior without breaking each other.
Now the whole logic of computation of how each extruder should be primed is done inside the PrimeTowerInterleaved and PrimeTowerNormal classes, because this is very related to how they will process this data later. This will later allow for more fine-tuning of these behaviors without a big risk of breaking each other.
This new vector allows for storing items using a LayerIndex, which can be negative. Thus we can store items also on negative (raft) layers in the same list and avoid having two lists to store the same items.
This simplifies some code logic in the prime tower that is common and can now be delegated to LayerVector
This simplifies the common behavior in PrimeTower and allows for more modifications inside each class without breaking each other
With the new prime tower, the base is now calculated much later on the process, because it requires to know the extruders uses orders. However, the interation with support and bed adhesion features is calculated before that. So we can calculate an approximate outline as soon as the tower is initialized, and later we calculate the exact toolpaths.
github-actions
bot
added
the
PR: Community Contribution 👑
Community Contribution PR's
label
Jun 12, 2024
We now generate a new circle every time we need to create an inset/ outset instead of offsetting the base shape.
The previous implementation was not updated following the addition of the prime tower base.
nallath
requested changes
Jun 27, 2024
nallath
approved these changes
Jul 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
The current version of the interleaved prime tower still prints a lot of material that is only required for supporting the upper layer. However, by priming always the same extruder at the same position in the tower, the required support amount is quite high and can be reduced a lot when priming each extruder on top of each other:
This also allows for reducing the diameter of the prime tower, which can save room on the building plate.
In case of multi-color printing, this also allows for decreasing the required amount of support when the number of used extruder decreases. Thus we can end with a very thin tower at the end of the print, reducing wasted filament a lot:
Type of change
How Has This Been Tested?
Test Configuration:
Checklist:
Other improvements:
This PR also provides a few other improvements along the way:
LayerVector
which helps safely storing values byLayerIndex
instead ofsize_t
. This removes some redundant but necessary check and values conversion warnings, and helps make the code more readable.PrimeTower
into a base class and two implementationPrimeTowerNormal
andPrimeTowerInterleaved
. This makes it easier to work on one or the other without breaking each other. Also, it helps computing only what is really necessary for each of them.Comes with https://github.com/Ultimaker/Cura/pull/19249/files