feat(B06): 실제로 선 유입 집수정 모양을 설계 정본에 남김 — 다단 벽 줄 inlet_basin · 서버 합침 한 칸 · 짝 시험(98-2)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EYJJRCfHfdCGNhmXTjQKV7
This commit is contained in:
@@ -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 []
|
||||
|
||||
@@ -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<string, number>;
|
||||
/** 실제로 선 유입 집수정 모양(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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user