From 052a3739c475aadc6ce4067220fe4f3b57451142 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Thu, 8 Oct 2026 22:43:16 +0900 Subject: [PATCH] =?UTF-8?q?feat(B05):=203D=20=EB=B0=A9=EC=8B=9D=20?= =?UTF-8?q?=EB=93=B1=EB=A1=9D=EB=B6=80=EC=97=90=20=EC=A0=9C=EC=95=88=20?= =?UTF-8?q?=E2=91=A1=20=EB=8B=A8=EC=9D=BC=20=EC=82=BC=EA=B0=81=EB=A7=9D=20?= =?UTF-8?q?=ED=95=9C=20=EC=A4=84=20=EB=93=B1=EB=A1=9D=20=C2=B7=20=EB=93=B1?= =?UTF-8?q?=EB=A1=9D=EB=B6=80=20=EC=8B=9C=ED=97=98(115-6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - B05_Profile_UI_Corridor_Modes.ts CORRIDOR_MODES 에 id proposal2(노면부만 그림 · 지형 = tinTerrain) - test_115_6_corridor_tin.py 8(등록부 하나 더) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01EYJJRCfHfdCGNhmXTjQKV7 --- B05_Profile/B05_Profile_UI_Corridor_Modes.ts | 9 ++++++++- resources/tester/helper_115_6_corridor_tin.cjs | 13 +++++++++++++ resources/tester/test_115_6_corridor_tin.py | 7 +++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/B05_Profile/B05_Profile_UI_Corridor_Modes.ts b/B05_Profile/B05_Profile_UI_Corridor_Modes.ts index fd91d5a7c..c613cbfec 100644 --- a/B05_Profile/B05_Profile_UI_Corridor_Modes.ts +++ b/B05_Profile/B05_Profile_UI_Corridor_Modes.ts @@ -17,6 +17,7 @@ import type { TerrainHeightIndex } from "./B05_Profile_UI_Corridor_Terrain"; import type { TerrainBandSplit } from "./B05_Profile_UI_Corridor_Split"; import { buildPatchSkirts } from "./B05_Profile_UI_Corridor_Skirt"; import { deformTerrain } from "./B05_Profile_UI_Corridor_Deform_Terrain"; +import { tinTerrain } from "./B05_Profile_UI_Corridor_Tin"; import { legacyCorridorOf, legacyReady } from "./B05_Profile_UI_Corridor_Legacy"; import { readStateRaw, writeStateRaw } from "../A00_Common/b_page_state"; @@ -156,7 +157,13 @@ export const CORRIDOR_MODES: CorridorMode[] = [ terrain: ({ split, build, bounds, heightIndex }) => heightIndex ? deformTerrain(split, build, bounds, heightIndex) : null, }, - // 제안 ② — 다른 창이 여기 한 줄: { id: "proposal2", corridor: …, terrain: … }, + // 제안 ②(115-6) — 노면부만 그리고 비탈 · 지형 이음은 단일 삼각망(TIN). + { + id: "proposal2", + corridor: (build) => roadOnly(build), + terrain: ({ split, build, bounds, heightIndex }) => + heightIndex ? tinTerrain(split, build, bounds, heightIndex) : null, + }, ]; export function modeOf(id: CorridorModeId): CorridorMode | null { diff --git a/resources/tester/helper_115_6_corridor_tin.cjs b/resources/tester/helper_115_6_corridor_tin.cjs index 9f7ed3f25..b1aa8229b 100644 --- a/resources/tester/helper_115_6_corridor_tin.cjs +++ b/resources/tester/helper_115_6_corridor_tin.cjs @@ -554,4 +554,17 @@ const r6 = (v) => Math.round(v * 1e6) / 1e6; results.berm = { stats: out.stats, missing, sectionErr: r6(sectionErr), gaps: gap.gaps }; } +// ⑤ 3D 방식 등록부(115-5) — 「제안 ②」 자리에 TIN 지형이 등록됐나. +{ + globalThis.window = globalThis.window || {}; + const Modes = loadTs(B05("B05_Profile_UI_Corridor_Modes")); + const mode = Modes.modeOf("proposal2"); + results.registry = { + slot: Modes.MODE_SLOTS.some(([id]) => id === "proposal2"), + registered: Boolean(mode), + hasTerrain: typeof mode?.terrain === "function", + noIndex: mode?.terrain ? mode.terrain({ heightIndex: null }) : "none", + }; +} + process.stdout.write(JSON.stringify(results)); diff --git a/resources/tester/test_115_6_corridor_tin.py b/resources/tester/test_115_6_corridor_tin.py index 2eb65b456..e0ad94d7d 100644 --- a/resources/tester/test_115_6_corridor_tin.py +++ b/resources/tester/test_115_6_corridor_tin.py @@ -73,6 +73,13 @@ def test_berm_bend_lines(results): assert r["gaps"] == 0 +def test_registered_as_proposal2(results): + r = results["registry"] + assert r["slot"] is True + assert r["registered"] is True and r["hasTerrain"] is True + assert r["noIndex"] is None # 높이 색인 없으면 다른 방식(띠 자르기)으로 + + def test_dependencies_two_only(): with open(os.path.join(ROOT, "config", "package.json"), encoding="utf-8") as f: deps = json.load(f)["dependencies"]