From d9f6fbdff1f9d7655e2c3c318b7535e5574f7444 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sat, 8 Aug 2026 18:21:22 +0900 Subject: [PATCH] =?UTF-8?q?fix(B05):=20=EC=9C=A0=EB=A0=B9=20=EB=A7=88?= =?UTF-8?q?=EC=BB=A4=EA=B0=80=20=EA=B3=84=EC=86=8D=20=EB=9C=A8=EB=8D=98=20?= =?UTF-8?q?=EC=9D=B4=EC=9C=A0=20=E2=80=94=20=ED=99=94=EB=A9=B4=EC=9D=B4=20?= =?UTF-8?q?=ED=91=9C=EA=B3=A0=20null=EC=9D=84=200=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=88=95=ED=9E=88=EA=B3=A0=20=EC=9E=88=EC=97=88=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 앞 커밋(53ab941)에서 "표고 없는 점은 안 그린다"를 넣었는데도 그대로 보였다. restorePoints -> placed()가 마커에 넘기기 전에 z: point.z ?? 0으로 바꿔, 마커 쪽에서는 표고를 아는 점(0m)으로 보였기 때문이다. 판정이 걸릴 자리가 없었다. - PlacedRoutePoint.z를 number | null로 바꿔 "모름"을 모름 그대로 들고 다닌다. - placed()는 z ?? null, 서버로 보낼 때(routePoint)만 null -> undefined로 바꾼다. - modelToScene은 표고가 정해진 점만 받는다(z: number) — 호출부에서 이미 해결한 값을 준다. typecheck·prettier 통과. 백엔드가 정적으로 서빙하는 번들(config/node_modules/.build)도 다시 빌드했다 — :8000으로 보면 서버 기동 때 만든 옛 번들이 떠서 수정이 반영되지 않는다. Co-Authored-By: Claude Opus 5 (1M context) --- B05_Profile/B05_Profile_UI_Markers.ts | 5 +++-- B05_Profile/B05_Profile_UI_Page.ts | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/B05_Profile/B05_Profile_UI_Markers.ts b/B05_Profile/B05_Profile_UI_Markers.ts index e7b95c19..0ceb8bf7 100644 --- a/B05_Profile/B05_Profile_UI_Markers.ts +++ b/B05_Profile/B05_Profile_UI_Markers.ts @@ -8,7 +8,8 @@ export interface PlacedRoutePoint { type: RoutePointKind; x: number; y: number; - z: number; + /** 표고(m). `null`은 **모른다**는 뜻 — 계획노선 CSV로 만든 점이 그렇다. 0으로 눕히면 안 된다. */ + z: number | null; radius_m?: number; } @@ -72,7 +73,7 @@ function disposeGroup(group: THREE.Group): void { group.clear(); } -export function modelToScene(point: Pick, bounds: ModelBounds) { +export function modelToScene(point: { x: number; y: number; z: number }, bounds: ModelBounds) { const cx = (bounds.x[0] + bounds.x[1]) / 2; const cy = (bounds.y[0] + bounds.y[1]) / 2; const cz = (bounds.z[0] + bounds.z[1]) / 2; diff --git a/B05_Profile/B05_Profile_UI_Page.ts b/B05_Profile/B05_Profile_UI_Page.ts index f5f1eeb2..2ca77a05 100644 --- a/B05_Profile/B05_Profile_UI_Page.ts +++ b/B05_Profile/B05_Profile_UI_Page.ts @@ -97,7 +97,8 @@ function placed( type, x: point.x, y: point.y, - z: point.z ?? 0, + // 표고를 모르면 모르는 채로 넘긴다 — 0으로 눕히면 마커가 지형 한참 아래 평면에 깔린다. + z: point.z ?? null, ...(type === "ap" || type === "fp" ? { radius_m: (point as CirclePoint).radius_m ?? 25 } : {}), }; } @@ -114,7 +115,8 @@ function restorePoints(latest: RouteLatestResponse): RouteDesignPoints { } function routePoint(point: PlacedRoutePoint): RoutePoint { - return { x: point.x, y: point.y, z: point.z }; + // 서버 스키마는 표고를 빼면 "모름"으로 받는다 — null은 undefined로 바꿔 보낸다. + return { x: point.x, y: point.y, z: point.z ?? undefined }; } function circlePoint(point: PlacedRoutePoint): CirclePoint {