Files
cad-building-showcase/assets/web-showcase-template/index.html
zhengwr 6ace84ffba Campus pipeline hardening: backend parity, wall union, mullion grids, Draco tooling
Sandbox round (Linux):
- detect_sheet_frames.py: multi-frame sheet splitter (column AND row layouts),
  grid-vote per-floor offsets, section-elevation harvesting for storey heights
- dwg_dump_json.mjs + dwgjson_to_dxf.py: WASM libredwg DWG->DXF fallback
  (blocks/INSERT preserved, ATTRIB->TEXT so axis labels survive)
- assemble_campus.py: manifest-driven campus assembly with mandatory
  neighbour-gap gate (overlap = exit 3, 0.1-0.3m flagged as expansion joints)
- site_context_from_dump.py: site-context floors (ground/roads/parking/
  fence/trees/context massings) from site-plan dumps
- write_offline_viewer.py + assets/offline-viewer-libs/: fully-offline
  single-file viewer (vendored three r147 + pako, gzip-embedded GLB)
- audit: clip-scoped coverage figures; report: multi_frame_sheet warning;
  audit gate floors_aligned catches the diagonal-staircase failure mode

Mac round:
- build_blender_showcase.py now honors slab_bounds_fallback and prefers
  footprint polygons for generated roofs (bounds rects made roof plates jut
  past the facade and buried campuses under full-extent slabs); contract now
  matches spec_to_glb.py exactly
- merge_wall_solids (default off) in BOTH backends: shapely union in
  spec_to_glb.py, native delaunay_2d_cdt union in Blender; endpoint-shared
  wall ends pre-extended w/2 so L-corners close seamlessly (flat caps leave
  a notch a union alone cannot fill) while openings stay flat
- glazing_mullions (default off): curtain-wall panel grid (verticals every
  glazing_panel_w + floor-line transoms) as pseudo wall segments in the
  <floor>__walls node; glass pane kept
- build_showcase_variants.py keeps source_file=="site" floors intact in all
  variants (roads/trees live on filtered categories)
- web template: instanced low-poly trees from metadata site_trees,
  grade-level shadow catcher (was at basement depth), data-URI favicon
- tools/compress.mjs deps pinned (package.json); 15MB campus GLB -> 0.57MB
- tests: 24 -> 52 checks (wall union, mullions, byte-identical defaults)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 17:44:41 +08:00

105 lines
3.7 KiB
HTML

<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{{TITLE}}</title>
<link rel="icon" href="data:," /><!-- keep the console free of favicon 404s -->
<link rel="stylesheet" href="./styles.css" />
<script type="importmap">
{
"imports": {
"three": "./node_modules/three/build/three.module.js",
"three/addons/": "./node_modules/three/examples/jsm/"
}
}
</script>
</head>
<body>
<main id="app-shell">
<canvas id="scene"></canvas>
<section class="panel project-panel" aria-label="项目">
<div class="project-title">
<span class="mark"></span>
<div>
<h1 id="project-name">CAD 建筑模型</h1>
<p id="project-description">Web 展示模型</p>
</div>
</div>
<dl class="stats-grid" id="stats"></dl>
</section>
<section class="panel controls-panel" aria-label="控制">
<div class="control-group">
<div class="group-label">楼层</div>
<div class="segmented" id="floor-controls"></div>
</div>
<div class="control-group">
<div class="group-label">构件</div>
<div class="toggle-grid" id="category-controls"></div>
</div>
<div class="control-group">
<div class="group-label">下载</div>
<div class="download-list" id="download-controls"></div>
</div>
<div class="control-group">
<label class="range-row">
<span>楼层展开</span>
<output id="explode-value">0m</output>
</label>
<input id="explode" type="range" min="0" max="16" value="0" step="0.5" />
</div>
<div class="control-group">
<label class="range-row">
<span>剖切高度</span>
<output id="section-value">关闭</output>
</label>
<input id="section" type="range" min="0" max="24" value="24" step="0.25" />
</div>
</section>
<nav class="toolbar" aria-label="视图工具">
<button class="tool-button" data-preset="overview" title="总览" aria-label="总览">
<i data-lucide="home"></i>
</button>
<button class="tool-button" data-preset="top" title="顶视" aria-label="顶视">
<i data-lucide="scan"></i>
</button>
<button class="tool-button" data-preset="side" title="侧视" aria-label="侧视">
<i data-lucide="panel-top"></i>
</button>
<button class="tool-button" id="auto-rotate" title="自动旋转" aria-label="自动旋转">
<i data-lucide="rotate-3d"></i>
</button>
<button class="tool-button" id="reset-view" title="重置视角" aria-label="重置视角">
<i data-lucide="rotate-ccw"></i>
</button>
<button class="tool-button" id="snapshot" title="截图" aria-label="截图">
<i data-lucide="camera"></i>
</button>
<a class="tool-button" href="./model.glb" download title="下载 GLB" aria-label="下载 GLB">
<i data-lucide="download"></i>
</a>
</nav>
<section class="panel inspect-panel" id="inspect" aria-label="选择">
<div class="inspect-title">未选择</div>
<div class="inspect-body">点击模型中的楼层或构件类型</div>
</section>
<div class="loading" id="loading">
<div class="loading-bar"><span id="loading-fill"></span></div>
<div id="loading-text">加载模型</div>
</div>
</main>
<script src="./node_modules/lucide/dist/umd/lucide.js"></script>
<script type="module" src="./app.js?v={{BUILD}}"></script>
</body>
</html>