B08_Quantity 86 · B09_Estimation 111 파일을 old_code/ 로 옮김(지우지 않음). 화면은 메뉴·주소·단계 막대만 남은 빈 틀 둘 — main.py 라우터 13 개는 끊음. B07 이 빌려 쓰던 비탈 길이·면적은 필요한 함수만 B07_DesignDetail_Engine_SlopeGeometry 로 옮겨 적음(면적 적분·노면 면적·측점 묶음은 안 옮김) · 시험 하나를 새로 둠. B07 구조물도 조립(Cad_StandardSheet)은 2026-09-13 에 이미 도면 목록에서 빠져 부르는 곳이 없어 old_code 로 같이 보냄 — 구조물 그림은 되살리지 않음. B06 구조물 몫 조회는 빈 값으로 두어 화면이 그대로 서게 함. B08·B09 를 부르던 시험 25 개도 old_code/resources/tester 로 옮김. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PAdA5ThqmtVSsbzjusk1cJ
54 lines
2.5 KiB
Python
54 lines
2.5 KiB
Python
"""B07 로 옮겨 적은 사면 기하 — 옮기며 값이 바뀌지 않았는지 (PLAN 7-3).
|
|
|
|
옛 자리 `B08_Quantity_Engine_SlopeLength`·`_SlopeArea` 에서 **B07 이 쓰는 몫만** 옮겨 적었다
|
|
(`B07_DesignDetail_Engine_SlopeGeometry`). 여기 둔 것은 옮긴 로직이 깨지면 바로 걸리는 판정
|
|
둘 — 소단에서 사면이 끊기지 않을 것 · 층따기 밑수가 성토 비탈면이 아닐 것.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import pytest
|
|
|
|
from B06_Section.B06_Section_Engine_Design import compute_cross_design
|
|
from B07_DesignDetail.B07_DesignDetail_Engine_SlopeGeometry import (
|
|
PROTECTION_SOURCE,
|
|
StationSlope,
|
|
length_of,
|
|
series_key,
|
|
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 = station_slope(0.0, _design(BermSpec(0.5, 3.0, slope_deg)))
|
|
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_층따기_밑수는_성토_비탈면이_아니다() -> None:
|
|
"""층따기는 성토부 **아래 원지반**을 깎는 일 — 성토 사면길이로 대신 채우면 다른 면을 센다."""
|
|
slope = StationSlope(
|
|
chainage_m=0.0, cut_length_m=7.0, fill_length_m=9.0, bench_cut_length_m=4.0
|
|
)
|
|
assert length_of(slope, "bench_cut", "fill") == 4.0
|
|
assert length_of(slope, "bench_cut", "cut") == 0.0
|
|
# 법면보호공은 면고르기를 참조 — 같은 사면길이를 쓴다.
|
|
assert length_of(slope, PROTECTION_SOURCE, "fill") == 9.0
|
|
assert length_of(slope, "face_dressing", "cut") == 7.0
|
|
assert series_key("face_dressing", "cut") == "face_dressing_cut"
|