From de1fc63260656369b057c3f6303d16ed0dfc3918 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sat, 10 Oct 2026 11:50:59 +0900 Subject: [PATCH] =?UTF-8?q?feat(b05):=203D=20=ED=9D=91=EB=B0=B1=20?= =?UTF-8?q?=EC=A7=80=ED=98=95=20=C2=B7=20=EB=93=B1=EA=B3=A0=EC=84=A0=20?= =?UTF-8?q?=EC=B2=98=EC=9D=8C=20=EA=B0=92=20=EA=BA=BC=EC=A7=90=20=E2=80=94?= =?UTF-8?q?=20=EB=8B=A8=EC=B6=94=20=C2=B7=20=EB=B7=B0=EC=96=B4=20=EB=91=90?= =?UTF-8?q?=20=EA=B3=B3(176-2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01QND7Co43B24zK2P937rdxt --- B05_Profile/B05_Profile_UI_Panel_View.ts | 6 ++--- B05_Profile/B05_Profile_UI_Viewer.ts | 5 ++-- resources/tester/test_176_2_view_defaults.py | 27 ++++++++++++++++++++ 3 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 resources/tester/test_176_2_view_defaults.py diff --git a/B05_Profile/B05_Profile_UI_Panel_View.ts b/B05_Profile/B05_Profile_UI_Panel_View.ts index b09d2e0e0..93e751618 100644 --- a/B05_Profile/B05_Profile_UI_Panel_View.ts +++ b/B05_Profile/B05_Profile_UI_Panel_View.ts @@ -62,13 +62,13 @@ export function createViewControls(callbacks: ViewControlCallbacks): { toggleButton("지표면", true, callbacks.onSurfaceVisible), // 예상형상(2026-08-23): ON=공사 후 형상(기본), OFF=원지반 완전체. toggleButton("예상형상", true, callbacks.onCorridorVisible), - toggleButton("등고선", true, callbacks.onContoursVisible), + // 등고선 · 흑백 지형 기본 꺼짐(176-2) — 뷰어 처음 값과 맞춘다. + toggleButton("등고선", false, callbacks.onContoursVisible), toggleButton("축 표시", false, callbacks.onAxesVisible), toggleButton(L("B05_Route_Field_StationLines"), true, callbacks.onStationLinesVisible), toggleButton(L("B05_Route_Field_StationLabels"), true, callbacks.onStationLabelsVisible), // 무지개 고도색이 헷갈릴 때 명도만 남기는 흑백 표시(2026-08-05 사용자 요청). - // 기본 켜짐(2026-08-23 사용자 확정) — 예상형상 색이 지형 고도색에 묻히지 않는다. - toggleButton("흑백 지형", true, callbacks.onSurfaceGrayscale), + toggleButton("흑백 지형", false, callbacks.onSurfaceGrayscale), ); // [3D 업데이트](2026-09-01 사용자 지시) — 계획선을 고칠 때마다 3D가 따라오면 조작이 // 무거워, 갱신을 이 버튼으로 모았다. 편집이 쌓이면 is-pending으로 알리고, 누르는 동안은 diff --git a/B05_Profile/B05_Profile_UI_Viewer.ts b/B05_Profile/B05_Profile_UI_Viewer.ts index 64591f2cc..fde2c5705 100644 --- a/B05_Profile/B05_Profile_UI_Viewer.ts +++ b/B05_Profile/B05_Profile_UI_Viewer.ts @@ -182,6 +182,7 @@ export function createRouteViewer(): RouteViewer { return heightIndex.triangleCount > 0 ? heightIndex : null; } const contours = new THREE.Group(); + contours.visible = false; // 기본 꺼짐(176-2) — 패널 토글 처음 값과 맞춘다. scene.add(contours); let bounds: ModelBounds | null = null; let current: { projectId: string; modelId: number; smooth: boolean; interval: number } | null = @@ -386,8 +387,8 @@ export function createRouteViewer(): RouteViewer { // 지표면 흑백 표시(2026-08-05 사용자 요청). 정점색 배열을 한 번 바꿔치기하는 것뿐이라 // (원본은 색 버퍼 열쇠 `ORIGINAL_COLORS`에 보관, 재질·셰이더 교체 없음) 로딩·회전 속도에 영향이 없다. - // 기본 흑백 지형(2026-08-23 사용자 확정) — 패널 토글 초기값과 맞춘다. - let surfaceGrayscale = true; + // 기본 꺼짐(176-2) — 패널 토글 초기값과 맞춘다. + let surfaceGrayscale = false; function applySurfaceGrayscale(): void { [terrain, corridor.clipped()].forEach((target) => applyGrayscaleTo(target)); } diff --git a/resources/tester/test_176_2_view_defaults.py b/resources/tester/test_176_2_view_defaults.py new file mode 100644 index 000000000..9bc03950b --- /dev/null +++ b/resources/tester/test_176_2_view_defaults.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +"""PLAN 176-2 — B05 3D 흑백 지형 · 등고선 처음 값 false(단추 · 뷰어 두 곳 다).""" + +import os +import re + +ROOT = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "..") + + +def _read(name): + with open(os.path.join(ROOT, "B05_Profile", name), encoding="utf-8") as f: + return f.read() + + +def test_panel_buttons_start_off(): + src = _read("B05_Profile_UI_Panel_View.ts") + assert re.search(r'toggleButton\("등고선", false,', src) + assert re.search(r'toggleButton\("흑백 지형", false,', src) + + +def test_viewer_starts_off(): + src = _read("B05_Profile_UI_Viewer.ts") + assert "let surfaceGrayscale = false;" in src + # 등고선 그룹은 만들자마자 숨김(적재 때 선은 그대로 만들고 단추로 켬) + assert re.search( + r"const contours = new THREE\.Group\(\);\s*\n\s*contours\.visible = false;", src + )