-
-
Notifications
You must be signed in to change notification settings - Fork 928
[CURA-13054] Don't take support into account w.r.t. seam overhang. #2349
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
Open
Remco Burema (rburema)
wants to merge
1
commit into
main
Choose a base branch
from
CURA-13054_fix_seam_overhang
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+7
−4
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2595,6 +2595,7 @@ FffGcodeWriter::InsetsPreprocessResult FffGcodeWriter::preProcessInsets( | |||||
| } | ||||||
| } | ||||||
| } | ||||||
| Shape non_support_outlines_below = outlines_below; | ||||||
|
|
||||||
| const coord_t layer_height = mesh_config.inset0_config.getLayerThickness(); | ||||||
|
|
||||||
|
|
@@ -2684,18 +2685,19 @@ FffGcodeWriter::InsetsPreprocessResult FffGcodeWriter::preProcessInsets( | |||||
| } | ||||||
|
|
||||||
| const Shape fully_supported_region = outlines_below.offset(-half_outer_wall_width); | ||||||
| const Shape model_supported_region = non_support_outlines_below.offset(-half_outer_wall_width); | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| const Shape part_print_region = part.outline.offset(-half_outer_wall_width); | ||||||
|
|
||||||
| const auto get_supported_region = [&fully_supported_region, &layer_height](const AngleDegrees& overhang_angle) -> Shape | ||||||
| const auto get_supported_region = [&fully_supported_region, &model_supported_region, &layer_height](const AngleDegrees& overhang_angle, bool full = true) -> Shape | ||||||
| { | ||||||
| // the overhang mask is set to the area of the current part's outline minus the region that is considered to be supported | ||||||
| // the supported region is made up of those areas that really are supported by either model or support on the layer below | ||||||
| // the supported region is made up of those areas that really are supported by (either) the model (or support, if 'full') on the layer below | ||||||
| // expanded to take into account the overhang angle, the greater the overhang angle, the larger the supported area is | ||||||
| // considered to be | ||||||
| if (overhang_angle < 90.0) | ||||||
| { | ||||||
| const coord_t overhang_width = layer_height * std::tan(AngleRadians(overhang_angle)); | ||||||
| return fully_supported_region.offset(overhang_width + 10); | ||||||
| return (full ? fully_supported_region : model_supported_region).offset(overhang_width + 10); | ||||||
| } | ||||||
|
|
||||||
| return Shape(); | ||||||
|
|
@@ -2758,7 +2760,8 @@ FffGcodeWriter::InsetsPreprocessResult FffGcodeWriter::preProcessInsets( | |||||
| const AngleDegrees seam_overhang_angle = mesh.settings.get<AngleDegrees>("seam_overhang_angle"); | ||||||
| if (seam_overhang_angle < 90.0) | ||||||
| { | ||||||
| const Shape supported_region_seam = get_supported_region(seam_overhang_angle); | ||||||
| constexpr bool not_full = false; // Do not take support into account for the seam overhang. | ||||||
| const Shape supported_region_seam = get_supported_region(seam_overhang_angle, not_full); | ||||||
| gcode_layer.setSeamOverhangMask(part_print_region.difference(supported_region_seam).offset(10)); | ||||||
| } | ||||||
| else | ||||||
|
|
||||||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.