Cura 13073#2338
Open
HellAholic wants to merge 23 commits into
Open
Conversation
Refactor support brim generation to respect BrimLocation and handle inward/outward rings separately. Renamed line_count to base_line_count and added location check; inside brims now create a brim area that is excluded from support infill, while outside brims skip rings that overlap existing build-plate adhesion brim coverage to avoid double-printing. Kept hole-removal and dynamic line_count growth when total brim length is below minimal_length; pushed individual brim rings into storage_.support_brim. Overall this avoids duplicate extrusion and clarifies brim generation flow.
Prevent support brim rings from printing into model geometry by collecting model-only outlines at layer 0 (excluding supports/prime tower) and offsetting them by half the brim line width. The generated brim rings are then clipped (difference) against this collision mask before hole removal. Adds explanatory comments and uses jtRound when offsetting outlines.
When computing existing brim coverage for outside support brim rings, iterate over every extruder instead of only the support infill extruder. This unions offset skirt/brim lines from all extruders (adhesion brim, skirt, shield, etc.) so support brim rings are clipped against any already-generated paths and won't print on top of them. Revert "Account for all extruders in brim coverage" This reverts commit 211b59b.
Support could have a different extruder from the model, if we only get the outline of the support extruder we only check for collisions with models printed with the support extruder
Increase the margin between the support brim and the model. Rather than skipping the entire brim line when there is a collision, only skip the collision
Contributor
There was a problem hiding this comment.
Pull request overview
Updates support-brim generation to respect a new support_brim_location setting (inside/outside), including logic to avoid overlapping the existing skirt/brim and to prevent collisions with the model when generating an outside support brim.
Changes:
- Add
support_brim_locationhandling to generate support brim inside and/or outside the support outline. - When generating outside support brim, subtract existing skirt/brim coverage and model collision areas.
- Refactor support-brim line generation into separate inside/outside branches.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Test Results31 tests 31 ✅ 5s ⏱️ Results for commit 804feb5. ♻️ This comment has been updated with latest results. |
support_brim_line_count should suffice as the reference for the generation of the support brim, this removes the inter-dependency and simplifies the calculations. In addition for detecting collision with the build plate adhesion skirt, we need to shift the calculation to detect the inner most boundary of skirt rather than outer most.
Skirt is printed with all extruders, so only accounting for the support_infill_extruder's skirt was an oversight.
Remove the variable and description copied over from the skirt_brim generation for the model.
calling the support generation first simplifies the process and makes the process easier to predict. We first generate the support brim, then call the skirt_brim.generate() after that.
This file contains hidden or 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
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.
This pull request refactors and enhances the logic for generating support brims in the
generateSupportBrim()function insrc/SkirtBrim.cpp. The main improvements include supporting both inside and outside brim locations, introducing a shared brim generation loop, and improving the exclusion of areas for brim placement.Support brim generation improvements:
support_brim_locationsetting. The brim generation logic now checks the location and applies the appropriate offset direction and exclusion area.generate_brim_loop), which handles both inward (inside) and outward (outside) brim offsets, improving code clarity and maintainability.Bug fixes and minor corrections:
Comes with: Ultimaker/Cura#21660
CURA-13073