fix(b08): 관측 원단위 줄도 갈 곳 기본값 금지 — destination 없는 줄은 막고 사유(종전 or material 로 조용히 자재행) · 표 전 줄 갈 곳 시험
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BW6Jdsh18WPtYUR6THZJqn
This commit is contained in:
@@ -283,8 +283,16 @@ def expand_observed(
|
||||
source_key = str(found.get("source") or "")
|
||||
options = structure.get("options") or {}
|
||||
components: list[dict[str, Any]] = []
|
||||
blocked: list[str] = []
|
||||
for item in found.get("components") or []:
|
||||
note = str(item.get("basis_note") or "")
|
||||
if not item.get("destination"):
|
||||
# ⛔ 갈 곳 기본값 금지(명세 13장) — 종전 `or "material"` 은 줄이 늘 때 조용히 자재로 샘.
|
||||
blocked.append(
|
||||
f"「{item['name']}」 관측 원단위 줄에 갈 곳이 없어 물량을 어느 축에도 안 보냄"
|
||||
" — 표(`structure_unit_observed`)에 적을 것(명세 13장 갈 곳 기본값 금지)"
|
||||
)
|
||||
continue
|
||||
weep = (
|
||||
weep_component(found, options, scale, scale_note)
|
||||
if item["name"] == "물구멍관"
|
||||
@@ -298,7 +306,7 @@ def expand_observed(
|
||||
"name": item["name"],
|
||||
"unit": item["unit"],
|
||||
"amount": float(item["amount"]) * scale,
|
||||
"destination": item.get("destination") or "material",
|
||||
"destination": item["destination"],
|
||||
# 근거를 값 옆에 붙인다 — 관측값임을 화면·인계에서 바로 알아야 한다.
|
||||
"basis": f"관측 원단위 {item['amount']:g}/{found.get('unit')} × {scale_note}"
|
||||
+ (f" ({note})" if note else ""),
|
||||
@@ -308,7 +316,7 @@ def expand_observed(
|
||||
"spec": str(item.get("spec") or ""),
|
||||
}
|
||||
)
|
||||
notes = [f"관측 원단위 적용 — {found.get('source_note') or source_key}"]
|
||||
notes = [f"관측 원단위 적용 — {found.get('source_note') or source_key}", *blocked]
|
||||
# 줄에 붙은 사유(원문끼리 다름 등) — 구조물도 그림도 같은 글자를 씀.
|
||||
notes.extend(str(note) for note in found.get("notes") or [])
|
||||
earthwork_note = earthwork_missing_note(found)
|
||||
|
||||
Reference in New Issue
Block a user