feat(B05 측점): 곡선 측점 — MC 에 측점이 없으면 곡선 측점 하나 더함 (407-1 · 요구 252-2)
- 서버 generate_sections ↔ TS buildStations 짝 · curve_stations ↔ curveStations 짝 · 종류 curve · 열쇠 curve:<누가거리> · 이름 뒤 (MC) - 값 = 스냅 간격 자릿수(0.1 = 소수 한 자리 · 그 밖 · 스냅 끔 = 정수) · 0.005 m 안 측점(일반 · 옮긴 · 관 · 구조물) 있으면 안 더함 · BC · EC 안 더함 · 224-2 옮김 그대로 - 격자 번호 안 가져감 · 노선 저장 이월 열쇠 · B06 종류(curve) · 종단 선 색 · 카드 · 종단 이름 (MC) · 평면 눈금 (MC) · 오른쪽 횡단 일반측점 갈래 - 시험: test_407_curve_station 새로 · 344_3 둘 · 224_2 · 346_1 헬퍼 저장 노선 곡선표 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013QyNXY2TUKXCFMwAca2APG
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
"""측점 열쇠 한 규칙(PLAN 344-3) — 노선이 바뀌어도 같은 측점을 같은 이름으로 부름.
|
||||
|
||||
일반 = ``grid:k``(누가거리 ÷ 측점 간격 반올림) · 관 = ``pipe:<id>`` · 구조물 = ``structure:<id>`` ·
|
||||
시종점 = ``end:BP`` · ``end:EP`` · id 를 모르는 구조물 측점 = ``at:<누가거리 0.01 m>``.
|
||||
시종점 = ``end:BP`` · ``end:EP`` · id 를 모르는 구조물 측점 = ``at:<누가거리 0.01 m>`` ·
|
||||
곡선 측점(MC · 252-2) = ``curve:<누가거리 0.01 m>``.
|
||||
구간형 구조물 시작 · 끝 측점 = ``structure:<id>:start`` · ``:end``(기준 측점은 ``structure:<id>``).
|
||||
한 목록에 같은 열쇠가 둘이면 둘째부터 ``at:<누가거리>``(``dedupe_station_keys``).
|
||||
|
||||
@@ -50,6 +51,8 @@ def station_key(
|
||||
return (
|
||||
f"end:{station_id if station_id is not None else ('BP' if chainage_m <= 0 else 'EP')}"
|
||||
)
|
||||
if kind == "curve":
|
||||
return f"curve:{chainage_key(chainage_m)}"
|
||||
if kind in ("pipe", "structure"):
|
||||
return f"{kind}:{station_id}{suffix}" if station_id else loose
|
||||
if kind == "irregular":
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* 측점 열쇠 한 규칙(PLAN 344-3) — 노선이 바뀌어도 같은 측점을 같은 이름으로 부름.
|
||||
* 일반 = `grid:k`(누가거리 ÷ 측점 간격 반올림) · 관 = `pipe:<id>` · 구조물 = `structure:<id>` ·
|
||||
* 시종점 = `end:BP` · `end:EP` · id 를 모르는 구조물 측점 = `at:<누가거리 0.01 m>`(옛 초안 열쇠와 같은 몫).
|
||||
* 곡선 측점(MC · 252-2) = `curve:<누가거리 0.01 m>`.
|
||||
* 구간형 구조물의 시작 · 끝 측점 = `structure:<id>:start` · `:end`(기준 측점은 `structure:<id>` 그대로).
|
||||
* 한 목록에 같은 열쇠가 둘이면 둘째부터 `at:<누가거리>`(`dedupeStationKeys`).
|
||||
* 쓰는 곳 = 서버 `B05_Profile_Route_Save_Parts` · 묶음 stations 단계 · B06 세션 횡단 초안(`stationKeysOf`).
|
||||
@@ -11,9 +12,9 @@
|
||||
* 고치고 거울 시험 `resources/tester/test_344_3_station_key_mirror.py`.
|
||||
* ========================================================================== */
|
||||
|
||||
/** 측점 종류 — 서버 측점 `kind`(bp · ep · regular · irregular) · 묶음 측점 `kind`(grid · end · pipe · structure). */
|
||||
/** 측점 종류 — 서버 측점 `kind`(bp · ep · regular · irregular · curve) · 묶음 측점 `kind`(grid · end · pipe · structure · curve). */
|
||||
export type StationKeyKind =
|
||||
"bp" | "ep" | "regular" | "irregular" | "grid" | "end" | "pipe" | "structure";
|
||||
"bp" | "ep" | "regular" | "irregular" | "grid" | "end" | "pipe" | "structure" | "curve";
|
||||
|
||||
/** 구간형 구조물 측점 자리 — 기준(anchor) · 시작 · 끝. */
|
||||
export type StationKeyRole = "anchor" | "start" | "end";
|
||||
@@ -40,6 +41,7 @@ export function stationKey(
|
||||
if (kind === "bp") return "end:BP";
|
||||
if (kind === "ep") return "end:EP";
|
||||
if (kind === "end") return `end:${id ?? (chainageM <= 0 ? "BP" : "EP")}`;
|
||||
if (kind === "curve") return `curve:${chainageKey(chainageM)}`;
|
||||
if (kind === "pipe" || kind === "structure") return id ? `${kind}:${id}${suffix}` : loose;
|
||||
if (kind === "irregular") return id ? `${idKind}:${id}${suffix}` : loose;
|
||||
if (kind === "grid" && id !== null) return `grid:${id}`;
|
||||
|
||||
Reference in New Issue
Block a user