From 2ffff11087e24394bf4247c1eb75d4b0102f326f Mon Sep 17 00:00:00 2001 From: umsangdon Date: Tue, 27 Oct 2026 20:42:54 +0900 Subject: [PATCH] =?UTF-8?q?fix(567-1):=20E03=20=EB=8B=A8=EB=A9=B4=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=20=EC=9E=84=EA=B3=84=EB=A9=B4=20=EB=B0=A9?= =?UTF-8?q?=EB=B2=95=20=EC=9D=B4=EB=A6=84=20=E2=80=94=20=ED=9B=84=EB=B3=B4?= =?UTF-8?q?=20=EA=B3=A0=EB=A6=AC=20=EB=B3=80=EC=88=98=EA=B0=80=20=ED=8C=90?= =?UTF-8?q?=EC=A0=95=20=EB=B0=A9=EB=B2=95=EC=9D=84=20=EB=8D=AE=EB=8D=98=20?= =?UTF-8?q?=EA=B2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- E03_StabSection/E03_StabSection_View.py | 4 ++-- resources/tester/test_567_1_stab_search.py | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/E03_StabSection/E03_StabSection_View.py b/E03_StabSection/E03_StabSection_View.py index 26ee18526..cb1e6bbb4 100644 --- a/E03_StabSection/E03_StabSection_View.py +++ b/E03_StabSection/E03_StabSection_View.py @@ -282,9 +282,9 @@ def section_view( methods = result.get("methods") or {} method, best, _circ, _check = _governing(case) candidates = [] - for method, found in methods.items(): + for name, found in methods.items(): for kind in ("circular", "noncircular"): - surface = _surface(found.get(kind), method) + surface = _surface(found.get(kind), name) if surface and surface["fs"] is not None: candidates.append(surface) side_row = (row["cases"].get(case["condition"]) or {}).get(case["side"]) or {} diff --git a/resources/tester/test_567_1_stab_search.py b/resources/tester/test_567_1_stab_search.py index ae684089f..5db7156b1 100644 --- a/resources/tester/test_567_1_stab_search.py +++ b/resources/tester/test_567_1_stab_search.py @@ -168,3 +168,13 @@ def test_edge_flag(): row = _row(_case(1.3, ends=ends)) assert row["cases"]["wet"]["right"]["edge"] is edge assert view.summarize([_row(_case(1.3, ends=[-30.5, 40.0]))], ["wet"])["wet"]["edge"] == 1 + + +def test_section_view_critical_is_governing_surface(): + # 단면 화면 임계면 = 판정 면(방법 이름도) — 후보 고리가 방법 이름을 덮지 않음 + case = _case(1.3, 1.0, 1.05) + out = {"cases": [case]} + row = _row(case) + model = {"materials": [], "regions": [], "surface": []} + a = view.section_view(row, out, model, {})["analyses"][0] + assert (a["critical"]["method"], a["critical"]["fs"]) == ("spencer", 1.0)