Skip to content

feat: fault topology as a button, with the pair direction from geometry - #144

Open
lachlangrose wants to merge 1 commit into
feat/faults-only-modelfrom
feat/fault-topology-button
Open

lachlangrose wants to merge 1 commit into
feat/faults-only-modelfrom
feat/fault-topology-button

Conversation

@lachlangrose

Copy link
Copy Markdown
Member

What

Plan items 6.6 and 6.7.

6.6

  • "Calculate topology" in step 3 now runs at once. It uses the fault layer and name field from the data manager. No dialog opens.
  • The button is disabled until both are set. The tooltip says why.
  • The result and the errors show in a message bar on the step page.
  • Removed FaultTopologyWidget, its .ui file and launchers.FAULT_TOPOLOGY. The toolbar action stays and uses the same function.
  • The calculation is in loopstructural/main/fault_topology_calc.py. It has no widgets.

6.7

  • The map2loop table (Fault1, Fault2) has no direction. Fault1 is only the later fault in the layer. The old code used that order as "abutting fault first".
  • Now fault_pair_direction finds the abutting fault from the trace geometry (the fault with an end point on the other trace). Pairs are written as (abutting, other).
  • A pair without a direction (crossing, separate, end to end) stays NONE and is listed in the message bar.
  • Faults keep the layer order, not alphabetical order.
  • A new calculation keeps relationships that already exist. It no longer clears them.

Notes

  • Based on feat/faults-only-model.
  • The end-point test uses 0.1 % of the trace size. map2loop pairs faults within 500 map units, so a trace that stops far short of another one is left for the user to set.

Tests

  • tests/unit/test_fault_topology_calc.py: 15 tests pass.
  • tests/qgis/test_fault_topology_button.py: not run. QGIS is not installed on my machine.
  • Not tested: the full function with map2loop on real data (for example Hamersley).

🤖 Generated with Claude Code

…on from geometry

- The "Calculate topology" button in step 3 runs the calculation with the
  fault layer and name field from the data manager. It shows the result in a
  message bar on the page. No dialog opens. The button is disabled until the
  layer and the field are set.
- Remove FaultTopologyWidget, its .ui file and launchers.FAULT_TOPOLOGY. The
  toolbar action stays and calls the same function.
- Set each pair as (abutting fault, other fault) from the trace geometry. The
  map2loop table has no direction. A pair without a direction is left as NONE
  and listed in the message bar.
- Keep the layer order of the faults, and keep relationships set by the user
  when the topology is calculated again.

This branch has not been deployed

No deployments
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