- B06 구조물 목록 load: 관 초안 없고 저장분에 소수 자리 = `snapPlan` 으로 옮긴 초안(persistPipes) → 카드 · 측점 계획이 B05 를 먼저 연 것과 같음 · 정본은 [저장]에서(B08 사본 이름도 PUT 길) - 서버 관 읽기는 그대로(파일 = 측점) · `project_pipe_points` 끝 = 선 길이 - 시험: test_322_3_flow 견본(85.05 … 982.64) → 85 · 173 · 258 · 352 · 440 · 534 · 620 · 720 · 804 · 900 · 983 · 정수 저장분 = 새 미리 뜬 카드 0 · 소수 저장분 = 정수 자리로 · test_322_3_saved_snap Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ji4nuyLVHcxrXWHTdb5nRD
26 lines
961 B
Python
26 lines
961 B
Python
"""PLAN 322-3 고침 — 노선이 바뀌어 관을 좌표로 옮길 때(투영 이월) 끝 = 선 길이.
|
|
|
|
B05 계획선 꼭짓점은 누가거리 0 으로 와서 끝이 0 으로 잡혀 관이 전부 0 m 로 가던 흠.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import json
|
|
|
|
from B05_Profile.B05_Profile_Engine_Sections import _load_pipe_points
|
|
|
|
LINE = [[0.0, 0.0, 100.0], [300.0, 0.0, 100.0]]
|
|
|
|
|
|
def test_projected_pipes_snap_to_whole_metres_not_zero(tmp_path) -> None:
|
|
folder = tmp_path / "B04_PreProcess" / "drainage" / "edits"
|
|
folder.mkdir(parents=True)
|
|
points = [
|
|
{"chainage_m": 85.05, "source": "user", "x": 90.05, "y": 0.3},
|
|
{"chainage_m": 173.09, "source": "user", "x": 178.4, "y": 0.2},
|
|
]
|
|
(folder / "pipe_points.json").write_text(
|
|
json.dumps({"route_signature": "옛노선", "points": points}), encoding="utf-8"
|
|
)
|
|
assert [pipe.chainage_m for pipe in _load_pipe_points(tmp_path, LINE)] == [90.0, 178.0]
|