feat(B05): 3D 방식 등록부에 제안 ② 단일 삼각망 한 줄 등록 · 등록부 시험(115-6)
- 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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EYJJRCfHfdCGNhmXTjQKV7
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user