Skip to content

Block merging#45

Merged
pjuangph merged 7 commits into
mainfrom
block_merging
Jul 7, 2025
Merged

Block merging#45
pjuangph merged 7 commits into
mainfrom
block_merging

Conversation

@pjuangph

@pjuangph pjuangph commented Jul 7, 2025

Copy link
Copy Markdown
Contributor

Allows for merging of blocks, for example 3x3x3 so 27 connected blocks are merged together - kind of like a rubix cube.

pjuangph added 7 commits June 30, 2025 15:58
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
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.
@pjuangph pjuangph merged commit 8a71eff into main Jul 7, 2025
@pjuangph pjuangph deleted the block_merging branch July 7, 2025 17:12
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.

1 participant