Files
Aislo/resources/tester/test_115_7_fill_continuity.py
T
eomsangdonandClaude Opus 5.5 35ab4bd48e fix(B05): 3D 성토 비탈 끝 종단 이음 — 튐 · 못 닫힘 보간 · 측점 닻 원뿔 · 비탈 끝 밖 2 m 덧댐(115-7)
- 공통 변형 장(buildDeformField) 성토 비탈 끝 열을 측마다 종단으로 이음(새 ① · 제안 ② 같이 받음)
- 못 닫힘 = 단면 끝 너머 max(2 m, 25 %) 넘어서야 닫힌 성토 · 끝까지 못 찾음
- 튐 = 이웃 ±3 m 중앙값과 max(2 m, 25 %) 넘게 다름 → 이웃 좋은 행 보간
- 원뿔 넓히기 1 m/m · 늘린 몫은 측점 값 + 1 m/m 까지 · 측점 행 날것 · 0 행 끊음(단면 있는 3 m 안 틈만 이음)
- 새 ① 바뀐 행은 비탈 끝 밖 2 m 를 비탈 끝 높이 → 원지반으로 덧댐 · 절토 그대로
- 시험 test_115_7_fill_continuity(직각 골짜기 · 계단 지형 · 못 닫힘 · 측점 행 · 절토)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013rJwJMVL4EE31y77TB11AP
2026-10-09 08:25:51 +09:00

69 lines
2.1 KiB
Python

# -*- coding: utf-8 -*-
"""PLAN 115-7 — B05 3D 성토 비탈 끝 종단 이음(공통 변형 장) 합성 검사.
Node 도우미(helper_115_7_fill_continuity.cjs)가 TS 를 트랜스파일해 돌리고, 여기서는
결과(JSON)를 단언한다. 직각 골짜기 지느러미 0 · 덧댐 · 계단 지형 출렁임 · 못 닫힘 보간 ·
측점 행 날것 · 0 행 끊음 · 절토 그대로.
"""
import json
import os
import subprocess
import pytest
HERE = os.path.dirname(os.path.abspath(__file__))
@pytest.fixture(scope="module")
def results():
proc = subprocess.run(
["node", os.path.join(HERE, "helper_115_7_fill_continuity.cjs")],
capture_output=True,
text=True,
timeout=120,
)
assert proc.returncode == 0, proc.stderr
return json.loads(proc.stdout)
def test_valley_has_no_fins(results):
r = results["valley"]
assert r["fins"] == 0
assert (
r["gullyMax"] == 6 and r["gullyMin"] == 6
) # 골 행도 이웃 비탈 끝(6 m) — 10.5 m 로 안 뻗음
def test_valley_skirt_replaces_wall(results):
r = results["valley"]
assert r["skirtMid"] == 94.5 # 비탈 끝 밖 1 m — 96 → 93 반쯤
assert r["skirtOut"] == 93 # 덧댐 밖 — 원지반
assert r["outside"] == 96 # 골 밖 — 원지반 그대로
def test_cut_unchanged(results):
r = results["valley"]
assert r["cutFlat"] == 4
assert 2 < r["cutGully"] < 2.3 # 절토는 골을 날것 그대로 따른다
def test_step_terrain_wobble_small(results):
r = results["steps"]
assert r["fins"] == 0
assert r["wobble"] < 0.7 * r["rawWobble"]
def test_open_rows_interpolated(results):
r = results["column"]
assert r["openMax"] == 6 # 못 닫힘(15) → 이웃 6
assert r["stationOpen"] < 9 # 못 닫힘 측점도 보간(날것 20 아님)
def test_station_row_kept_and_zero_breaks(results):
r = results["column"]
assert r["stationKept"] == 9 # 측점 행 날것
assert r["bridged"] == 6 # 단면 있는 짧은 틈 — 잇는다
assert r["cutGap"] == 0 # 단면 없는 행 — 0 그대로(구간 끊음)
assert r["neighbourStep"] <= 1 + 1e-6 # 이웃 행 차 1 m/m 안