fix(B07): 횡단면도 박스를 단면마다 자기 그림 + 1 mm 로 — 칸 통일 없앰

- 장 배치: 칸을 그 장 가장 큰 블록으로 통일하던 것을 없애고 블록을 자기 크기로 열마다 쌓음(좌하단부터 아래→위, 차면 오른쪽 열)
- 그리는 가로 범위를 선이 있는 데까지로 — 원지반 자료가 짧으면 빈 여유가 박스를 밀던 것
- 블록 크기에 암 경계선 포함(실제 그림과 같은 규칙)
- 옛 배치로 확정된 장은 저장본을 그대로 보이되 [수정] 안내 알림
- 검증_sub4: 박스 ↔ 그림 66개 모두 1.0 mm · 같은 조건 27장 → 20장

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013rJwJMVL4EE31y77TB11AP
This commit is contained in:
2026-10-06 23:11:14 +09:00
co-authored by Claude Opus 5.5
parent d42efb162b
commit 67bba96227
6 changed files with 196 additions and 70 deletions
@@ -103,6 +103,8 @@ WATERSHED_ID = "watershed"
COVER_ID = "cover"
# 표준 횡단면도 — 노선 자료가 아니라 B06 표준 횡단면 설정값으로 그리는 한 장.
CROSS_STANDARD_ID = "cross_standard"
# 횡단 장 배치 판 — 단면마다 자기 그림 + 1 mm 박스(68-1). 이 판 전에 확정한 장은 옛 배치다.
CROSS_SHEET_LAYOUT = 2
def _drawing_list(
@@ -229,7 +231,7 @@ def _cross_sheet_plan(
chainage = cross_station(source.get("chainage_m") or parse_cross_key(match.group(1)))
design = (designs or {}).get(chainage)
design_line = _cross_design_line(longitudinal_path, source, design)
width, height = section_block_size(source, design_line)
width, height = section_block_size(source, design_line, design=design)
blocks.append((chainage, width, height))
return plan_cross_sheets(blocks)
@@ -413,6 +415,8 @@ def _read_drawing(
else:
kind = "longitudinal" if _LONG_ID.fullmatch(drawing_id) else "cross"
label = str(manifest_entry.get("label") or drawing_id)
if kind == "cross" and manifest_entry.get("layout") != CROSS_SHEET_LAYOUT:
saved["stale_layout"] = True # 화면이 [수정] → 새 배치로 다시 만들기를 안내
stored_table = manifest_entry.get("quantity_table")
table = stored_table if kind == "cross" and isinstance(stored_table, dict) else None
return kind, label, saved, True, table
@@ -585,6 +589,8 @@ def _store_confirmed_drawing(
"confirmed": True,
"file": f"drawings/{item.id}.json",
}
if item.kind == "cross":
entry["layout"] = CROSS_SHEET_LAYOUT
if item.kind == "cross" and isinstance(quantity_table, dict):
entry["quantity_table"] = quantity_table
if isinstance(quantity_tables, dict) and quantity_tables: