From e9ad8cdfaf7d686ad2650fd4b9ea7688b74cdaf7 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Mon, 7 Sep 2026 07:25:28 +0900 Subject: [PATCH] =?UTF-8?q?fix(B06):=20=EB=8B=A4=EB=8B=A8=20=EA=B8=B0?= =?UTF-8?q?=EC=8A=AD=EB=A7=89=EC=9D=B4=20=EC=84=B1=ED=86=A0=EB=B6=80?= =?UTF-8?q?=EC=84=A0=EC=9D=84=20=EB=A9=B4=EC=A0=81=20=ED=8A=B8=EB=A6=BC?= =?UTF-8?q?=EC=97=90=20=EB=84=A3=EC=9D=8C=20=E2=80=94=20=EB=8B=A8=20?= =?UTF-8?q?=EC=88=98=EA=B0=80=20=EB=AC=BC=EB=9F=89=EC=97=90=20=EB=B0=98?= =?UTF-8?q?=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PLAN 3-5 ⓑ (2026-09-07 사용자 확정 「옹벽도 수량이 변경되어야 함」). 그동안 면적 폐회로의 바깥 경계가 **기준벽 사면(노견~벽 상단)** 까지만이었고 그 바깥은 원지반으로 봐서 면적 0 이었음. 그래서 단을 몇 개 올려도 절·성토가 한 자리도 안 변했음. - 화면이 그리는 선(`outletFill.segments`·`basinFill.segments`)을 트림 사면에 이어 붙임. 「면적은 실제로 그려지는 설계선을 따른다」는 기존 원칙과 같은 자리로 맞춘 것. - 그리지 않는 `cut` 갈래(벽이 원지반에 묻혀 성토가 없는 자리)는 뺌 — 화면과 같은 규칙. 실측(용화 route 165, 새 트림 대 옛 트림): 81.77m 0단 성토 8.4247 → 10.9027(+2.478) · 1단 이상 10.6743(+2.250) · 절토 불변 244.14m 지형이 단을 거부(0단) · 성토 3.3492 → 4.0511(+0.702) · 절토 불변 423.55m 벽이 묻힌 자리(cut) · 성토 3.6145 그대로 · 변화 없음 → 단이 서면 성토가 줄고(10.90 → 10.67), 단이 안 서는 자리도 **벽 바깥 성토가 이제 잡힘**. 후자는 단과 무관한 변화라 보고에 따로 적었음. 파이썬 짝은 없음 — 구조물 트림 면적은 TS 한 벌이고 서버는 그것을 Node 로 돌림 (`B06_Section_Engine_Areas.py` 는 구조물 없는 표준 계산). tsc 통과·시험 500 통과. Co-Authored-By: Claude Opus 5 (1M context) --- .../B06_Section_UI_Cross_Culvert_Geom.ts | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/B06_Section/B06_Section_UI_Cross_Culvert_Geom.ts b/B06_Section/B06_Section_UI_Cross_Culvert_Geom.ts index 6e1d1b33..124858b3 100644 --- a/B06_Section/B06_Section_UI_Cross_Culvert_Geom.ts +++ b/B06_Section/B06_Section_UI_Cross_Culvert_Geom.ts @@ -49,6 +49,7 @@ import { inletChoiceAvailability, resolveBasinChoice, } from "./B06_Section_UI_Cross_Culvert_Basin"; +import type { OutletExtrasResult } from "./B06_Section_UI_Cross_Culvert_Extra"; import { buildExtrasAt, inletGroundConnector } from "./B06_Section_UI_Cross_Culvert_Extra"; import type { FillSlopeSegment, WallVertical } from "./B06_Section_UI_Cross_Culvert_Solve"; import { @@ -644,6 +645,25 @@ export function computeCulvertLayout( trimMinSlope = { points: slope.points }; } } + // 다단 기슭막이의 성토부선까지 트림에 넣는다 — 넣지 않으면 단을 올려도 폐회로가 그대로라 + // **물량이 안 바뀐다**(2026-09-07 사용자 확정). 기준벽 사면은 노견~벽 상단까지고, 그 + // 바깥은 지금까지 원지반으로 봐서 면적이 0이었다. 화면이 그리는 선(`outletFill.segments`)과 + // 같은 선을 면적도 보게 맞춘다 — 그리지 않는 `cut` 갈래(벽이 원지반에 묻힌 자리)는 뺀다. + const drawnFillPoints = (result: OutletExtrasResult): OffsetPoint[] => + result.segments + .filter((segment) => segment.kind !== "cut") + .flatMap((segment) => segment.points); + const extendTrimSlope = (points: OffsetPoint[], outward: number): void => { + if (!points.length) return; + if (outward > 0) { + trimMaxSlope = { points: [...(trimMaxSlope?.points ?? []), ...points] }; + } else { + trimMinSlope = { points: [...(trimMinSlope?.points ?? []), ...points] }; + } + }; + extendTrimSlope(drawnFillPoints(extras), outletInfo.outward); + extendTrimSlope(drawnFillPoints(basinExtras), inletInfo.outward); + const outletWallFinal = walls.find((wall) => wall.role === "outlet") ?? null; const outletSlope = outletWallFinal ? slopeOf(outletWallFinal) : null;