Repository navigation
Add layered-mesh keywords to SolidModelsExperimental.Extrude - #378
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
gpeairs
approved these changes
Nov 13, 2026
gpeairs
left a comment
Member
There was a problem hiding this comment.
Minor comments, otherwise LGTM
| ArgumentError("Extrude heights must have one entry per num_elements entry") | ||
| ) | ||
| isempty(heights) || | ||
| (issorted(heights; lt=<=) && 0 < first(heights) && last(heights) <= 1) || |
Member
There was a problem hiding this comment.
I think we actually need last(heights) ≈ 1 if you want to catch that as well
| - `num_elements`: Number of mesh element layers in each sub-layer of the extrusion. Empty | ||
| (the default) meshes the extrusion unstructured. | ||
| - `heights`: Cumulative heights of the sub-layers, normalized to 1. Empty (the default) means a | ||
| single sub-layer; otherwise it has one entry per entry of `num_elements`. |
Member
There was a problem hiding this comment.
You can have empty heights with non-empty num_elements, in which case each num_elements entry gets an equal-height sub-layer
Extrude accepts num_elements, heights, and recombine, the extrusion-mesh keywords of SolidModels.extrude_z!, and passes them to it, so an extrusion can be meshed as structured layers (e.g. high-aspect via barrels, which gmsh meshes badly unaided). The constructor checks that element counts are positive and that heights, if given, has one entry per num_elements entry and increases within (0, 1]. Both compiled paths forward the keywords, including the deferred to_level extrusion. Adds compile-level tests and an end-to-end test counting the mesh segments along layered extrusions, and a CHANGELOG entry.
Extrude now rejects `heights` whose last entry is not approximately 1, instead of accepting any last entry up to 1, since the heights are cumulative and normalized. A test covers heights that stop short of 1. The docstring now says that empty `heights` gives the `num_elements` sub-layers equal heights, rather than a single sub-layer.
parrangoiz
force-pushed
the
arrangop/extrude-num-elements
branch
from
November 13, 2026 19:46
87029db to
d70ffb5
Compare
Contributor
Author
|
Cool, addressed your comments and rebased |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
num_elements,heights, andrecombinekeywords were missing. This adds them and passes them down verbatim.