--- type: file-backend status: draft related_pages: ["[[architecture/project_map]]", "[[architecture/workflow_data_flow]]"] page_id: B05_Profile source_file: "B05_Profile/B05_Profile_Router.py" last_updated: 2026-07-25 --- # B05_Profile_Router.py 최적 경로 탐색(solve), 종단 선형 편집 영속화(profile-alignment), 등고선 간격 갱신, 경로 확정(confirm) 및 새로고침 복원(latest) API 엔드포인트를 제공하는 백엔드 라우터 모듈입니다. (700줄 제한 준수를 위해 confirm 병합 헬퍼 4종은 `B05_Profile_Router_Confirm.py`로 분리 이관됨) ## 🛠️ 라우터 API 및 주요 함수 목록 | 항목 | 위치(상대 경로) | 역할 | |---|---|---| | `solve_route()` | `B05_Profile/B05_Profile_Router.py` | `POST /{project_id}/route/solve` — 최적 경로 연산 격발, GeoJSON 생성 및 DRAFT DB 기입 | | `confirm_latest_route()` | `B05_Profile/B05_Profile_Router.py` | `POST /{project_id}/route/confirm` — 경로 CONFIRMED 전이 및 비치명적 비정규 측점 횡단 생성/병합 오케스트레이션 | | `save_profile_alignment()` | `B05_Profile/B05_Profile_Router.py` | `PUT /{project_id}/route/profile-alignment` — 수동 표고 편집 델타 및 R 오버라이드 정본 저장 | | `get_latest_route_design()` | `B05_Profile/B05_Profile_Router.py` | `GET /{project_id}/route/latest` — 최신 경로 메타데이터, 정밀 3D 좌표 및 설정값 반환 (새로고침 복원) | | `update_contour_interval()` | `B05_Profile/B05_Profile_Router.py` | `PUT /{project_id}/route/contour-interval` — 등고선 간격 영속화 | ## 🔗 연관 모듈 및 의존성 - [[B05_Profile/backend/B05_Profile_Router_Confirm]] — confirm 처리 시 병합 헬퍼 모듈 호출 - [[concepts/workflow_state]] — stage 2 (`IN_PROGRESS`, `COMPLETE`, `STALE`) 전이 관리 - [[db_schema/route_profile/longitudinal_alignment]] — `profile_alignment` 스키마 정본 저장 - `B05_Profile_Engine_Sections.py` — `generate_irregular_sections` 백필 엔진 호출