Repository navigation
feat: model step and direct interpolation (usability plan, phase 4) - #135
Open
lachlangrose wants to merge 8 commits into
Open
lachlangrose wants to merge 8 commits into
lachlangrose wants to merge 8 commits into
Conversation
Phase 4 of the usability plan. - One primary button replaces Initialize Model, Solve Model and Update Model Data. Its text and action come from the model state. The problems of all steps show above the feature list. - A build calculates out-of-date basal contacts and thicknesses first, on a background task with progress. With "Calculate from geology polygons" the model reads the extracted contacts directly; the project layer is for display only. - Start choice: build from a geological map, or interpolate surfaces from constraints (hides steps 2 and 3). Saved with the state. - Constraint types: value, interface, gradient/normal, tangent, form line, inequality and pairwise inequality, each with a weight and a Z source (layer, DEM or constant). - Detach a generated feature to keep a fixed copy of its data. Rows added to a generated feature are now used in the build. - Preview one feature as isolines on the map. - Add Fault from a centre, strike, dip and size.
…tep branch # Conflicts: # loopstructural/gui/modelling/steps/checks.py
- Make the step titles with dict(). - Rename the unused loop variable.
- When the contacts and the thicknesses are calculated together, the thickness calculation uses the new contacts, not the out-of-date layer. - The background thread does not change the data manager. finish() puts the contacts into the model on the GUI thread. - Read the inputs with basal_contacts_inputs() and thickness_inputs() without arguments. #134 changed these functions, so the build failed. - qgsLayerToGeoDataFrame accepts a GeoDataFrame. - Add unit tests for the order and for the thread rule.
LoopStructural puts the major axis along cross(normal, slip) and the intermediate axis along the slip. The dialog said along strike and down dip, which is correct only for dip slip. The labels are now "across the slip" and "along the slip". Add axis_vectors() and tests for the axes.
- A row that the user adds to or deletes from a generated feature makes the model stale, so that the next action is a rebuild. - A bad added row is left out, and the build tells the user. Before, one bad row removed all the added rows of the feature. - Inequality and Pairwise Inequality have no weight, because LoopStructural ignores it. - Test the save and load of detached data through JSON.
lachlangrose
added a commit
that referenced
this pull request
Oct 30, 2026
This branch has not been deployed
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.
Phase 4 of the usability plan. This PR is stacked on #134 (phase 3), so the base is
feat/step-based-dock. Merge #134 first.What changes
steps/build_plan.py). The problems of all visible steps show above the feature list.main/derived_refresh.py). A failure stops the build and shows the error. With "Calculate from geology polygons" the model reads the extracted contacts directly. The project layer is for display only.main/constraints.py). All interpolators take the same types, so none are hidden.main/preview.py). Usescontourpy, which comes with matplotlib.main/parametric_fault.py). The sizes follow the slip, as in LoopStructural: "Length across the slip" (major_axis, alongcross(normal, slip)) and "Extent along the slip" (intermediate_axis). With a pitch of 90, these are along strike and down dip. It replaces the old unusedadd_fault_dialog.uiwith a dialog in code.Not tested in QGIS
QGIS was not available where I wrote this. These are not run:
test_detach_feature.py(with the tests for skipped rows, the JSON round trip and the stale model),test_parametric_fault.py, and additions totest_manual_foliations.pyandtest_derived_data_state.py.The unit tests pass (234) and ruff is clean. Please run the QGIS tests in CI and try the workflow by hand.
Things to check
tests/unit/test_parametric_fault.py; the QGIS test checks only that the fault surface changes sign across the fault.contourpyis in the QGIS Python.Review fixes
basal_contacts_inputs()andthickness_inputs()to take no arguments. Fixed inderived_refresh.py, with unit tests (tests/unit/test_derived_refresh.py).finish()puts the contacts into the model on the GUI thread.Limits
🤖 Generated with Claude Code