- 등록부 box_culvert: 연장(기본값 없음) · 측벽 0.3 · 상·저판 0.25 · 헌치 0.2 · 버림 0.1 — 제안값 = 산림과임업기술(임도) 5장 수량산출 예제 · KDS 44 90 00 300㎜ 병기(판 0.25 는 못 미침을 나란히) - B06 BOX 세트(파이썬·TS 짝)가 두께 칸을 읽음 — 종전 「세월교 값 승계」(벽 0.2·판 0.3) 걷음 · 그림 따라감 - B08 전개식 `_UnitQuantity_Box`: 콘크리트 · 버림 · 유로폼(외벽·내벽·상판 밑·귀면) · 버림 옆 합판 · 동바리 · 비계(시종점 두 면은 개소당 한 번) · 철근은 울진 2×2 관측(D13 179·D16 157kg/m)만, 나머지 크기는 「크기별 식 없음」 - 울진 기번3 「암거수량집계표(2×2)」 m당과 맞음: 레미콘 2.84 · 버림 0.28 · 유로폼 11.131 · 합판 0.2 · 동바리 3.92 · 비계 벽체 5.2 - 치수 칸을 안 적은 BOX 는 제안값으로 서되 미확정(금액 밖) · 연장이 비면 안 섬 - 묶음 조각 12-01-01·12-38·12-04(6회)·12-03·12-20·12-19·12-25 · 동바리 대상 표시 · 세월교 「수량 근거 없음」 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016VBGFXB9AbJBwXP19z75Qq
65 lines
2.6 KiB
Python
65 lines
2.6 KiB
Python
"""B06 BOX암거 세트(백엔드) 자체검증 — 2026-08-25.
|
|
|
|
확인 대상:
|
|
· `_box_set()`이 정본·레지스트리 기본값으로 제원을 만든다(두께는 세월교 승계).
|
|
· 날개벽 각도가 저판 편측 연장(길이×cos각)을 만든다 — 세월교와 같은 산식.
|
|
· `attach_culvert_sets()`가 BOX암거를 **소유 측점 한 곳에만** 붙이고
|
|
`box` 키로 실어 배수관·세월교 소비처와 섞이지 않는다.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import math
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
if str(ROOT) not in sys.path:
|
|
sys.path.insert(0, str(ROOT))
|
|
|
|
from B06_Section.B06_Section_Engine_Culvert import ( # noqa: E402
|
|
BOX_COVER_M,
|
|
_box_set,
|
|
attach_culvert_sets,
|
|
)
|
|
|
|
|
|
def test_box_set_defaults() -> None:
|
|
"""옵션이 없으면 등록부 기본 2.0×2.0 · 두께도 등록부 제안값(2026-09-15 · 세월교 승계 걷음)."""
|
|
spec = _box_set(None)
|
|
assert spec["type"] == "box"
|
|
assert spec["inner_width_m"] == 2.0
|
|
assert spec["inner_height_m"] == 2.0
|
|
assert spec["wall_thickness_m"] == 0.3
|
|
assert spec["slab_thickness_m"] == 0.25
|
|
assert spec["top_thickness_m"] == 0.25
|
|
assert spec["cover_m"] == BOX_COVER_M
|
|
# 도로 방향 길이 = 내공 폭 + 측벽 두 장.
|
|
assert spec["span_m"] == 2.0 + 2 * 0.3
|
|
|
|
|
|
def test_box_wing_extends_slab() -> None:
|
|
"""저판 편측 연장 = 날개벽 길이 × cos(각도). 세월교와 같은 산식이다."""
|
|
spec = _box_set({"body_width_m": 3, "body_height_m": 3, "wing_in_length_m": 2})
|
|
assert spec["span_m"] == 3 + 2 * 0.3
|
|
assert spec["wing_in"]["slab_extend_m"] == round(2 * math.cos(math.radians(45)), 3)
|
|
|
|
|
|
def test_attach_box_only_owner_station(tmp_path: Path) -> None:
|
|
"""BOX암거는 **소유 측점 한 곳에만** `box` 키로 붙는다(2026-08-25 사용자 확정).
|
|
|
|
구체 폭만큼 옆 측점까지 붙이면 횡단도가 한 벌 더 그려지고 3D 솔리드도 겹친다.
|
|
"""
|
|
edits = tmp_path / "B04_PreProcess" / "drainage" / "edits"
|
|
edits.mkdir(parents=True)
|
|
(edits / "pipe_points.json").write_text(
|
|
'{"points": [{"chainage_m": 100.0, "facility": "box_culvert", "options": {}}]}',
|
|
encoding="utf-8",
|
|
)
|
|
sections = [{"chainage_m": value} for value in (98.5, 99.0, 100.0, 101.0, 101.5)]
|
|
attached = attach_culvert_sets(tmp_path, sections)
|
|
|
|
assert attached == 1
|
|
assert [("box" in section) for section in sections] == [False, False, True, False, False]
|
|
assert all("culvert" not in section and "ford" not in section for section in sections)
|