From 9cb7078e4fd8fcedfb41e09c67d5763033b3ffc7 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sat, 10 Oct 2026 13:47:11 +0900 Subject: [PATCH] =?UTF-8?q?feat(B06):=20=EB=B3=B4=EB=9D=BC=20=EC=84=A0=20?= =?UTF-8?q?=EA=B3=A0=EB=A6=84=20=EC=A0=95=EB=B3=B4=20=EA=B8=80=20=E3=80=8C?= =?UTF-8?q?=EA=B8=B8=EC=9D=B4=20=C2=B7=20=EA=B2=BD=EC=82=AC=EB=B9=84?= =?UTF-8?q?=EC=9C=A8=20=C2=B7=20=EC=88=98=ED=8F=89=20=C2=B7=20=EB=86=92?= =?UTF-8?q?=EC=9D=B4=E3=80=8D=20=EC=B0=A8=EB=A1=80=20(195-1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_018jonfdxn1Xit9bdkNJpE4G --- .../B06_Section_UI_Cross_Design_Pick.ts | 8 ++++---- .../B06_Section_UI_Style_Cross_Controls.css | 2 +- resources/tester/test_137_design_pick.py | 8 ++++---- resources/tester/test_195_1_pick_label.py | 19 +++++++++++++++++++ 4 files changed, 28 insertions(+), 9 deletions(-) create mode 100644 resources/tester/test_195_1_pick_label.py diff --git a/B06_Section/B06_Section_UI_Cross_Design_Pick.ts b/B06_Section/B06_Section_UI_Cross_Design_Pick.ts index b53a16ec9..7c20a317b 100644 --- a/B06_Section/B06_Section_UI_Cross_Design_Pick.ts +++ b/B06_Section/B06_Section_UI_Cross_Design_Pick.ts @@ -201,7 +201,7 @@ export function visiblePieces(pieces: DesignPiece[], occluders: CrossPoint[][]): return out; } -/** 치수 — 사면길이 · 수평 · 높이(m) · 구배(사면 1:n · 노면 %). */ +/** 치수 — 길이 · 수평 · 높이(m) · 경사비율(사면 1:n · 노면 %). */ export function pieceMeasure( piece: DesignPiece, zone: CrossZone, @@ -219,13 +219,13 @@ export function pieceMeasure( return { lengthM: Math.hypot(horizontalM, heightM), horizontalM, heightM, grade }; } -/** 두 줄(151-1) — 1줄 = 길이 · 수평 · 2줄 = 높이 · 구배(줄바꿈 글자로 가름). */ +/** 두 줄(151-1 · 195-1) — 1줄 = 길이 · 경사비율 · 2줄 = 수평 · 높이(줄바꿈 글자로 가름). */ export function pieceLabel(design: ZoneDesign, piece: DesignPiece): string { const { zone } = pieceZone(design, piece); const m = pieceMeasure(piece, zone); return ( - `${zone === "road" ? "길이" : "사면길이"} ${m.lengthM.toFixed(2)}m · ` + - `수평 ${m.horizontalM.toFixed(2)}m\n높이 ${m.heightM.toFixed(2)}m · ${m.grade}` + `길이 ${m.lengthM.toFixed(2)}m · 경사비율 ${m.grade}\n` + + `수평 ${m.horizontalM.toFixed(2)}m · 높이 ${m.heightM.toFixed(2)}m` ); } diff --git a/B06_Section/B06_Section_UI_Style_Cross_Controls.css b/B06_Section/B06_Section_UI_Style_Cross_Controls.css index f4fee5c15..778418876 100644 --- a/B06_Section/B06_Section_UI_Style_Cross_Controls.css +++ b/B06_Section/B06_Section_UI_Style_Cross_Controls.css @@ -223,7 +223,7 @@ background: color-mix(in srgb, var(--color-surface-raised) 88%, transparent); } -/* 고른 보라 선 치수(137-2) — 카드 폭 무관 늘 [+ − ⤢] 왼쪽(179-1) · 두 줄(151-1 · 길이 · 수평 / 높이 · 구배). */ +/* 고른 보라 선 치수(137-2) — 카드 폭 무관 늘 [+ − ⤢] 왼쪽(179-1) · 두 줄(151-1 · 길이 · 경사비율 / 수평 · 높이). */ .b06-cross-card__line-dims { align-self: center; padding: 1px var(--spacing-4); diff --git a/resources/tester/test_137_design_pick.py b/resources/tester/test_137_design_pick.py index 0e17f6d7e..af7412b9a 100644 --- a/resources/tester/test_137_design_pick.py +++ b/resources/tester/test_137_design_pick.py @@ -57,9 +57,9 @@ def test_치수_사면길이_수평_높이_구배(out) -> None: assert abs(fill["lengthM"] - 13**0.5) < 1e-9 assert out["measure"]["road"]["grade"] == "2.0%" # 노면 = % assert out["measure"]["flatSlope"] == "0.0%" - # 두 줄(151-1) — 1줄 = 길이 · 수평 · 2줄 = 높이 · 구배 - assert out["label"]["fill"] == "사면길이 3.61m · 수평 3.00m\n높이 2.00m · 1:1.50" - assert out["label"]["road"] == "길이 2.50m · 수평 2.50m\n높이 0.05m · 2.0%" + # 두 줄(151-1 · 195-1) — 1줄 = 길이 · 경사비율 · 2줄 = 수평 · 높이 + assert out["label"]["fill"] == "길이 3.61m · 경사비율 1:1.50\n수평 3.00m · 높이 2.00m" + assert out["label"]["road"] == "길이 2.50m · 경사비율 2.0%\n수평 2.50m · 높이 0.05m" def test_구역_도로_절토_성토(out) -> None: @@ -84,7 +84,7 @@ def test_실제_배관_측점_조각과_판정_선(out) -> None: assert real["hitsBelowStructure"] is True # 구조물 판정면이 위 assert real["picked"] == [0] and real["stopped"] is True # 카드 고름으로 안 번짐 assert real["activeCount"] == 1 and real["activeIndex"] == 1 - assert real["labelOn"]["hidden"] is False and real["labelOn"]["text"].startswith("사면길이 ") + assert real["labelOn"]["hidden"] is False and real["labelOn"]["text"].startswith("길이 ") assert real["labelOff"] == {"hidden": True, "text": ""} assert set(real["zones"]) <= {"road", "cut", "fill"} diff --git a/resources/tester/test_195_1_pick_label.py b/resources/tester/test_195_1_pick_label.py new file mode 100644 index 000000000..428c06d64 --- /dev/null +++ b/resources/tester/test_195_1_pick_label.py @@ -0,0 +1,19 @@ +"""PLAN 195-1 — B06 보라 선 고름 정보 글: 「사면 길이」 → 「길이」 · 차례 = 길이 → 경사비율 → 수평 → 높이. + +짝: `B06_Section/B06_Section_UI_Cross_Design_Pick.ts` `pieceLabel`. 실제 TS 를 `helper_137_design_pick.cjs` 가 Node 로 돌린다. +""" + +from __future__ import annotations + +import re + +from test_137_design_pick import out # noqa: F401 — 같은 Node 도우미 결과를 씀 + + +def test_글_차례_넷_길이_경사비율_수평_높이(out) -> None: # noqa: F811 + for key in ("fill", "road"): + label = out["label"][key] + assert "사면" not in label + names = re.findall(r"(길이|경사비율|수평|높이)", label) + assert names == ["길이", "경사비율", "수평", "높이"], label + assert out["label"]["fill"].startswith("길이 ")