feat(b05·b08): BOX암거 구체 터파기 — 평균 터파기고 칸 하나 · 토공 축으로만 · 기초잡석 사유(브레인 판정 ①③)
- 등록부 trench_depth_m(평균 터파기고 · 기본값 없음 · 비면 사유) - 터파기 = (밑폭 버림 폭 + 여유 0.5×2 + 윗폭 1:0.5) ÷ 2 × 깊이 × 연장(울진 「암거구체 토공(2×2)」) · 되메우기 = 터파기 − 든 것(잡석·버림·구체) · 잔토처리 = 든 것 — destination earthwork(묶음에 안 듦 · 토공집계로만) - 울진 원문은 잔토에 구체 전체 · 되메우기 한쪽만 — 옹벽 식(터파기 − 든 것)으로 맞추고 사유에 적음 - 기초잡석 사유 「근거 둘(예제·울진 집계표)에는 잡석 줄이 없음 — 사용자 확정 3차 ② 로 세움」 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016VBGFXB9AbJBwXP19z75Qq
This commit is contained in:
@@ -86,6 +86,35 @@ def test_치수를_안_적으면_기본값으로_서되_미확정() -> None:
|
||||
assert not next(r for r in stored if r["type_id"] == "box_culvert").get("unconfirmed")
|
||||
|
||||
|
||||
def test_구체_터파기는_평균_터파기고로_토공_축에만_선다() -> None:
|
||||
"""브레인 판정(2026-09-15 ③) — 칸 하나(평균 터파기고) · 구조물 터파기는 토공집계로만(이중계상).
|
||||
|
||||
밑폭 = 버림 폭 2.8 + 여유 0.5×2 · 옆면 1:0.5(울진 「암거구체 토공(2×2)」) · 깊이 0.8 ·
|
||||
든 것 = 버림 폭 × (기초잡석 0.2 + 버림 0.1) + 구체 폭 × (0.8 − 0.3) · 되메우기 = 터파기 − 든 것.
|
||||
"""
|
||||
table = build_table(
|
||||
[{"type_id": "box_culvert", "options": {**ULJIN_2X2, "trench_depth_m": 0.8}}]
|
||||
)
|
||||
box = table["structures"][0]
|
||||
earth = {c["name"]: c for c in box["components"] if c["destination"] == "earthwork"}
|
||||
assert earth["터파기"]["amount"] == pytest.approx((3.8 + 4.6) / 2 * 0.8 * 10)
|
||||
filled = 2.8 * (0.2 + 0.1) + 2.6 * (0.8 - 0.3)
|
||||
assert earth["잔토처리"]["amount"] == pytest.approx(filled * 10)
|
||||
assert earth["되메우기"]["amount"] == pytest.approx(((3.8 + 4.6) / 2 * 0.8 - filled) * 10)
|
||||
assert box["trench_depth_m"] == 0.8
|
||||
# 잡석 사유 — 근거 둘에는 없고 사용자 확정으로 섬(브레인 판정 ①).
|
||||
assert any("잡석" in note and "사용자 확정 3차" in note for note in box["notes"])
|
||||
# 묶음(내역 줄)에는 터파기가 안 들어감.
|
||||
row = next(
|
||||
r for r in build_handoff(unit_quantity_table=table)["work_items"] if "BOX" in r["name"]
|
||||
)
|
||||
assert not [p for p in row["composite_parts"] or [] if "터파기" in str(p.get("name"))]
|
||||
# 칸이 비면 터파기가 안 서고 사유.
|
||||
empty = build_table([{"type_id": "box_culvert", "options": ULJIN_2X2}])["structures"][0]
|
||||
assert not [c for c in empty["components"] if c["destination"] == "earthwork"]
|
||||
assert any("평균 터파기고" in note for note in empty["notes"])
|
||||
|
||||
|
||||
def test_인계_묶음이_조각을_세운다() -> None:
|
||||
table = build_table(
|
||||
facility_structures(
|
||||
|
||||
Reference in New Issue
Block a user