원본 도면 뷰를 3D 모델 기준면에 투영

This commit is contained in:
김지영 committed 2026-10-20 15:14:22 +09:00
1 parent f8ecd4f5c0
commit 27b3230dba
18 files changed
+489 -15

No files matched your search

+7
View File
@@ -2,6 +2,8 @@
"""Vite 빌드 결과를 독립 실행 가능한 BLOCK8 HTML로 묶는다."""
from html.parser import HTMLParser
import base64
import json
from pathlib import Path
import re
@@ -33,6 +35,10 @@ def main():
js = (DIST / "assets" / parser.script).read_text(encoding="utf-8")
css = (DIST / "assets" / parser.stylesheet).read_text(encoding="utf-8")
image_map = {}
for name in ("plan", "upper-plan", "longitudinal", "section-a", "section-b"):
image = ROOT / "public/drawing-images" / f"BLOCK8_{name}.svg"
image_map[name] = "data:image/svg+xml;base64," + base64.b64encode(image.read_bytes()).decode("ascii")
# public 폴더 안의 자료 링크가 file:// 환경에서도 열리도록 상대 경로로 바꾼다.
for path in ("analysis/", "drawings/", "BLOCK8_", "작업기록.txt"):
js = js.replace(f"/{path}", f"./{path}")
@@ -51,6 +57,7 @@ def main():
</head>
<body>
<div id="root"></div>
<script>window.BLOCK8_DRAWING_IMAGES={json.dumps(image_map, ensure_ascii=False)};</script>
<script>{js}</script>
</body>
</html>