fix(B06): 세월교 본체 판정면 = 바닥판 밑 ~ 측벽 상단 사각형 하나(89-2)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYJJRCfHfdCGNhmXTjQKV7
This commit is contained in:
2026-10-08 12:02:28 +09:00
co-authored by Claude Opus 5.5
parent 93fe8876c6
commit 7d761e39af
+24 -9
View File
@@ -145,15 +145,30 @@ export function appendFordOverlay(
// 관·채움이 벽 위에 겹쳐 클릭을 가로챈다 — 투명 겹면을 맨 위에 얹어 벽을 고른다
// (배수관 기슭막이 `culvert-revet-hit`와 같은 수법).
if (onSelectWall) {
// 본체(바닥판 · 관) 판정면 — 벽 판정면보다 먼저 깔아 겹친 자리는 벽이 먹는다(66-1).
for (const points of [layout.slabBridge, layout.pipe.outer]) {
const hit = polygon(points, "b06-chart__culvert-revet-hit", "세월교 본체 선택");
hit.addEventListener("click", (event) => {
event.stopPropagation();
onSelectWall("body");
});
layer.append(hit);
}
// 본체 판정면 = 바닥판 밑 ~ 측벽 상단 최고 사각형 하나(관 위 성토 · 벽-관 사이 포함 · 89-2) —
// 측벽 판정면 · 흙막이(뒤에 그리는 배관 오버레이)가 위에 얹혀 겹친 자리는 그쪽이 먹는다(66-1).
const offsets = [
...layout.slabBridge,
...layout.sides.flatMap((side) => side.parts.flatMap((part) => part.points)),
].map((point) => point.offset);
const top = Math.max(...layout.sides.map((side) => side.top.elevation));
const bottom = Math.min(...layout.slabBridge.map((point) => point.elevation));
const [from, to] = [Math.min(...offsets), Math.max(...offsets)];
const bodyHit = polygon(
[
{ offset: from, elevation: top },
{ offset: to, elevation: top },
{ offset: to, elevation: bottom },
{ offset: from, elevation: bottom },
],
"b06-chart__culvert-revet-hit",
"세월교 본체 선택",
);
bodyHit.addEventListener("click", (event) => {
event.stopPropagation();
onSelectWall("body");
});
layer.append(bodyHit);
// 측벽 판정면 = ㄴ(벽 + 바닥판)을 감싸는 가상 사각형(79-6) — 얇은 벽만 잡던 것을 넓힘.
for (const side of layout.sides) {
const points = side.parts.flatMap((part) => part.points);