Files
Aislo/resources/tester/test_b06_ford_pavement_slope.py
T
eomsangdonandClaude Opus 5.5 562734b4d5 fix(B06): 물넘이 포장 측구 끔 · 경사 = 패널 경사각 · 세월교 · 물넘이 월류 높이 점선(PLAN 66-2 · 66-3)
- 물넘이 자리 노면 · 측구 설계선 걷음 → 옛 계획고 점선(바닥 + 월류 높이)이 드러남 · 측구 자리는 바닥 끝 ~ 절토 비탈 발 실선
- 노면 경사 = ford_slope_deg(°) → % · 없으면 옛 ford_slope_pct · 둘 다 없으면 기본 3° (파이썬 · TS 짝 + 거울 시험)
- 방향 = 지금대로 절토측 높고 성토측 낮음
- 세월교 점선 = 노면 + 월류 높이(ford_height_m) · 패널에서 고치면 저장 전에도 바로 따라옴
- 물넘이 패널 월류 높이 · 경사각도 캐시 제원에 바로 얹음(폭 절반 걸친 옆 카드 포함)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYJJRCfHfdCGNhmXTjQKV7
2026-10-06 23:41:47 +09:00

26 lines
942 B
Python

"""물넘이포장 노면 경사 = 좌측 패널 경사각(°) → %(PLAN 66-2).
경사각이 있으면 그 값 · 없으면 옛 「바닥 경사(%)」 · 둘 다 없으면 기본 3°.
"""
import math
from B06_Section.B06_Section_Engine_Culvert import _ford_pavement_set
def test_slope_degree_becomes_percent() -> None:
spec = _ford_pavement_set({"ford_height_m": 0.3, "ford_slope_deg": 5})
assert spec["slope_pct"] == round(math.tan(math.radians(5)) * 100, 4)
assert not any("경사각" in item for item in spec["defaulted"])
def test_slope_defaults_to_three_degrees() -> None:
spec = _ford_pavement_set({"ford_height_m": 0.3})
assert spec["slope_pct"] == round(math.tan(math.radians(3)) * 100, 4)
assert "경사각 3" in spec["defaulted"]
def test_legacy_percent_kept_without_degree() -> None:
spec = _ford_pavement_set({"ford_height_m": 0.3, "ford_slope_pct": 2.0})
assert spec["slope_pct"] == 2.0