From 33aa3950f3ef286841eb18689ef7ede4c61bfc05 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Thu, 8 Oct 2026 14:00:05 +0900 Subject: [PATCH] =?UTF-8?q?feat(B06):=20=EC=8B=A4=EC=A0=9C=EB=A1=9C=20?= =?UTF-8?q?=EC=84=A0=20=EC=9C=A0=EC=9E=85=20=EC=A7=91=EC=88=98=EC=A0=95=20?= =?UTF-8?q?=EB=AA=A8=EC=96=91=EC=9D=84=20=EC=84=A4=EA=B3=84=20=EC=A0=95?= =?UTF-8?q?=EB=B3=B8=EC=97=90=20=EB=82=A8=EA=B9=80=20=E2=80=94=20=EB=8B=A4?= =?UTF-8?q?=EB=8B=A8=20=EB=B2=BD=20=EC=A4=84=20inlet=5Fbasin=20=C2=B7=20?= =?UTF-8?q?=EC=84=9C=EB=B2=84=20=ED=95=A9=EC=B9=A8=20=ED=95=9C=20=EC=B9=B8?= =?UTF-8?q?=20=C2=B7=20=EC=A7=9D=20=EC=8B=9C=ED=97=98(98-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_01EYJJRCfHfdCGNhmXTjQKV7 --- .../B06_Section_Server_Calc_Prebuild.py | 2 ++ B06_Section/B06_Section_Structure_Layouts.ts | 11 ++++++++-- resources/tester/test_b06_pipe_length.py | 20 ++++++++++++++++++- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/B06_Section/B06_Section_Server_Calc_Prebuild.py b/B06_Section/B06_Section_Server_Calc_Prebuild.py index f14a3e08c..34ff50281 100644 --- a/B06_Section/B06_Section_Server_Calc_Prebuild.py +++ b/B06_Section/B06_Section_Server_Calc_Prebuild.py @@ -282,6 +282,8 @@ async def _recompute(project_id: UUID | str, route_id: int) -> int: { "extra_walls": row["extra_walls"], "wall_fill_overlap": row.get("wall_fill_overlap") or {}, + # 실제로 선 유입 집수정 모양(I · L · U | None) — TS `ExtraWallRow.inlet_basin` 짝(98-2) + "inlet_basin": row.get("inlet_basin"), }, ) for row in output.get("extra_walls") or [] diff --git a/B06_Section/B06_Section_Structure_Layouts.ts b/B06_Section/B06_Section_Structure_Layouts.ts index c22bbefc1..b647cdb67 100644 --- a/B06_Section/B06_Section_Structure_Layouts.ts +++ b/B06_Section/B06_Section_Structure_Layouts.ts @@ -16,7 +16,7 @@ import { withoutGuardedFill } from "./B06_Section_UI_Cross_Body_Guard"; import { computeBoxLayout, DEFAULT_BOX_SIDE_ADJUST } from "./B06_Section_UI_Cross_Box_Geom"; import { REVET_EMBED_DEPTH_M } from "./B06_Section_UI_Cross_Culvert_Const"; import { DEFAULT_BASIN_ADJUST, ZERO_ADJUST } from "./B06_Section_UI_Cross_Culvert_Types"; -import type { WallAdjust, WallLayout } from "./B06_Section_UI_Cross_Culvert_Types"; +import type { BasinShape, WallAdjust, WallLayout } from "./B06_Section_UI_Cross_Culvert_Types"; import { computeCardCulvert, culvertLinkFor, @@ -265,6 +265,8 @@ export interface ExtraWallRow { chainage_m: number; extra_walls: BuiltExtraWall[]; wall_fill_overlap: Record; + /** 실제로 선 유입 집수정 모양(patch 형식 · 자동 지형 규칙 결과) · 안 섰으면 null — B08 관보호공(98-2). */ + inlet_basin: BasinShape | null; } /** @@ -315,7 +317,12 @@ export function extraWallRows(sections: readonly CrossSection[]): ExtraWallRow[] wall_fill_overlap[wall.role] = Number(wallBodyInFillM2(wall.points, areaInput).toFixed(3)); } } - rows.push({ chainage_m: section.chainage_m, extra_walls: walls, wall_fill_overlap }); + rows.push({ + chainage_m: section.chainage_m, + extra_walls: walls, + wall_fill_overlap, + inlet_basin: culvert.basin?.shape ?? null, + }); } return rows; } diff --git a/resources/tester/test_b06_pipe_length.py b/resources/tester/test_b06_pipe_length.py index b1fbefd21..f49d38916 100644 --- a/resources/tester/test_b06_pipe_length.py +++ b/resources/tester/test_b06_pipe_length.py @@ -101,7 +101,25 @@ def test_소유_측점에만_싣는다(): layouts = _LAYOUTS.read_text(encoding="utf-8") assert "pipeOwnerChainage" in layouts, "소유 측점을 안 가리고 있다" assert "section.culvert?.chainage_m" in layouts, "관이 놓인 자리를 안 읽고 있다" - py = (PROJECT_ROOT / "B06_Section" / "B06_Section_Engine_Culvert.py").read_text(encoding="utf-8") + py = (PROJECT_ROOT / "B06_Section" / "B06_Section_Engine_Culvert.py").read_text( + encoding="utf-8" + ) ts = (PROJECT_ROOT / "common_util" / "common_util_culvert_sets.ts").read_text(encoding="utf-8") assert '"chainage_m": pipe_chainage' in py assert "chainage_m: pipeChainage" in ts + + +def test_집수정_실제_모양이_같은_길로_정본에_실린다(): + """98-2 — 실제로 선 집수정 모양(patch · 자동 지형 규칙 결과)이 다단 벽과 같은 줄로 정본에 감. + + TS 가 줄에 싣고(`ExtraWallRow.inlet_basin`) 서버가 합칠 때 받아야 함 — 한쪽만 있으면 조용히 버려짐. + """ + layouts = _LAYOUTS.read_text(encoding="utf-8") + block = layouts[layouts.index("export interface ExtraWallRow") :] + assert "inlet_basin: BasinShape | null" in block[: block.index("}")] + assert "inlet_basin: culvert.basin?.shape ?? null" in layouts + prebuild = (PROJECT_ROOT / "B06_Section" / "B06_Section_Server_Calc_Prebuild.py").read_text( + encoding="utf-8" + ) + merged = prebuild[prebuild.index("extra_walls = [") :][:900] + assert '"inlet_basin": row.get("inlet_basin")' in merged