feat(475-3 요구 275-3): 노선이 바뀌면 자리 칸(암 경계 · 2단 경사 · 손 상단측)은 같은 자리 측점만 넘김 — 새 자리 = 기본값

- 자리 칸 목록 한 벌 = TS `SEAT_KEYS`(Station_Swap · 파이썬 Router_Design 이 그 글을 읽음) — two_stage_slope · rock_boundary_offset_m · cut_slope_ratio_user · section_mode · ditch_side
- 자리 판정 한 벌 = `sameSeat` ↔ 파이썬 `same_seat`(중심 0.01 m · 왼쪽 축 1e-3 · 모르면 같은 자리 = 옛 동작)
- 끌기 세션 넘김 · Node stations.carry = `carryKeyedStates`(목록 측점 자리 · 값마다 쓴 때 자리 `@seat` — 되돌리기로 되살린 값도 제 자리로)
- 미리보기 = `pipelineCrossSource` 가 저장분 · 세션 자리 칸에 자리째 실음 → `crossAtSeat` 가 새 자리면 뺌
- B06 갈아끼움(노선 초안) = 자리 바뀐 측점 설계의 자리 칸 걷고 기본값(`unseated` · 브레인 덧)
- 서버 노선 저장 = `carry_cross_inputs` 자리 칸 같은 자리만 · 손 단면 유형 · 측구 방향 = `compute_default_designs` 입력
- 옛 단언 시험 고침(자리 모름 목록 = 같은 자리 = 손 상단측도 넘김 · 「@seat」 칸 거름) · 새 시험 test_475_3_seat_carry
- 위키 rules 넘김 규칙 줄

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-19 14:29:38 +09:00
co-authored by Claude Opus 5.5
parent 11b307d1ca
commit a02367e615
23 changed files with 729 additions and 72 deletions
+17 -10
View File
@@ -115,16 +115,20 @@ STRUCTURE_ADJUST_KEYS = (
# 조작값은 넘기지 않는다. 받는 쪽은 `compute_default_designs(carried=…)`.
# 칸 목록 정본 = TS `ROW_CARRY_KEYS`(logic/B06_Section_Station_Swap.ts) — 그 글을 읽음(472-4 ① X6).
_SWAP_TS = Path(__file__).resolve().parent / "logic" / "B06_Section_Station_Swap.ts"
CARRY_INPUT_KEYS: tuple[str, ...] = tuple(
re.findall(
r'"([a-z_0-9]+)"',
re.search(
r"export const ROW_CARRY_KEYS = \[(.*?)\] as const;",
_SWAP_TS.read_text(encoding="utf-8"),
re.S,
).group(1),
def _ts_keys(name: str) -> tuple[str, ...]:
"""TS 목록 글(`export const NAME = [ "…" ] as const;`)의 칸 이름."""
body = re.search(
rf"export const {name} = \[(.*?)\] as const;", _SWAP_TS.read_text(encoding="utf-8"), re.S
)
)
return tuple(re.findall(r'"([a-z_0-9]+)"', body.group(1)))
CARRY_INPUT_KEYS: tuple[str, ...] = _ts_keys("ROW_CARRY_KEYS")
# 자리 칸(요구 275-3 · 암 경계 · 2단 경사 · 손 상단측) — 노선이 바뀌면 같은 자리 측점만 넘김 ·
# 정본 = TS `SEAT_KEYS`(같은 파일).
SEAT_KEYS: tuple[str, ...] = _ts_keys("SEAT_KEYS")
def stored_standard_cross_section(longitudinal_row: dict[str, Any] | None) -> dict[str, Any] | None:
@@ -580,12 +584,15 @@ def compute_default_designs(
samples,
design_elevation_from_longitudinal(longitudinal, chainage_m),
ground_type=str(user.get("ground_type") or "ripping_rock"),
section_mode=default_modes.get(
# 손 상단측(같은 자리로 넘긴 단면 유형 · 측구 방향 · 요구 275-3) · 없으면 상단측
section_mode=user.get("section_mode")
or default_modes.get(
round(chainage_m, 3),
f"{cross['uphill_side']}_cut"
if cross.get("uphill_side") in ("left", "right")
else "left_cut",
),
ditch_side=user.get("ditch_side"),
ditch_type=str(user.get("ditch_type") or "standard"),
# 포장은 사용자 구간 지정만 켠다 — 경사 제안은 경고로만 남는다(2026-08-28).
paved=paved_at(chainage_m, paved_ranges),