Merge remote-tracking branch 'origin/sub_laptop_7' into sub_laptop_5
E04 Search 충돌 풂 — 점 단위 덩이 나눔 · 전역 최소 다듬기(_set_best) 유지 + sub7 best.cells 를 _set_best 에 넣어 탐색 · 다듬기 두 길 모두 셀 전달 (요구 351) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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"])
|
||||
|
||||
@@ -63,6 +63,8 @@ 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()),
|
||||
massBase0: M.cutCells(c.grid, c.z, { ...c.sphere, cells: [0] }).get(0),
|
||||
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 +209,8 @@ def test_terrain_hole_matches_cut(ts):
|
||||
"""활동체를 걷어낸 지표 = 지표 꼭짓점 − 잘린 셀 · 구멍 테두리는 활동면 메쉬와 같은 꼭짓점."""
|
||||
cut = [i for i, _ in _py_cut(SPHERE)]
|
||||
assert ts["cut"] == cut
|
||||
assert ts["massCut"] == [0, 7 * 21 + 10, 7 * 21 + 11] # 엔진 덩이 셀 그대로(0 = 안 잘림 · 두께 0)
|
||||
assert ts["massBase0"] == Z[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"])
|
||||
|
||||
Reference in New Issue
Block a user