CURA-9839 add bridging and overhang line type color scheme - #2366
Conversation
Test Results31 tests 31 ✅ 5s ⏱️ 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
Remco Burema (rburema)
left a comment
There was a problem hiding this comment.
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.
| None = 0, | ||
| Overhanging = 0x1, | ||
| Bridging = 0x2, |
There was a problem hiding this comment.
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 🤔
There was a problem hiding this comment.
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.
| && 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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