Files
Aislo/B06_Section/B06_Section_UI_Cross_Excavation.ts
T
eomsangdonandClaude Opus 5.5 3b5ad313df merge(472-3): origin/main_laptop_1(518-2 B06 관 · BOX · 세월교 logic) 합침 · 518-3 과 양쪽 새 logic 경로로 살림 · 기하 끌림 빈 목록
- 충돌 24 파일 = import 줄 다툼 — 518-2 새 경로(Cross_Culvert · Culvert_Geom · Extra · Wire · Types · Box_Geom · Ford_Geom · Ford_Pavement) + 518-3 새 경로(Cross_Body_Guard · Wall_Geom · Wall_Hatch_Geom · Excavation_Geom · Revetment_Geom · Structure_Layouts · Route_Carry_Patch)
- 518-2 logic 셋이 부르던 UI_Cross_Wall · Wall_Hatch · Body_Guard = 518-3 logic 경로로 · 518-3 새 logic 넷의 옛 Culvert_Types · Extra 경로 = 518-2 logic 으로
- test_472_3 GEOMETRY_PULLS 남은 3 줄(Design_Surface · Excavation · Wall_Hatch) 걷음 = 빈 목록
- Corridor_Structures prettier
- 확인 = 518-1 · 518-2 · 518-3 고친 시험 + golden_472 73 파일 444 통과 · typecheck 0 · design-calc · corridor 묶음 · 옛 판(1d5d63875) ↔ 합친 판 덧그림 대조 938 측점 같음

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 19:45:10 +09:00

59 lines
2.7 KiB
TypeScript

/* =============================================================================
* B06_Section_UI_Cross_Excavation.ts
* 횡단도에 **벽 터파기 선**을 얹는다 — 관 터파기 선은 그리지 않음(사용자 10-7).
*
* 왜 있나 — 「터파기가 현재 횡단도에서 표현이 안 된다」가 사용자 지적이었다. 수량을
* 세기 전에 **도면에 그것이 보여야** 한다.
* 자리 · 폭 · 깊이 = `logic/B06_Section_Cross_Excavation_Geom`(472-3).
*
* ⚠ 근거의 급이 다르므로 **노티스를 갈라 적는다** — 값은 `common_util_excavation` 한 곳에서
* 온다(파이썬 짝과 거울 시험으로 묶여 있다). 여기서는 **그리기만** 한다.
* 관 : 법정 시방서 표(KCS 44 40 10 그림 3.2-1)
* 벽 : 법정 근거 없음 — 실무 정본 식(구조도 기슭막이 xls)
* ⚠ **비탈을 주지 않는다 — 수직으로 그린다.** 정본 식에 기울기 항이 없다.
* ========================================================================== */
import { BASIS_WALL } from "@util/common_util_excavation";
import type { WallLayout } from "./logic/B06_Section_Cross_Culvert_Types";
import { wallTrench } from "./logic/B06_Section_Cross_Excavation_Geom";
const SVG_NS = "http://www.w3.org/2000/svg";
function trenchPath(layer: SVGElement, corners: Array<[number, number]>, tooltip: string): void {
const line = document.createElementNS(SVG_NS, "polyline");
line.setAttribute("points", corners.map(([px, py]) => `${px},${py}`).join(" "));
line.setAttribute("class", "b06-chart__excavation");
const title = document.createElementNS(SVG_NS, "title");
title.textContent = tooltip;
line.append(title);
layer.append(line);
}
/**
* 벽 터파기 — 벽 바닥선 아래로 **수직**(자리 = `wallTrench`).
* `foundation` 이 비어 있으면 **그리지 않는다** — 사용자가 고르기 전에는 근거가 없다.
*/
export function appendWallTrench(
layer: SVGElement,
wall: WallLayout,
foundation: "기초유" | "기초버림" | null,
x: (offset: number) => number,
toDisplayY: (elevation: number) => number,
): { widthM: number; depthM: number } | null {
const trench = wallTrench(wall, foundation);
if (!trench) return null;
const { left, right, top, bottom, widthM, depthM } = trench;
trenchPath(
layer,
[
[x(left), toDisplayY(top)],
[x(left), toDisplayY(bottom)],
[x(right), toDisplayY(bottom)],
[x(right), toDisplayY(top)],
],
`${foundation} 터파기 폭 ${widthM.toFixed(2)}m · 깊이 ${depthM.toFixed(2)}m (수직)\n` +
`품셈에 규정이 없어 실무 관행으로 정한 값 — ${BASIS_WALL}`,
);
return { widthM, depthM };
}