From 46a632c8c3439be86b13608f5af3b3695d72a483 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Mon, 5 Oct 2026 23:28:34 +0900 Subject: [PATCH] =?UTF-8?q?fix(B06):=20=EB=B0=95=EC=8A=A4=EC=95=94?= =?UTF-8?q?=EA=B1=B0=20=EC=9C=A0=EC=9E=85=C2=B7=EC=9C=A0=EC=B6=9C=20?= =?UTF-8?q?=EA=B5=AC=EC=A1=B0=20=EC=97=86=EC=9D=8C=C2=B7=EB=82=A0=EA=B0=9C?= =?UTF-8?q?=EB=B2=BD=C2=B7=ED=9D=99=EB=A7=89=EC=9D=B4=20=E2=80=94=20?= =?UTF-8?q?=EB=82=A0=EA=B0=9C=EB=B2=BD=EB=A7=8C=20=EC=84=B8=EC=9B=80=20(PL?= =?UTF-8?q?AN=2052-2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01W4uKaV4ZBhsJN4GHG7yRj4 --- B06_Section/B06_Section_Engine_Culvert.py | 3 ++- common_util/common_util_culvert_sets.ts | 3 ++- resources/tester/test_b06_box_set.py | 8 ++++++++ resources/tester/test_b06_culvert_sets_mirror.py | 8 +++++++- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/B06_Section/B06_Section_Engine_Culvert.py b/B06_Section/B06_Section_Engine_Culvert.py index ce97262f9..87fb59003 100644 --- a/B06_Section/B06_Section_Engine_Culvert.py +++ b/B06_Section/B06_Section_Engine_Culvert.py @@ -327,7 +327,8 @@ def _wing_spec(values: dict[str, Any], defaults: dict[str, Any], side: str) -> d height = _number( values.get(f"{prefix}_height_m"), _number(defaults.get(f"{prefix}_height_m"), 0.0) ) - installed = str(install or "").strip() != "없음" + # BOX암거 유입·유출 구조(표 02) — 없음 · 날개벽 · 흙막이 · 옛 값 있음 = 날개벽. 날개벽만 세움. + installed = str(install or "").strip() not in ("없음", "흙막이") extend = (length or 0.0) * math.cos(math.radians(angle or 0.0)) if installed else 0.0 return { "installed": installed, diff --git a/common_util/common_util_culvert_sets.ts b/common_util/common_util_culvert_sets.ts index f9055b0ac..d53993a58 100644 --- a/common_util/common_util_culvert_sets.ts +++ b/common_util/common_util_culvert_sets.ts @@ -241,7 +241,8 @@ function wingSpec( const length = num(values[`${prefix}_length_m`], num(defaults[`${prefix}_length_m`], 0.0)); const angle = num(values[`${prefix}_angle_deg`], num(defaults[`${prefix}_angle_deg`], 45.0)); const height = num(values[`${prefix}_height_m`], num(defaults[`${prefix}_height_m`], 0.0)); - const installed = String(install ?? "").trim() !== "없음"; + // BOX암거 유입·유출 구조(표 02) — 없음 · 날개벽 · 흙막이 · 옛 값 있음 = 날개벽. 날개벽만 세움. + const installed = !["없음", "흙막이"].includes(String(install ?? "").trim()); return { installed, height_m: height, diff --git a/resources/tester/test_b06_box_set.py b/resources/tester/test_b06_box_set.py index c88753e6c..ca213b8a2 100644 --- a/resources/tester/test_b06_box_set.py +++ b/resources/tester/test_b06_box_set.py @@ -45,6 +45,14 @@ def test_box_wing_extends_slab() -> None: assert spec["wing_in"]["slab_extend_m"] == round(2 * math.cos(math.radians(45)), 3) +def test_box_structure_choices() -> None: + """유입·유출 구조(표 02) — 날개벽 · 옛 값 있음만 날개벽을 세움 · 흙막이 · 없음은 안 세움.""" + for value, installed in (("날개벽", True), ("있음", True), ("흙막이", False), ("없음", False)): + spec = _box_set({"wing_in": value, "wing_in_length_m": 2}) + assert spec["wing_in"]["installed"] is installed + assert (spec["wing_in"]["slab_extend_m"] > 0) is installed + + def test_attach_box_only_owner_station(tmp_path: Path) -> None: """BOX암거는 **소유 측점 한 곳에만** `box` 키로 붙는다(2026-08-25 사용자 확정). diff --git a/resources/tester/test_b06_culvert_sets_mirror.py b/resources/tester/test_b06_culvert_sets_mirror.py index b92cc6499..9ddacc95d 100644 --- a/resources/tester/test_b06_culvert_sets_mirror.py +++ b/resources/tester/test_b06_culvert_sets_mirror.py @@ -58,7 +58,13 @@ POINTS = [ { "chainage_m": 80.0, "facility": "box_culvert", - "options": {"body_width_m": 3.0, "body_height_m": 2.5, "wing_out_length_m": 2.0}, + "options": { + "body_width_m": 3.0, + "body_height_m": 2.5, + "wing_in": "날개벽", + "wing_out": "흙막이", + "wing_out_length_m": 2.0, + }, }, { "chainage_m": 100.0,