fix(763-1): 추천노선 = 확정 지표면에서만 — 확정 전 409 · 비용면 = 굳힌 격자 마디 · 조용한 DTM 대체 걷음
- `confirmed_surface_params()` — stage 1 COMPLETE · params 에 source_filter 있을 때만 · 아니면 None - compute_initial = 확정 전 409 「지표면 확정 전 — B04 [확정] 뒤 추천이 생김」 · 미리 셈 지형 = [](건너뜀 로그) - Solver implicit 갈래 = `implicit_grid_npz` 마디 그대로(RBF 다시 안 셈 · 짓기 16.2 s → 0.02 s · 유효 칸 최대차 0.00003 m) - 모델 파일 없음 · 깨짐 = 까닭 그대로 FileNotFoundError · ValueError(409) · 서명에 굳힌 격자(서명 전에 지음) - 시험 224_3 · 351_1 · 509_5 의 확정 갈아 끼우기를 새 함수로 옮김(라우터가 새 함수를 부름) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -75,9 +75,10 @@ async def compute_initial(
|
||||
)
|
||||
from B05_Profile.B05_Profile_Router_RouteInitial_Initial import initial_profile_of
|
||||
from common_util.common_util_surface_confirmation import (
|
||||
NOT_CONFIRMED,
|
||||
analysis_terrain_params,
|
||||
confirmed_surface_params,
|
||||
design_terrain,
|
||||
get_surface_confirmation_params,
|
||||
)
|
||||
|
||||
weights = request.weights.model_dump() if request.weights else None
|
||||
@@ -117,7 +118,9 @@ async def compute_initial(
|
||||
target_pct = criteria.target_grade_pct if criteria else None
|
||||
pool = get_db_pool()
|
||||
async with pool.acquire() as connection:
|
||||
selection = await get_surface_confirmation_params(connection, str(project_id))
|
||||
selection = await confirmed_surface_params(connection, str(project_id))
|
||||
if selection is None: # 확정 전 — 기본값으로 셈하지 않음(763-1)
|
||||
return JSONResponse(status_code=409, content={"status": "error", "message": NOT_CONFIRMED})
|
||||
# 화면은 늘 분석 지형을 실음 — 설계 지형과 같으면 설계 지형(미리 셈 갈래 판정 · 505-1)
|
||||
picked = None if request.terrain == design_terrain(selection) else request.terrain
|
||||
selection = analysis_terrain_params(selection, picked)
|
||||
@@ -320,16 +323,19 @@ async def precompute_defaults(project_id: UUID) -> None:
|
||||
|
||||
|
||||
async def precompute_terrains(project_id: UUID, project_root: Path) -> list[Any]:
|
||||
"""미리 셈 지형(509-5) — 설계 지형 먼저 · 추천 창이 고를 수 있는 다른 지형."""
|
||||
"""미리 셈 지형(509-5) — 설계 지형 먼저 · 추천 창이 고를 수 있는 다른 지형 · 확정 전 = []."""
|
||||
from B05_Profile.B05_Profile_Router_Terrain import _MODELS_SUBDIR, choosable_terrains
|
||||
from common_util.common_util_surface_confirmation import (
|
||||
confirmed_surface_params,
|
||||
design_terrain,
|
||||
get_surface_confirmation_params,
|
||||
)
|
||||
|
||||
pool = get_db_pool()
|
||||
async with pool.acquire() as connection:
|
||||
params = await get_surface_confirmation_params(connection, str(project_id))
|
||||
params = await confirmed_surface_params(connection, str(project_id))
|
||||
if params is None: # 확정 전 — 셀 지형 없음(763-1)
|
||||
logger.info("추천 미리 셈 건너뜀(지표면 확정 전): project_id=%s", project_id)
|
||||
return []
|
||||
sources = await choosable_terrains(
|
||||
connection, project_id, params, Path(project_root) / _MODELS_SUBDIR
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user