feat: named case-result load combinations with full GUI support

Snapshots the current development tree, headlined by proper load
combinations (user request): a reusable LoadCombination entity of
weighted completed static-case results (e.g. 1.2xDead + 1.6xLive).

- core: LoadCombination/LoadCombinationItem entities, Project
  integration (lookup, unique ids, reference validation)
- services: combinations.py (linear superposition + envelope),
  exported via services __init__
- commands: undoable Add/Delete/Update for combinations
- GUI: Load Combinations manager dialog, Run-dialog evaluation,
  envelope display in Results panel, Combinations tab in Table dock
- tests: unit coverage (validation, math, error paths) + integration
  superposition check vs a single factored run
This commit is contained in:
smill 2026-09-11 13:19:59 -04:00
commit f361fee969
560 changed files with 178701 additions and 0 deletions

View file

@ -0,0 +1,40 @@
"""GUI tests for equalDOF and display-option dialogs."""
from __future__ import annotations
import pytest
pytest.importorskip("PySide6")
from otko.views.dialogs.assign_equal_dof import AssignEqualDOFDialog
from otko.views.dialogs.display_options import DisplayOptionsDialog
@pytest.mark.gui
def test_assign_equal_dof_dialog_requires_explicit_dof_choice(qtbot) -> None: # type: ignore[no-untyped-def]
dlg = AssignEqualDOFDialog([3, 4], ndf=3)
qtbot.addWidget(dlg)
with pytest.raises(ValueError, match="at least one DOF"):
dlg.constraint()
dlg2 = AssignEqualDOFDialog([3, 4], ndf=3, suggested_dofs=(2, 3))
qtbot.addWidget(dlg2)
c = dlg2.constraint()
assert c.retained_node == 3
assert c.constrained_node == 4
assert c.dofs == (2, 3)
@pytest.mark.gui
def test_display_options_dialog_round_trip(qtbot) -> None: # type: ignore[no-untyped-def]
dlg = DisplayOptionsDialog(
show_node_labels=False,
show_element_labels=True,
)
qtbot.addWidget(dlg)
dlg._show_node_labels.setChecked(True)
dlg._show_element_labels.setChecked(False)
assert dlg.values() == (True, False)