fix(472 덧 관 지움 ↶): 서버 상세 읽기 관 세트 = 지금 노선에 얹은 관 자리 — 측점 계획 · 관 지점 GET · 화면과 한 벌
- 관 지점 정본 지문이 지금 노선과 어긋난 저장분(검증_sub4 · 파일 394 · 좌표 351) — 측점 계획(_load_pipe_points) · GET 은 351 에 얹고 서버 상세 읽기(attach_saved_shapes)만 파일 누가거리로 찾아 351 관 세트 빠짐 → 새로고침 = 관 세트 없음 · 관 지움 ↶ = 화면이 다시 얹어 관 세트 있음(누가토량 갈림) - saved_pipes(노선 경로) — 상세 GET · 재생성 응답 · 설계 미리보기가 노선 경로를 넘김 · 노선 못 읽으면 저장분 그대로 - 시험 test_472_d_pipe_route_attach(옛 코드 실패) · golden 헬퍼도 같은 읽기 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -141,9 +141,32 @@ def attach_shapes(
|
||||
return misses
|
||||
|
||||
|
||||
def attach_saved_shapes(project_root: Path, sections: list[dict[str, Any]]) -> None:
|
||||
"""저장분 현황(관 지점 · 구조물 정본)으로 얹음 — 구조물 정본을 못 읽으면 관만(횡단 조회는 이어 감)."""
|
||||
pipes = read_pipe_points_file(pipe_points_file(project_root))
|
||||
def saved_pipes(project_root: Path, route_data_path: str | None = None) -> list[Any]:
|
||||
"""관 지점 정본 — 노선 경로를 주면 그 노선에 얹어 읽음(472 덧) · 없으면 파일 그대로.
|
||||
|
||||
측점 계획(`_load_pipe_points`) · 관 지점 GET · 화면과 같은 이월 — 지문이 어긋난 옛 저장분도
|
||||
측점이 선 자리에 관 세트가 얹힘."""
|
||||
if route_data_path:
|
||||
from B05_Profile.B05_Profile_Engine_Sections import (
|
||||
_load_pipe_points,
|
||||
_load_route_polyline,
|
||||
)
|
||||
|
||||
try:
|
||||
return _load_pipe_points(
|
||||
project_root, _load_route_polyline(project_root, route_data_path)
|
||||
)
|
||||
except (FileNotFoundError, ValueError):
|
||||
logger.warning("B06 관 지점: 노선을 못 읽어 저장분 그대로 얹음 (%s)", route_data_path)
|
||||
return read_pipe_points_file(pipe_points_file(project_root))
|
||||
|
||||
|
||||
def attach_saved_shapes(
|
||||
project_root: Path, sections: list[dict[str, Any]], route_data_path: str | None = None
|
||||
) -> None:
|
||||
"""저장분 현황(관 지점 · 구조물 정본)으로 얹음 — 관 = 그 노선에 얹은 것(`saved_pipes`) ·
|
||||
구조물 정본을 못 읽으면 관만(횡단 조회는 이어 감)."""
|
||||
pipes = saved_pipes(project_root, route_data_path)
|
||||
try:
|
||||
structures = load_structures(str(project_root))[1]
|
||||
except Exception: # noqa: BLE001 — 정본을 못 읽어도 횡단 조회는 이어 간다
|
||||
|
||||
Reference in New Issue
Block a user