Skip to content

Add material_precedence to make material groups mutually exclusive - #344

Merged
laylagi merged 3 commits into
mainfrom
lgh/material-precedence
Oct 13, 2026
Merged

laylagi merged 3 commits into
mainfrom
lgh/material-precedence

Conversation

@laylagi

@laylagi laylagi commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Split out of #331.

After fragmentation an entity can belong to several material groups (e.g. both chip and vacuum). partition_material_groups! keeps each entity only in its highest-priority listed group. Exposed as material_precedence on render!, render_conformal! (requires fragment_backstop=true), and SolidModelTarget.

@codecov

codecov Bot commented Oct 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@gpeairs gpeairs 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.

This seems pretty generally useful, not just for an imported solid -- could really reduce the need for juggling volumes in postrendering.

That said, I would suggest making a regular operation that just does set differences, like ("vacuum", exclude_groups, ("vacuum", ["substrate", "bump_extrusion"]). Then apply_precedence (names are just illustrative, call these what you like) can be a function that generates a list of those operations, which can be splatted into wherever it's needed, like into #346's post_fragment_ops. This also makes it more friendly for eventual integration with #328.

Comment thread src/solidmodels/postrender.jl Resolved
Comment thread src/solidmodels/conformal/conformal.jl Resolved
@laylagi

laylagi commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

That said, I would suggest making a regular operation that just does set differences, like ("vacuum", exclude_groups, ("vacuum", ["substrate", "bump_extrusion"]). Then apply_precedence (names are just illustrative, call these what you like) can be a function that generates a list of those operations, which can be splatted into wherever it's needed...

Thanks, good call. Done!

@gpeairs gpeairs mentioned this pull request Oct 9, 2026
1 task
@laylagi
laylagi force-pushed the lgh/material-precedence branch from a076077 to cafb862 Compare October 9, 2026 19:32

@gpeairs gpeairs 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.

LGTM, just take care of the merge conflict. Thanks!

@laylagi
laylagi force-pushed the lgh/material-precedence branch from cafb862 to 3cf6237 Compare October 13, 2026 03:53
@laylagi
laylagi merged commit aea64d0 into main Oct 13, 2026
10 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.

2 participants