refactor(472-4 ① 추가 측점 따라감): 서버 추가 측점 따라감도 TS 한 벌 — followPlusRows · Node 입구 facility.plus_follow

- common_util_route_follow.ts followPlusRows(땅 위 자리 → 새 노선 정수 m · 같은 m 하나) · followPlusStations 가 그것을 씀
- Plus_Stations.follow_plus_stations = run_calc 겉(옮긴 수 · 쓰기 그대로) · follow_structures 끌림 걷음
- 등록부 node:facility.plus_follow · NODE_IDS · 시험 test_472_4_follow_node(옛 코드 빨강) · 368_2 · 459 통과

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-19 09:37:00 +09:00
co-authored by Claude Opus 5.5
parent cca08daa11
commit 39adebdaf5
7 changed files with 90 additions and 32 deletions
@@ -41,6 +41,7 @@ NODE_IDS = {
"excavation.trench",
"corridor.mesh",
"profile.seat",
"facility.plus_follow",
}
pytestmark = pytest.mark.skipif(
+22 -1
View File
@@ -1,7 +1,8 @@
"""PLAN 472-4 ① — 측점 열쇠 · 시설 따라감 · 추가 측점 · 꼭짓점 세움을 서버도 같은 TS(Node 입구)로 셈.
"""PLAN 472-4 ① — 측점 열쇠 · 시설 따라감 · 추가 측점 · 꼭짓점 세움 = 서버도 같은 TS(Node 입구).
파이썬 짝을 걷고 서버 부름 자리는 `common_util_calc_runner.run_calc`(등록부 id) 한 길 —
profile.seat `Router_Confirm._seat_born_nodes`(측점 병합 · 노선 저장 `_carry_profile`)
facility.plus_follow `Plus_Stations.follow_plus_stations`(노선 저장)
고정 자료 = `fixtures/golden_472/detail.json`(472-1 · 읽기만).
./venv/Scripts/python.exe -m pytest resources/tester/test_472_4_follow_node.py -q
@@ -57,3 +58,23 @@ def test_세울_자리_없으면_Node_안_부름(calls) -> None:
stored = DETAIL["longitudinal"]["profile_alignment"]
assert confirm._seat_born_nodes(stored, stored["base_pvi"], [351.0]) == stored["base_pvi"]
assert calls == []
def test_추가_측점_따라감은_Node_입구(tmp_path, monkeypatch) -> None:
from B05_Profile import B05_Profile_Plus_Stations as plus
seen: list[list[str]] = []
def spy(ids, inputs):
seen.append(list(ids))
return runner.run_calc(ids, inputs)
monkeypatch.setattr(plus, "run_calc", spy)
old = [(0.0, 0.0), (100.0, 0.0)]
plus.save_plus_stations(tmp_path, [30.0, 60.0], old)
new = [(0.0, 5.0), (40.0, 5.0), (100.0, 25.0)] # 땅 위 자리를 새 노선에 투영
moved = plus.follow_plus_stations(tmp_path, new)
assert seen == [["facility.plus_follow"]]
rows = plus.load_plus_stations(tmp_path)
assert moved == 1 and [row["chainage_m"] for row in rows] == [30.0, 57.0] # 옛 파이썬 값
assert [(row["x"], row["y"]) for row in rows] == [(30.0, 0.0), (60.0, 0.0)] # 좌표 그대로