Commit c7d8c42
feat: add fault-domain-boundary (#112)
* test: pin training-value/isovalue direction agreement for stratigraphic columns
Guards against the swap fixed in 814be12: model_manager.py's per-unit
training value and LoopStructural's get_isovalues() must agree on
which direction values increase, or extracted isosurfaces get labelled
with the wrong unit while keeping correct geometry.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* feat: allow a fault to act as a stratigraphic domain boundary
Lets a stratigraphic-column unconformity be linked to an existing fault
instead of a flat isovalue surface, so the fault's own (non-displacing)
geometry splits the model into two domains -- built via LoopStructural's
create_and_add_domain_fault, reusing the same trace data already ingested
for the fault.
- Stratigraphic column UI gains a "fault" boundary type with a fault
picker; faults used this way are excluded from the fault topology's
FAULTED/ABUTTING and fault-stratigraphy tables, since those assume a
displacement-modelled fault.
- The fault's trace is automatically extended to the model's bounding box
edges along its own trend, and given synthetic strike/dip orientation
constraints, so the interpolated surface spans and properly varies
across the whole domain rather than only being reliable near the
digitised trace.
- A domain-boundary fault is skipped by the ordinary displacement-fault
build loop, and any region a later unconformity incorrectly attaches to
it is stripped after each build (defensive; the root cause is fixed
upstream in LoopStructural core separately).
- Fixes a project-load ordering bug where the model CRS was restored
after the layers that get reprojected against it, silently skipping
reprojection for any layer already in the project's own CRS.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* fix: correct stratigraphic value assignment and domain-fault boundary follow-ups
Several fixes to make domain-fault-bounded stratigraphic columns build and
display correctly:
- update_foliation_features now trains each unit's basal-contact data at
its own max() (the boundary with the next-older unit, i.e. its true
base) instead of min() (the boundary with the next-younger unit, i.e.
its top). Basal contacts represent a unit's base, so training at min()
anchored every unit's own data to the wrong boundary -- confirmed on a
live project where units evaluated into their next-younger neighbour's
bracket instead of their own, and a basement unit with no contact data
of its own never appeared in the model at all.
- Unit thickness now accumulates unconditionally while building that
training data, so an undigitised placeholder unit no longer shifts
every later unit's value by its own thickness.
- Use each fault trace point's own local tangent (rather than one global
best-fit line) when extending a domain-boundary fault to the model's
bounding box and deriving its orientation constraints, so a curved
trace doesn't get flattened into the wrong extrapolation.
- Recompute stratigraphic unit value ranges after restoring a column from
a saved project (both initial load and reload), matching what a fresh
column already gets -- otherwise every restored unit kept the default
(0, inf) range and couldn't be told apart from its neighbours.
- Show the generic details panel for a domain-fault feature instead of an
empty widget.
- Skip an isosurface with no geometry when adding stratigraphic surfaces
to the 3D viewer instead of crashing, since an undigitised unit can
legitimately have no constrained geometry anywhere in the model.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* fix: increase thickness spin box limit + nelements spin box. BUmp default nelements to 50k
* fix: value should be the basal value of a unit
* style: fix black formatting and ruff lint (unnecessary generator)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* fix: training values no longer disagree with get_isovalues() direction
update_foliation_features re-reversed group.units, which get_groups()
already returns in the order get_isovalues() walks, so every basal
contact was trained with the wrong scalar value.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>1 parent e460b30 commit c7d8c42
12 files changed
Lines changed: 962 additions & 54 deletions
File tree
- loopstructural
- gui
- modelling
- geological_model_tab
- stratigraphic_column
- visualisation
- main
- toolbelt
- tests/qgis
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
278 | 282 | | |
279 | 283 | | |
280 | 284 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | | - | |
99 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
100 | 110 | | |
101 | 111 | | |
102 | 112 | | |
103 | | - | |
104 | | - | |
105 | | - | |
| 113 | + | |
106 | 114 | | |
107 | 115 | | |
108 | 116 | | |
| |||
145 | 153 | | |
146 | 154 | | |
147 | 155 | | |
148 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
149 | 159 | | |
150 | 160 | | |
151 | 161 | | |
152 | 162 | | |
153 | 163 | | |
154 | | - | |
155 | | - | |
156 | | - | |
| 164 | + | |
157 | 165 | | |
158 | 166 | | |
159 | 167 | | |
| |||
185 | 193 | | |
186 | 194 | | |
187 | 195 | | |
188 | | - | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
189 | 199 | | |
190 | 200 | | |
191 | 201 | | |
192 | | - | |
| 202 | + | |
193 | 203 | | |
194 | 204 | | |
195 | 205 | | |
| |||
199 | 209 | | |
200 | 210 | | |
201 | 211 | | |
202 | | - | |
203 | | - | |
204 | 212 | | |
205 | | - | |
| 213 | + | |
206 | 214 | | |
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
461 | 462 | | |
462 | 463 | | |
463 | 464 | | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
464 | 476 | | |
465 | 477 | | |
466 | 478 | | |
| |||
Lines changed: 58 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
236 | 240 | | |
237 | 241 | | |
238 | 242 | | |
| |||
263 | 267 | | |
264 | 268 | | |
265 | 269 | | |
266 | | - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
267 | 295 | | |
268 | 296 | | |
269 | 297 | | |
| |||
482 | 510 | | |
483 | 511 | | |
484 | 512 | | |
| 513 | + | |
485 | 514 | | |
486 | 515 | | |
487 | 516 | | |
488 | 517 | | |
489 | 518 | | |
| 519 | + | |
490 | 520 | | |
491 | 521 | | |
492 | 522 | | |
| |||
500 | 530 | | |
501 | 531 | | |
502 | 532 | | |
| 533 | + | |
| 534 | + | |
503 | 535 | | |
504 | 536 | | |
505 | 537 | | |
| |||
605 | 637 | | |
606 | 638 | | |
607 | 639 | | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
608 | 664 | | |
609 | 665 | | |
610 | 666 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
Lines changed: 67 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
29 | | - | |
30 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
58 | 92 | | |
59 | 93 | | |
60 | 94 | | |
61 | 95 | | |
62 | 96 | | |
63 | 97 | | |
64 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
65 | 101 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
64 | 69 | | |
65 | 70 | | |
66 | 71 | | |
| |||
70 | 75 | | |
71 | 76 | | |
72 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
73 | 88 | | |
74 | 89 | | |
75 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
456 | 456 | | |
457 | 457 | | |
458 | 458 | | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
459 | 469 | | |
460 | | - | |
| 470 | + | |
461 | 471 | | |
462 | 472 | | |
463 | 473 | | |
| |||
0 commit comments