feat(b07): 평면도 종류마다 축척 고르기 — 1/600 · 1/1,000 · 1/1,200 기본 · 유역도 1/6,000 고정(119-1)

- 종류 파일 scale(없거나 목록 밖이면 1200) · 추가 · 업데이트 인자 · 목록 밖 거절
- 장 나눔 · 도곽 범위 · 배경 절취 · 축척 글 · 도곽 칸 · IP 표 · 필지 라벨 · 측점 눈금 실거리 환산이 축척 따라감(함수 인자)
- 「종류」 폼에 공용 「축척」 고르기 · 유역도 양식은 잠금 표시
- 시험 test_119_b07_plan_scale 새로 · test_b07_plan_kinds 종류 dict 에 scale

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NPJGtfXo6GMbcpiboQC4uK
This commit is contained in:
2026-10-08 18:29:18 +09:00
co-authored by Claude Opus 5.5
parent 5f64633df3
commit 1827cd8bb5
13 changed files with 352 additions and 62 deletions
@@ -153,16 +153,18 @@ def clip_lines(
pieces[piece]["lines"] = kept
def _clip(pieces: dict[str, dict[str, Any]], blocks: list[dict[str, Any]], box: Any) -> None:
def _clip(
pieces: dict[str, dict[str, Any]], blocks: list[dict[str, Any]], box: Any, mm: float = MM
) -> None:
"""표 칸 밑 선 조각(등고선 · 계류 · 노견선 · 외곽선 · 중심선)을 표 밖으로 잘라 낸다."""
min_x, min_y = box[0], box[1]
width = sum(_COLUMNS) / MM
width = sum(_COLUMNS) / mm
rects = [
(
min_x + b["origin"][0] / MM,
min_y + b["origin"][1] / MM - b["rows"] * _ROW_H / MM,
min_x + b["origin"][0] / MM + width,
min_y + b["origin"][1] / MM,
min_x + b["origin"][0] / mm,
min_y + b["origin"][1] / mm - b["rows"] * _ROW_H / mm,
min_x + b["origin"][0] / mm + width,
min_y + b["origin"][1] / mm,
)
for b in blocks
]
@@ -176,6 +178,7 @@ def ip_table_piece(
box: tuple[float, float, float, float],
chunk: dict[str, Any],
total: int,
mm: float = MM,
) -> dict[str, Any]:
"""그 장 IP 표 조각 {blocks} — 자리를 정하고 같은 자리 밑 선 조각을 `pieces` 에서 잘라 낸다."""
blocks = ip_blocks(
@@ -186,9 +189,9 @@ def ip_table_piece(
float(chunk["start_m"]),
float(chunk["end_m"]),
)
_place(blocks, (box[2] - box[0]) * MM)
_place(blocks, (box[2] - box[0]) * mm)
if blocks:
_clip(pieces, blocks, box)
_clip(pieces, blocks, box, mm)
return {"blocks": blocks}