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:
@@ -379,12 +379,12 @@ LIDAR_ID = re.compile(r"^plan_lidar(?:_(\d+))?$")
|
||||
|
||||
|
||||
def _sheet_box(
|
||||
route_xy: list[tuple[float, float]],
|
||||
route_xy: list[tuple[float, float]], scale: int = DRAWING_SCALE_PLAN
|
||||
) -> tuple[float, float, float, float]:
|
||||
"""그 장의 도곽 범위(실좌표 m) — 계획평면도·용지도·라이다가 같은 규칙을 쓴다."""
|
||||
area_w_mm, area_h_mm = plan_area_mm()
|
||||
half_w = area_w_mm / 2.0 * DRAWING_SCALE_PLAN / 1000.0
|
||||
half_h = area_h_mm / 2.0 * DRAWING_SCALE_PLAN / 1000.0
|
||||
half_w = area_w_mm / 2.0 * scale / 1000.0
|
||||
half_h = area_h_mm / 2.0 * scale / 1000.0
|
||||
center_x = (min(x for x, _y in route_xy) + max(x for x, _y in route_xy)) / 2.0
|
||||
center_y = (min(y for _x, y in route_xy) + max(y for _x, y in route_xy)) / 2.0
|
||||
return (
|
||||
@@ -396,10 +396,10 @@ def _sheet_box(
|
||||
|
||||
|
||||
def _chunk_route(
|
||||
context: Any, longitudinal: dict[str, Any], number: int
|
||||
context: Any, longitudinal: dict[str, Any], number: int, scale: int = DRAWING_SCALE_PLAN
|
||||
) -> tuple[list[tuple[float, float]], dict[str, Any], int]:
|
||||
"""장 번호로 그 장의 노선 구간을 잘라 낸다 (계획평면도 장 나눔과 같은 기준)."""
|
||||
chunks = plan_chunks(plan_stations(longitudinal))
|
||||
chunks = plan_chunks(plan_stations(longitudinal), scale)
|
||||
chunk = next((item for item in chunks if item["number"] == number), None)
|
||||
if chunk is None:
|
||||
raise FileNotFoundError("요청한 장을 찾을 수 없습니다.")
|
||||
|
||||
Reference in New Issue
Block a user