fix(B05): 3D 제안 ② 설계 구역 안 삼각형은 지형 결측(DTM 빈 곳) 위라도 남김(115-6)

- 실측(226 · d22) 결과 비탈이 DTM 빈 곳 위를 지나는 자리에서 설계면까지 비던 것 고침

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 22:41:24 +09:00
co-authored by Claude Opus 5.5
parent d583936b47
commit 881e3f157f
+4 -2
View File
@@ -287,7 +287,9 @@ export function tinTerrain(
let c = triangles[t + 2];
const cx = (pslg.x[a] + pslg.x[b] + pslg.x[c]) / 3;
const cz = (pslg.z[a] + pslg.z[b] + pslg.z[c]) / 3;
if (removedGrid.find(cx, cz) < 0) continue; // 버린 자리 밖(볼록 껍질 채움)
// 버린 지형 자리 밖(볼록 껍질 채움)은 뺀다 — 설계 구역 안은 지형 빈 곳(DTM 결측) 위라도 남긴다.
const inDesign = outer.contains(cx, cz);
if (!inDesign && removedGrid.find(cx, cz) < 0) continue;
if (road.contains({ x: cx, z: cz }) || holes.contains(cx, cz)) continue;
// 위를 보게 감기(씬 Y-up) — 평면 (x, z) 에서 시계 방향이면 뒤집는다.
const turn =
@@ -296,7 +298,7 @@ export function tinTerrain(
if (turn > 0) [b, c] = [c, b];
// 구역 — 설계 구역 안이면 꼬리표 다수결(없으면 높이 차 부호) · 밖이면 원지반.
let zone = 0;
if (outer.contains(cx, cz)) {
if (inDesign) {
let fill = 0;
let cut = 0;
[a, b, c].forEach((id) => {