[CURA-13023] Merge surface (floor, roof) to skin when relevant settings are equal.#2333
[CURA-13023] Merge surface (floor, roof) to skin when relevant settings are equal.#2333rburema wants to merge 3 commits into
Conversation
It'll be a bit of a hassle to (remember to) maintain this, but unfortunately we can't use the MeshPathConfigs, since they're not only generated at a later juncture, but are also not 100% overlapping with what we want to do here (some settings aren't used there that we do need, so we'd need something bespoke here anyway...). CURA-13023
| setting_float_names, | ||
| [&settings](const auto& kvp) | ||
| { | ||
| return settings.get<double>(kvp.first) == settings.get<double>(kvp.second); |
There was a problem hiding this comment.
Don't want a small
There was a problem hiding this comment.
Yeah, fair enough! Do you have a proposal for the size of the epsilon?
There was a problem hiding this comment.
std::numeric_limits<double>::epsilon()?
| constexpr auto top_bottom_pattern = "top_bottom_pattern"; | ||
| constexpr auto skin_monotonic = "skin_monotonic"; | ||
| constexpr auto skin_angles = "skin_angles"; | ||
| if ((settings.get<int>(setting_other_names.at(extruder_nr)) > 0 && settings.get<int>(setting_other_names.at(extruder_nr)) != settings.get<int>(extruder_nr)) |
There was a problem hiding this comment.
I don't get the
There was a problem hiding this comment.
Oops, that should've been > -1 or >= 0 instead. Good catch.
| if ((settings.get<int>(setting_other_names.at(extruder_nr)) > 0 && settings.get<int>(setting_other_names.at(extruder_nr)) != settings.get<int>(extruder_nr)) | ||
| || settings.get<EFillMethod>(setting_other_names.at(top_bottom_pattern)) != settings.get<EFillMethod>(top_bottom_pattern) | ||
| || settings.get<bool>(setting_other_names.at(skin_monotonic)) != settings.get<bool>(skin_monotonic) | ||
| || ! std::ranges::equal(settings.get<std::vector<double>>(setting_other_names.at(skin_angles)), settings.get<std::vector<double>>(skin_angles))) |
There was a problem hiding this comment.
Same as comment above, don't we want a small
It'll be a bit of a hassle to (remember to) maintain this, but unfortunately we can't use the MeshPathConfigs, since they're not only generated at a later juncture, but are also not 100% overlapping with what we want to do here (some settings aren't used there that we do need, so we'd need something bespoke here anyway...).