Block merging#45
Merged
Merged
Conversation
Introduces new functions for merging structured blocks, including combine_blocks, combine_8_blocks, and find_matching_faces in block.py. Adds combine_spatial_group_from_connectivity and related graph utilities in blockfunctions.py, along with a plotting helper. Updates __init__.py to expose new functions. Adds a merge_block_test.py example for testing block merging. Minor fixes and type annotations are included throughout. Updates .gitignore and corrects a typo in pyproject.toml.
debugging
Yay!!!
If block 1 z values are decreasing in j-direction and block 2 z values are increasing in the j-direction then lets flip block 1 and stack block 2 on top of block 1 in the j-direction
Improved and clarified the logic for standardizing block orientation and fixing physical direction along axes. Replaced and consolidated redundant functions, enhanced docstrings for clarity, and removed unnecessary print/debug statements. This refactor ensures more robust and consistent handling of block orientation and stacking in 3D grid operations.
So far so good, it works now. Introduces combine_nxnxn_cubes_mixed_pairs and supporting logic to allow merging of blocks along arbitrary matching face pairs, not just axis-aligned ones. Updates the test example to use the new function, exposes it in the package __init__, and adds type hints and minor code cleanups in blockfunctions.py.
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.
Allows for merging of blocks, for example 3x3x3 so 27 connected blocks are merged together - kind of like a rubix cube.