Skip to content

CURA-9839 add bridging and overhang line type color scheme - #2366

Merged
HellAholic merged 10 commits into
mainfrom
CURA-9839-add-bridging-and-overhang-line-type-color-scheme
Sep 3, 2026
Merged

CURA-9839 add bridging and overhang line type color scheme#2366
HellAholic merged 10 commits into
mainfrom
CURA-9839-add-bridging-and-overhang-line-type-color-scheme

Conversation

@wawanbreton

@wawanbreton Erwan MATHIEU (wawanbreton) commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

This PR adds the possibility to set special attributes to print segments. Those attributes are sent to front-end for display purposes.

In this case, we are interested in displaying the segment that are overhanging and bridging, so we also add 2 flags for those cases and set them when appropriate.

Comes with Ultimaker/Cura#21766

CURA-9839

@wawanbreton Erwan MATHIEU (wawanbreton) changed the title Cura 9839 add bridging and overhang line type color scheme CURA-9839 add bridging and overhang line type color scheme Aug 24, 2026
@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Test Results

31 tests   31 ✅  5s ⏱️
 1 suites   0 💤
 1 files     0 ❌

Results for commit 1638756.

♻️ This comment has been updated with latest results.

CURA-9839
GCC15 seems to be a bit less tolerant i.r.t references to null objects, which requires some unit tests to be more properly setup

@rburema Remco Burema (rburema) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Far less intimidating than it seems on first glance; basically all of this code is just threading the attributes variable where it needs to go.

I don't really have any serious comments on this, despite its size, seems solid!

I'm going to try all of this out on Windows before I sent it to QA though -- normally I'd skip that, but this has Arcus PR's connected to it, and I'll need it working on my system anyway when we merge.

Comment thread include/PrintSegmentAttributes.h Outdated
Comment on lines +21 to +23
None = 0,
Overhanging = 0x1,
Bridging = 0x2,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really important, but: You can do 0b0, 0b1, 0b10 these days (though that might get quite verbose if we have many of them) -- I guess you can also do 1 << n though 🤔

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed there are many ways of displaying this properly. I used the 0x because this is what I'm used to 😄 but the binary notation is more explicit indeed.

Comment thread src/LayerPlan.cpp
&& paths.back().mesh == current_mesh_) // spiralize can only change when a travel path is in between
if (! paths.empty() && paths.back().config == config && ! paths.back().done && paths.back().flow == flow && paths.back().width_factor == width_factor
&& paths.back().speed_factor == speed_factor && paths.back().z_offset == z_offset && paths.back().mesh == current_mesh_
&& paths.back().print_attributes == print_attributes) // spiralize can only change when a travel path is in between

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we absolutely need this to show it in the front-end properly, and in practice it won't make a difference, but in theory we could have a situation where say, the bridging and overhang are printed with the same settings, which would previously be merged.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes indeed, this can split up GCodePaths that were previously in one part, to multiple parts. I remember doing that in the past and then having to fix some code that was impacted by side-effect. But on the principle, the rest of the engine should be independant of the GCodePaths grouping, especially for this kind of case.

@HellAholic
HellAholic merged commit 4636841 into main Sep 3, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants