브레인 일감 1. `산림품셈_form_미판정_14개_원문대조_규명.json`(안티그래비티)을 기존
사람 판정 자리(`FORM_JUDGMENTS`)에 실음 — 머리 소실 9 · 혼합 3 · 공식 1 · 글값 1, 전부 금액 대상.
- 형태 — 소요량형 9 · 생산량형 3 · 계수 2. **산림 미판정이 0 이 됨**
⚠ 안티그래비티가 적은 `formula` 는 낱말을 새로 만들지 않고 뜻이 같은 `coefficient` 로 둠
(받는 쪽이 모르는 형태를 만나면 조용히 건너뜀)
- 밑수 — 머리가 소실돼 **자동으로는 못 읽는 표 일곱**만 `BASIS_JUDGMENTS` 로(막갈이 100㎡당 ·
묘목운반 1,000본당 · 12-1-3 ㎥당 · 12-11-1 m당). 자동으로 읽히는 표는 안 넣음(정본이 흐려짐)
- **더하기만** — 형태 14가 undetermined 에서 갈렸고 밑수 5가 빈칸에서 찼음. 덮어쓴 값 0
- 딸린 시험·이름표 손질 — F0349 는 이제 소요량형 · F0322 「형식 미정」 사유가 사라짐 ·
미판정 목록이 비어 이름표에서 표 → 값 묶음으로 내려감(다시 생기면 표로 섬)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsGw1Dz9HmhuAxGisxmDPF
50 lines
2.0 KiB
Python
50 lines
2.0 KiB
Python
"""이관한 표가 예전 선·문자 그림과 같은 자리를 그리는지 확인 (수동 실행)."""
|
|
|
|
import sys
|
|
|
|
sys.path.insert(0, ".")
|
|
|
|
from B07_DesignDetail.B07_DesignDetail_Engine_Cad_Table import (
|
|
_cross_table_entities,
|
|
extract_quantity_table,
|
|
QUANTITY_VALUE_KEYS,
|
|
cross_table_height,
|
|
cross_table_width,
|
|
)
|
|
from B07_DesignDetail.B07_DesignDetail_Engine_Cad_Basin import _info_box_entities
|
|
|
|
qt = {key: float(index + 1) for index, key in enumerate(QUANTITY_VALUE_KEYS)}
|
|
entities = _cross_table_entities("draw1", qt, 0.0, "No.10", center_x=0.0)
|
|
assert len(entities) == 1 and entities[0]["type"] == "Table", entities
|
|
shape = entities[0]["shapeData"]
|
|
widths = shape["columnWidths"]
|
|
heights = shape["rowHeights"]
|
|
print("cross columns:", len(widths), "rows:", len(heights))
|
|
print("width:", round(sum(widths), 6), "expected:", cross_table_width())
|
|
print("height:", round(sum(heights), 6), "expected:", cross_table_height())
|
|
print("origin:", shape["origin"])
|
|
|
|
titles = [c for row in shape["cells"] for c in row if c and c.get("colSpan", 1) == len(widths)]
|
|
print("title cell:", titles[0]["text"], "align", titles[0]["align"])
|
|
keyed = {c["key"]: c["text"] for row in shape["cells"] for c in row if c and c.get("key")}
|
|
print("keyed cells:", len(keyed), "of", len(QUANTITY_VALUE_KEYS))
|
|
missing = [k for k in QUANTITY_VALUE_KEYS if k not in keyed and k not in ("cut", "fill")]
|
|
print("missing keys:", missing)
|
|
|
|
back = extract_quantity_table("draw1", {"entities": entities})
|
|
same = all(back.get(k) == qt[k] for k in QUANTITY_VALUE_KEYS if k not in ("cut", "fill"))
|
|
print("round-trip values equal:", same)
|
|
|
|
box = _info_box_entities(
|
|
"draw1",
|
|
1,
|
|
{"chainage_m": 100.0, "area_m2": 12345.0, "relief_m": 12.0, "flow_length_m": 34.0},
|
|
"#fff",
|
|
(0.0, 0.0),
|
|
20.0,
|
|
)
|
|
assert len(box) == 1 and box[0]["type"] == "Table"
|
|
bs = box[0]["shapeData"]
|
|
print("basin columns:", bs["columnWidths"], "rows:", len(bs["rowHeights"]))
|
|
print("basin cells:", [[c["text"] if c else None for c in row] for row in bs["cells"]])
|