936be972 전 측점 소단 가정(읽기만): 면고르기·파종 성토면 3,136.23 → 16,979.02㎡(소단 없음 15,919.95) · 측점 20 성토 사면길이 3.0 → 14.31m Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016VBGFXB9AbJBwXP19z75Qq
52 lines
2.7 KiB
Python
52 lines
2.7 KiB
Python
"""소단이 선 사면의 사면길이 — 첫 소단에서 끊기지 않을 것 (2026-09-15 소단 착수 전 조사).
|
||
|
||
잰 것(936be972 읽기만) — 전 측점에 소단(0.5m · 3m · 0°)을 놓자 성토 사면길이가 측점 20 에서
|
||
8.91 → 3.0m 로 끊겨 면고르기·파종 성토면 15,919.95 → 3,136.23㎡(−80%)로 줄었음.
|
||
까닭 — 설계선이 0.5m 격자로 찍혀 소단 평탄부 0.5m 가 0.195 + 0.305 두 조각으로 쪼개짐 →
|
||
「평탄부 한 조각 = 소단 폭」 판정이 안 맞아 거기서 사면이 끝난 것으로 봄. 안쪽 기울기(°)를 주면
|
||
평탄부가 아예 평탄으로 안 읽혀 같은 자리에서 끊김.
|
||
"""
|
||
|
||
from __future__ import annotations
|
||
|
||
import pytest
|
||
|
||
from B06_Section.B06_Section_Engine_Design import compute_cross_design
|
||
from B08_Quantity.B08_Quantity_Engine_SlopeLength import station_slope
|
||
from common_util.common_util_cross_berm import BermSpec
|
||
|
||
# 노면보다 8m 낮은 평지 — 양쪽 성토 사면이 길게 섬.
|
||
SAMPLES = [{"offset_m": x / 2, "elevation_m": -8.0} for x in range(-160, 161)]
|
||
|
||
|
||
def _design(berm: BermSpec | None) -> dict:
|
||
return compute_cross_design(
|
||
SAMPLES, 0.0, ground_type="soil", section_mode="both_fill", berm=berm
|
||
)
|
||
|
||
|
||
@pytest.mark.parametrize("slope_deg", [0.0, 2.0])
|
||
def test_소단이_있어도_사면길이가_끝까지_이어진다(slope_deg: float) -> None:
|
||
plain = station_slope(0.0, _design(None))
|
||
stepped_design = _design(BermSpec(0.5, 3.0, slope_deg))
|
||
stepped = station_slope(0.0, stepped_design)
|
||
assert plain.fill_length_m > 15 # 양쪽 합 — 시험이 뜻을 가지는 크기
|
||
# 소단 평탄부는 사면길이에 안 들고, 비탈 조각은 끝까지 셈 — 같은 낙차라 거의 같음.
|
||
assert stepped.fill_length_m == pytest.approx(plain.fill_length_m, rel=0.05)
|
||
assert stepped.fill_height_m == pytest.approx(plain.fill_height_m, abs=0.2)
|
||
|
||
|
||
def test_소단_구조물은_원단위_줄을_안_세우고_까닭을_남긴다(monkeypatch, tmp_path) -> None:
|
||
"""소단 계단은 횡단 설계가 절·성토 면적·사면길이에 이미 넣음 — 따로 줄을 세우면 「산출식 없음」
|
||
거짓 막힘(formula_missing)이 내역에 섬(2026-09-15 조사)."""
|
||
from B05_Profile.B05_Profile_Structures_Schema import StructureInstance
|
||
from B08_Quantity import B08_Quantity_Router_Material as material
|
||
|
||
berm = StructureInstance(
|
||
structure_id="b", type_id="berm", placement="interval", start_m=100.0, end_m=120.0
|
||
)
|
||
monkeypatch.setattr(material, "load_structures", lambda root: (1, [berm]))
|
||
targets, _names, skipped = material._collect_structures(str(tmp_path))
|
||
assert targets == []
|
||
assert any("소단" in note and "토공" in note and "사면" in note for note in skipped)
|