diff --git a/B06_Section/B06_Section_Router.py b/B06_Section/B06_Section_Router.py index 52987849..009f1010 100644 --- a/B06_Section/B06_Section_Router.py +++ b/B06_Section/B06_Section_Router.py @@ -367,10 +367,26 @@ def _regeneration_grade_options(stage_params: dict[str, Any] | None) -> GradeDes ) +def _extra_stations(stored_options: dict[str, Any] | None) -> tuple[tuple[float, str], ...]: + """구조물(비정규) 측점 목록 — 재생성해도 유지돼야 한다. + + 옵션 스냅샷(data.options.extra_stations)이 비정규 측점의 단일 소스다. 재생성 옵션에 + 이 목록을 빼먹으면 구조물 측점이 통째로 지워진다 — 반폭 확대만으로 구조물 횡단도가 + 사라졌다(2026-08-23 사용자 보고). + """ + snapshot = (stored_options or {}).get("extra_stations") or [] + return tuple( + (float(entry[0]), str(entry[1])) + for entry in snapshot + if isinstance(entry, (list, tuple)) and len(entry) >= 2 + ) + + def _regeneration_options( stored_options: dict[str, Any] | None, stage_params: dict[str, Any] | None, cross_half_width_m: float, + extra_stations: tuple[tuple[float, str], ...] = (), ) -> SectionGenerationOptions: """DB 저장 옵션(단일 소스) → stage 2 params → config 순으로 유지하고 반폭만 교체한다.""" defaults = SectionGenerationOptions() @@ -386,6 +402,7 @@ def _regeneration_options( cross_sample_interval_m=pick("cross_sample_interval_m", defaults.cross_sample_interval_m), long_sample_interval_m=pick("long_sample_interval_m", defaults.long_sample_interval_m), include_endpoint=defaults.include_endpoint, + extra_stations=extra_stations, ) @@ -426,6 +443,7 @@ async def regenerate_sections( stored_options, stage_params, request.cross_half_width_m, + _extra_stations(stored_options), ), # 계획선까지 함께 재계산·저장 — 없으면 계획 횡단도선·유토곡선이 사라진다. grade_options=_regeneration_grade_options(stage_params), diff --git a/ui_template/ui_template_locale_b2.ts b/ui_template/ui_template_locale_b2.ts index d07b940f..16748df3 100644 --- a/ui_template/ui_template_locale_b2.ts +++ b/ui_template/ui_template_locale_b2.ts @@ -464,6 +464,15 @@ export const ui_locales_b2 = { "Some stations have no ground type assigned.", ], + /* --- B06 횡단 보기 설정(반폭) --- */ + B06_View_Title: ["횡단 보기 설정", "Cross-section view"], + B06_View_Apply: ["보기 반폭 적용", "Apply view width"], + B06_View_Apply_Tip: [ + "표시 반폭만 바로 반영합니다(측점 설계 재계산 없음). 계산 반폭(20m)을 넘는 값만 재생성이 필요해 시간이 걸립니다.", + "Applies the display half-width only (no per-station redesign). Only values beyond the sampled 20 m need regeneration.", + ], + B06_View_Apply_Success: ["표시 반폭을 반영했습니다.", "Display half-width applied."], + /* --- B06 표준 횡단면 설정 패널 --- */ B06_Std_Title: ["표준 횡단면 설정", "Standard cross-section"], B06_Std_Group_Soil: ["토사 구간", "Soil section"],