feat(B06): 세월교 · 박스 흙막이 횡단 그림 — 관보호공 흙막이와 같은 벽 · 자리 · 연동 · 경사(73-4)
- 유입 · 유출 구조 「흙막이」면 배관 흙막이와 같은 세트(관 숨김 · body)를 같은 측점 culvert 자리에 함께 얹음(파이썬 _guard_set ↔ TS guardSet 짝 · 거울 시험) - 자동 자리 = 벽 전면이 관(세월교) · 본체(박스) 끝 · 좌우 x 는 그 자리 기준(본체를 늘리면 벽도 따라감) · 상하 d 는 배관과 같음 - 연동 옆 측점 · 3D 연동 해제 자리는 본체 기준 x 를 절대값으로 넘겨 받음 · 3D 만료 해시에 흙막이 값 포함 - 설계선 트림 = 벽 선 쪽은 흙막이 · 안 선 쪽은 본체 · 벽 선 쪽 본체 성토선은 걷음(두 줄 방지) · 관 연장은 안 실음 - 좌측 폼 → 캐시: 세트 다시 짓기 · 높이 · 형태 · 추가 흙막이 상자 수 = 유출 다단 수 - [연동][경사] 회색 풀림(옆 측점에 벽이 서면 연동 · 구간 있으면 경사) — 배관과 같은 규칙 - 시험: test_73_4_body_guard(벽 전면 = 본체 끝 · 박스 +1 m 따라감 · 연동 옆 측점 벽 · 서버 Node 면적 = 화면) · 거울 시험 흙막이 칸 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EYJJRCfHfdCGNhmXTjQKV7
This commit is contained in:
@@ -199,6 +199,56 @@ function revetSet(values: Record<string, unknown>): CulvertSetSpec {
|
||||
};
|
||||
}
|
||||
|
||||
/** 세월교 · 박스 유입 · 유출 구조 칸(73-4) — 「흙막이」면 배관 흙막이와 같은 세트를 함께 얹음. */
|
||||
const GUARD_KEYS: Record<"box" | "ford", [string, string]> = {
|
||||
box: ["wing_in", "wing_out"],
|
||||
ford: ["inlet_type", "outlet_type"],
|
||||
};
|
||||
|
||||
/** 세월교 · 박스 흙막이 — 독립 기슭막이와 같은 세트 모양(관 숨김) · 자리 = 관 · 본체 끝(73-4).
|
||||
* 흙막이를 안 고른 쪽 = 구조 빈 값(안 그림) · 둘 다 아니면 null. 파이썬 짝 `_guard_set`. */
|
||||
export function guardSet(
|
||||
values: Record<string, unknown>,
|
||||
body: "box" | "ford",
|
||||
diameterM: number,
|
||||
): CulvertSetSpec | null {
|
||||
const [inletKey, outletKey] = GUARD_KEYS[body];
|
||||
const side = (role: string, key: string): CulvertSetSpec =>
|
||||
String(values[key] ?? "").trim() === "흙막이"
|
||||
? revetSide(values, role)
|
||||
: { role, structure: "" };
|
||||
const inlet = side("inlet", inletKey);
|
||||
const outlet = side("outlet", outletKey);
|
||||
if (!inlet.structure && !outlet.structure) return null;
|
||||
return {
|
||||
type: "pipe",
|
||||
hidden_pipe: true,
|
||||
body,
|
||||
side: "양쪽",
|
||||
tiers: 1,
|
||||
foundation: null,
|
||||
pipe_kind: null,
|
||||
diameter_m: diameterM,
|
||||
min_cover_m: 0.0,
|
||||
inlet,
|
||||
outlet,
|
||||
};
|
||||
}
|
||||
|
||||
/** 박스 본체 전체 높이(상판 + 내공 + 저판) — 흙막이 세트의 관경 자리(파이썬 `wall_body_height`). */
|
||||
function boxBodyHeight(box: CulvertSetSpec): number {
|
||||
return round(
|
||||
Number(box.top_thickness_m) + Number(box.inner_height_m) + Number(box.slab_thickness_m),
|
||||
3,
|
||||
);
|
||||
}
|
||||
|
||||
/** 흙막이가 있으면 세트에 `guard` 로 실음(얹을 때 `culvert` 자리로 감). */
|
||||
function withGuard(spec: CulvertSetSpec, guard: CulvertSetSpec | null): CulvertSetSpec {
|
||||
if (guard) spec.guard = guard;
|
||||
return spec;
|
||||
}
|
||||
|
||||
/** 관경(㎜) → 관 지름(m). 파이썬 `_culvert_set`·`_ford_set` 과 같은 반올림. */
|
||||
export function pipeDiameterM(diameterMm: number | null | undefined): number {
|
||||
return round((num(diameterMm, 1000.0) ?? 1000.0) / 1000.0, 3);
|
||||
@@ -296,7 +346,7 @@ function fordSet(
|
||||
const pipeCount = count ? Math.max(Math.trunc(count), 1) : 1;
|
||||
const wingIn = wingSpec(values, defaults, "in");
|
||||
const wingOut = wingSpec(values, defaults, "out");
|
||||
return {
|
||||
const spec: CulvertSetSpec = {
|
||||
type: "ford",
|
||||
pipe_kind: kind,
|
||||
diameter_m: pipeDiameterM(diameterMm),
|
||||
@@ -321,6 +371,7 @@ function fordSet(
|
||||
...wingDefaulted(values, wingOut, "out"),
|
||||
],
|
||||
};
|
||||
return withGuard(spec, guardSet(values, "ford", Number(spec.diameter_m)));
|
||||
}
|
||||
|
||||
/** 물넘이포장 1개소 — 구조물이 아니라 **파인 노면**이라 형상이 다르다. */
|
||||
@@ -368,7 +419,7 @@ function boxSet(
|
||||
const slab = slabValue && slabValue > 0 ? slabValue : FORD_SLAB_THICKNESS_M;
|
||||
const wingIn = wingSpec(values, defaults, "in");
|
||||
const wingOut = wingSpec(values, defaults, "out");
|
||||
return {
|
||||
const spec: CulvertSetSpec = {
|
||||
type: "box",
|
||||
inner_width_m: innerWidth || 2.0,
|
||||
inner_height_m: innerHeight || 2.0,
|
||||
@@ -388,6 +439,7 @@ function boxSet(
|
||||
...wingDefaulted(values, wingOut, "out"),
|
||||
],
|
||||
};
|
||||
return withGuard(spec, guardSet(values, "box", boxBodyHeight(spec)));
|
||||
}
|
||||
|
||||
/** 관 지점 목록 → 누가거리(소수 2자리)별 세트 제원. */
|
||||
@@ -453,6 +505,9 @@ export function attachCulvertSets(
|
||||
...spec,
|
||||
chainage_m: pipeChainage,
|
||||
};
|
||||
// 세월교 · 박스 흙막이(73-4) — 배관 흙막이와 같은 자리(`culvert`)에 함께 얹음.
|
||||
if (spec.guard)
|
||||
section.culvert = { ...(spec.guard as CulvertSetSpec), chainage_m: pipeChainage };
|
||||
attached += 1;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user