Skip to content

[CURA-13023] Merge surface (floor, roof) to skin when relevant settings are equal.#2333

Open
rburema wants to merge 3 commits into
mainfrom
CURA-13023_merge_surface_skin_when_settings_eq
Open

[CURA-13023] Merge surface (floor, roof) to skin when relevant settings are equal.#2333
rburema wants to merge 3 commits into
mainfrom
CURA-13023_merge_surface_skin_when_settings_eq

Conversation

@rburema
Copy link
Copy Markdown
Member

@rburema rburema commented May 12, 2026

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...).

rburema and others added 2 commits May 12, 2026 15:45
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
Comment thread src/skin.cpp
setting_float_names,
[&settings](const auto& kvp)
{
return settings.get<double>(kvp.first) == settings.get<double>(kvp.second);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Don't want a small $\epsilon$ size diff for floating point differences? Some of these values are resolved from formula's and can have ever so slight differences.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah, fair enough! Do you have a proposal for the size of the epsilon?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

std::numeric_limits<double>::epsilon()?

Comment thread src/skin.cpp
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))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't get the $&gt; 0$ part here. I can imagine that the check after is not required if the extruder is $-1$, but you still van to check extruder equality even though the extruder is $0$?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Oops, that should've been > -1 or >= 0 instead. Good catch.

Comment thread src/skin.cpp
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)))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same as comment above, don't we want a small $\epsilon$ range here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

(Same as above!)

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