From 2abf70eeac5fe33b7425a22f01b1328e69f4eb52 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sat, 10 Oct 2026 13:12:49 +0900 Subject: [PATCH] =?UTF-8?q?test(b06):=20=EB=82=A8=EC=9D=80=20=EC=8B=9C?= =?UTF-8?q?=ED=97=98=20=EB=B9=A8=EA=B0=95=20=EB=91=98=20=EC=A0=95=EB=A6=AC?= =?UTF-8?q?=20=E2=80=94=2091=20=EC=86=8C=EB=8B=A8=20=EA=B8=B0=EB=8C=80?= =?UTF-8?q?=EA=B0=92=20178-2=20=EA=B7=9C=EC=B9=99=20=C2=B7=20B07=20?= =?UTF-8?q?=ED=9A=A1=EB=8B=A8=20=EB=B2=94=EC=9C=84=20=EB=B2=88=EB=93=A4=20?= =?UTF-8?q?document=20=EA=B0=80=EB=93=9C(186-2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - test_91: 구조물 끝 절토선엔 소단 없음(소단 = 성토 사면 한 단 · 178-2) - Cross_Panel_Base: document 없을 때 pointerdown 듣개 안 붙임 — Node 번들(B07 횡단 범위) 실행 살림 · 화면 동작 그대로 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01F3mdb91125mPoC6tpsQx4P --- B06_Section/B06_Section_UI_Cross_Panel_Base.ts | 16 +++++++++------- resources/tester/test_91_ground_free.py | 12 ++++++------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/B06_Section/B06_Section_UI_Cross_Panel_Base.ts b/B06_Section/B06_Section_UI_Cross_Panel_Base.ts index f8b258525..08da4506a 100644 --- a/B06_Section/B06_Section_UI_Cross_Panel_Base.ts +++ b/B06_Section/B06_Section_UI_Cross_Panel_Base.ts @@ -75,13 +75,15 @@ export function buildPanelShell(onClose: () => void): { /** 마지막으로 누른 자리 — 방향키는 **초점 있는 쪽만** 받는다(계획서 24-3b). 횡단 보기에서 조정창과 * 종단도(▲▼ 계획고)가 한 화면에 함께 있어, 종단도를 누른 뒤에는 조정창이 방향키를 넘긴다. */ let lastPointer: Element | null = null; -document.addEventListener( - "pointerdown", - (event) => { - lastPointer = event.target instanceof Element ? event.target : null; - }, - true, -); +// 서버 Node 번들(B07 횡단 범위)도 이 파일을 실음 — document 없으면 듣개 안 붙임(186-2) +if (typeof document !== "undefined") + document.addEventListener( + "pointerdown", + (event) => { + lastPointer = event.target instanceof Element ? event.target : null; + }, + true, + ); /** 방향키가 종단도 몫인가 — 마지막으로 누른 자리가 종단도 안이면 참. */ export function arrowsBelongToProfile(): boolean { diff --git a/resources/tester/test_91_ground_free.py b/resources/tester/test_91_ground_free.py index 3ae13bcf1..70f2fda8a 100644 --- a/resources/tester/test_91_ground_free.py +++ b/resources/tester/test_91_ground_free.py @@ -117,9 +117,9 @@ def test_절토_쪽_배관_유출_벽_뒤_절토사면_살아남(fit: dict) -> N assert _knee(cut) and cut["endGap"] < 0.01 -def test_소단은_구조물_끝에서_새로_셈(fit: dict) -> None: - legs = fit["cutOutletBerm"]["legs"] - flat = next(i for i, leg in enumerate(legs) if leg["ratio"] is None) - assert sum(leg["slant"] for leg in legs[:flat]) == pytest.approx(3.0, abs=1e-3) - assert legs[flat]["run"] == pytest.approx(0.5, abs=1e-3) - assert fit["cutOutletBerm"]["endGap"] < 0.01 +def test_구조물_끝_절토엔_소단_없음(fit: dict) -> None: + """소단 = 성토 사면 한 단(178-2) — 측점에 소단이 있어도 구조물 끝 절토선은 그대로.""" + berm = fit["cutOutletBerm"] + assert all(leg["ratio"] is not None for leg in berm["legs"]) + assert berm["legs"] == fit["cutOutlet"]["legs"] + assert berm["endGap"] < 0.01