Repository navigation
refactor: BoundingBox.structured_grid returns a PropertyGrid - #370
Merged
lachlangrose merged 2 commits intoNov 1, 2026
Conversation
lachlangrose
force-pushed
the
refactor/bounding-box-structured-grid-returns-property-grid
branch
from
November 1, 2026 05:51
c1806aa to
5297d98
Compare
lachlangrose
changed the base branch from
master
to
feature/property-grid-trilinear
November 1, 2026 05:51
lachlangrose
force-pushed
the
refactor/bounding-box-structured-grid-returns-property-grid
branch
from
November 1, 2026 06:08
5297d98 to
aae0074
Compare
lachlangrose
marked this pull request as ready for review
November 1, 2026 06:10
It returned the interpolation support, which has no properties dict, silently dropped cell_data / vertex_data and had nsteps + 1 nodes per axis. It now returns a PropertyGrid whose nodes are the points of regular_grid(), so values computed at regular_grid() / cell_centres() sit where the grid says they do. get_block_model, scalar_field and gradient_norm_scalar_field use it instead of building the grid by hand. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… the support Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
lachlangrose
force-pushed
the
refactor/bounding-box-structured-grid-returns-property-grid
branch
from
November 1, 2026 06:54
aae0074 to
15ca12f
Compare
lachlangrose
deleted the
refactor/bounding-box-structured-grid-returns-property-grid
branch
November 1, 2026 06:54
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.
BoundingBox.structured_grid()returned the interpolation support, which has nopropertiesdict, silently droppedcell_data/vertex_data, and hadnsteps + 1nodes per axis. It now returns aPropertyGridwhose nodes are exactly the points ofregular_grid().Change
PropertyGrid(origin, step_vector=node_step_vector, nsteps=nsteps, ...);cell_dataandvertex_dataare stored (copied). Withlocal_coordinates=Truethe grid spans the projected corners.get_block_model,scalar_fieldandgradient_norm_scalar_fielduse it instead of building the grid by hand (their NOTE comments about the workaround are gone).COMPAT.mdrow: the support's interpolation methods are no longer on the return value; node count per axis changes fromnsteps + 1tonsteps.Tests
test_bounding_box_structured_grid.py(13 tests, two boxes): returns aPropertyGrid;nodesequalregular_grid(local=False, order="F"); the grid spans the box;cell_centresequal the box's; data is stored and copied; values computed atregular_grid()sit on the grid's nodes; the local-coordinates grid contains the rotated box.packages/loop_common/tests: 247 passed;packages/loop_interpolation/tests: 606 passed;tests: 737 passed. ruff clean on changed files.Compatibility
Checked in this repo only. Other repos on my machine that call it (
loop-cgalexamples:bb.structured_grid().vtk()) keep working, sincePropertyGrid.vtk()exists. I have not checked the QGIS plugin or map2loop.🤖 Generated with Claude Code