feat(B07): 평면도 축척 여덟 · 실거리 상수 축척화 · 막힌 글 먼 자리(141-2)
- 축척 = 1/500 · 600 · 1,000 · 1,200(기본) · 2,500 · 3,000 · 5,000 · 6,000(지식DB 근거) - 비탈 눈금 간격 · 대피소 띄움 · 필지 버퍼 · 틈 = 1/1,200 실거리 × 축척 비(종이 거리 같게 · 1/6,000 눈금 10 m) - 글 후보가 다 막히면 기호에서 2 · 3 배 먼 자리 + 지시선 — 검증_sub8 1/6,000 겹친 쌍 55 → 4 - 시험 test_119 · test_141 늘림 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01STqEqztUthVFBmEP18wBSz
This commit is contained in:
@@ -42,6 +42,7 @@ from B07_DesignDetail.B07_DesignDetail_Engine_Cad_PlanKinds import (
|
||||
slope_end,
|
||||
slope_pieces,
|
||||
)
|
||||
from B07_DesignDetail.B07_DesignDetail_Engine_Cad_PlanSlope import tick_step_m
|
||||
from B07_DesignDetail.B07_DesignDetail_Router_Support_Basin import (
|
||||
_chunk_route,
|
||||
_hillshade_for_box,
|
||||
@@ -77,7 +78,7 @@ _NAME_MAX = 40
|
||||
WATERSHED_LAYOUT = "watershed"
|
||||
_LAYOUTS = ("plan", WATERSHED_LAYOUT)
|
||||
_REFUGE_TYPES = {"refuge": "대피소", "spoil_bank": "사토장"}
|
||||
_REFUGE_OFFSET_M = 8.0 # 대피소 · 사토장 라벨을 중심선에서 띄우는 거리(좌측)
|
||||
_REFUGE_OFFSET_M = 8.0 # 대피소 · 사토장 기호를 중심선에서 띄우는 거리(좌측 · 1/1,200 실거리)
|
||||
|
||||
|
||||
def plan_title(name: str) -> str:
|
||||
@@ -391,9 +392,16 @@ def slope_records(
|
||||
|
||||
|
||||
def _refuge_items(
|
||||
project_root: Path, route: list[tuple[float, float, float]], start_m: float, end_m: float
|
||||
project_root: Path,
|
||||
route: list[tuple[float, float, float]],
|
||||
start_m: float,
|
||||
end_m: float,
|
||||
scale: int = DRAWING_SCALE_PLAN,
|
||||
) -> dict[str, Any]:
|
||||
"""대피소 · 사토장 = 구조물 정본의 그 종류 + 사용자가 정한 자리. 한 자리에 둘 다 가능."""
|
||||
"""대피소 · 사토장 = 구조물 정본의 그 종류 + 사용자가 정한 자리. 한 자리에 둘 다 가능.
|
||||
|
||||
띄움은 종이 거리가 같게 축척 따라(141-2)."""
|
||||
offset = _REFUGE_OFFSET_M * scale / DRAWING_SCALE_PLAN
|
||||
spots: dict[float, set[str]] = {}
|
||||
_revision, structures = load_structures(str(project_root))
|
||||
for structure in structures:
|
||||
@@ -420,8 +428,8 @@ def _refuge_items(
|
||||
{
|
||||
"chainage_m": chainage,
|
||||
"label": " · ".join(name for name in ("대피소", "사토장") if name in labels),
|
||||
"x": x + nx * _REFUGE_OFFSET_M,
|
||||
"y": y + ny * _REFUGE_OFFSET_M,
|
||||
"x": x + nx * offset,
|
||||
"y": y + ny * offset,
|
||||
}
|
||||
)
|
||||
return {"items": items}
|
||||
@@ -464,7 +472,7 @@ def build_pieces(
|
||||
pieces["fill_outline"],
|
||||
pieces["cut_outline"],
|
||||
pieces["slope_ticks"],
|
||||
) = slope_pieces(route, records, start_m, end_m)
|
||||
) = slope_pieces(route, records, start_m, end_m, tick_step_m(scale))
|
||||
if {"ip", "radius"} & set(wanted):
|
||||
pieces["ip"], pieces["radius"] = curve_pieces(_load_design_curves(project_root), route, box)
|
||||
if "station" in wanted:
|
||||
@@ -502,7 +510,7 @@ def build_pieces(
|
||||
items.append({"label": label, "x": x, "y": y, "nx": nx, "ny": ny})
|
||||
pieces["endpoints"] = {"items": items}
|
||||
if "refuge" in wanted:
|
||||
pieces["refuge"] = _refuge_items(project_root, route, start_m, end_m)
|
||||
pieces["refuge"] = _refuge_items(project_root, route, start_m, end_m, scale)
|
||||
if "drainage" in wanted:
|
||||
min_x, min_y, max_x, max_y = box
|
||||
pieces["drainage"] = {
|
||||
|
||||
Reference in New Issue
Block a user