fix(E04): 임계 활동체 = 엔진 덩이 셀(best.cells) — 지도 테두리 · 최소 표시 · 3D 활동면 · 못 뚫는 층 칸 · 가까운 측점이 한 구가 자른 다른 덩이까지 그리던 흠 · 엔진 판 e04-4 (533-3)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-26 04:22:36 +09:00
co-authored by Claude Opus 5.5
parent 51df8794c2
commit 3b73e819c0
6 changed files with 32 additions and 6 deletions
@@ -109,6 +109,9 @@ def test_engine_raster_and_best(root):
assert best["r"] > 0 and best["ratio"] in (1.0, 2.0) and 0 <= best["azimuth_deg"] < 360
assert best["f"] == best["bishop"] or best["method"] == 1 # 다스림 = Bishop(잘림 없음)
assert raw["reference_fs"] == 1.5 # 마스터 기본 건기
# 활동체 셀 = 엔진 덩이 — 모두 그 셀 최소(= 전체 최소)
cells = np.asarray(best["cells"])
assert len(cells) and np.allclose(f.ravel()[cells], best["f"])
# 합성 지표 — 노면 위(측점 40 · o=0) = 설계 100 · 깎기 끝 밖(o=+20 · 원지형) = 지반
z = raw["z"]
jy0 = round((0.0 - grid["y0"]) / grid["dx"])
+2
View File
@@ -63,6 +63,7 @@ writeFileSync(process.argv[3], JSON.stringify({
sphere: mesh(M.slipMesh(c.grid, c.z, c.sphere)),
ellipsoid: mesh(M.slipMesh(c.grid, c.z, c.ellipsoid)),
cut: Array.from(M.cutCells(c.grid, c.z, c.sphere).keys()),
massCut: Array.from(M.cutCells(c.grid, c.z, { ...c.sphere, cells: [7 * 21 + 10, 7 * 21 + 11, 0] }).keys()),
center: M.footprintCenter(c.grid, M.cutCells(c.grid, c.z, c.sphere), c.sphere),
centerEmpty: M.footprintCenter(c.grid, new Map(), c.sphere),
floored: Object.fromEntries(M.cutCells(c.grid, c.z,
@@ -207,6 +208,7 @@ def test_terrain_hole_matches_cut(ts):
"""활동체를 걷어낸 지표 = 지표 꼭짓점 − 잘린 셀 · 구멍 테두리는 활동면 메쉬와 같은 꼭짓점."""
cut = [i for i, _ in _py_cut(SPHERE)]
assert ts["cut"] == cut
assert ts["massCut"] == [7 * 21 + 10, 7 * 21 + 11] # 엔진 덩이 셀만 · 안 잘린 셀(0)은 빠짐
assert ts["holed"]["n"] == ts["terrain"]["n"] - len(cut)
assert not set(ts["holed"]["cells"]) & set(cut)
assert _py_rim(set(cut)) <= set(ts["holed"]["cells"])