- 새 공용 재질 ui_template_contour3d(isMajorContour · contourMaterials) — 주곡선 = 5 m 배수(간격 무관) - 색 = --map-contour-major(진하게 0.95) · --map-contour-minor(토큰 알파 0.45 · 깊이 안 씀) - B05 3D 뷰어 · B04 3D 지형 뷰어 둘 다 옛 주황 두 색 · 간격 × 5 갈래 걷음 · B04 높이 글도 5 m 선에만 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Se7ytqbohmBQnfYpwYFnYf
31 lines
1.2 KiB
Python
31 lines
1.2 KiB
Python
"""353-3 3D 등고선 — 주곡선 5 m 고정 · 1 m 옅게 · 평면 색 토큰(B05 · B04 3D 같은 재질).
|
|
|
|
./venv/Scripts/python.exe -m pytest resources/tester/test_353_3_contour3d_style.py -q
|
|
"""
|
|
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
STYLE = ROOT / "ui_template" / "ui_template_contour3d.ts"
|
|
VIEWERS = [
|
|
ROOT / "B05_Profile" / "B05_Profile_UI_Viewer.ts",
|
|
ROOT / "B04_PreProcess" / "B04_PreProcess_UI_TerrainViewer_Contours.ts",
|
|
]
|
|
|
|
|
|
def test_재질은_평면_색_토큰과_5m_고정() -> None:
|
|
src = STYLE.read_text("utf-8")
|
|
assert '"--map-contour-major"' in src and '"--map-contour-minor"' in src
|
|
assert "CONTOUR_MAJOR_STEP_M = 5;" in src
|
|
# 1 m 선 불투명 = 토큰 알파(0.45) · 주곡선은 진하게
|
|
assert "opacity: minor.alpha" in src and "opacity: 0.95 * major.alpha" in src
|
|
|
|
|
|
def test_두_3D_뷰어가_같은_재질을_씀() -> None:
|
|
for path in VIEWERS:
|
|
src = path.read_text("utf-8")
|
|
assert 'from "@ui/ui_template_contour3d"' in src, path.name
|
|
assert "isMajorContour(" in src and "contourMaterials()" in src, path.name
|
|
# 옛 갈래(간격 × 5 · 주황 두 색) 없음
|
|
assert "interval * 5" not in src and "0xf59e0b" not in src, path.name
|