fix: automate GLB compression and real viewport smoke

This commit is contained in:
2026-07-10 13:19:47 +08:00
parent 78ec1fbdcc
commit cab4d320c0
6 changed files with 43 additions and 10 deletions

View File

@@ -22,6 +22,8 @@ The detector:
Pass every detector output config to audit with `--frames`. Account for every detected plan frame in extraction config or `discarded_frames` with a nonempty reason.
The detector emits sheet-level proposals. Two different plan titles can sit inside one title-block/frame INSERT and therefore receive the same broad clip (for example `一层平面图` plus `夹层平面图`, or `二层平面图` plus `十六层平面图`). Never duplicate that shared clip across floors. Split it at the wall-cluster gap between title positions, then recompute each floor offset. Use independent declared area/storey evidence to prove the split; a roughly 2× footprint is the characteristic failure signal.
## Alignment Evidence
Prefer structural-grid voting. TArch grids often live on `DOTE`, not `AXIS`. When through grids are absent, accept tick-grid voting. When no axes exist, use wall-profile correlation independently in X/Y. Use clip-corner anchoring only as a weak fallback.
@@ -38,7 +40,7 @@ Set explicit `z`, `height`, and `floor_order`. The schema rejects floor-order ga
## Clip Risks
Title-block or refined clips can still swallow adjacent rows, details, legends, or revision tables. Investigate when a footprint dimension is 2-4x its siblings or contains distant sliver polygons. Tighten the clip band or use isolated-cluster filtering; do not simply raise noise thresholds until the artifact disappears.
Title-block or refined clips can still swallow adjacent rows, details, legends, or revision tables. Investigate when a footprint dimension is 2-4x its siblings, exceeds declared area, or contains distant sliver polygons. Tighten both X/Y clip bands or use evidence-backed isolated-cluster filtering; do not simply raise noise thresholds until the artifact disappears. Inspect the final browser screenshot too: repeated floating strips at every storey usually mean off-envelope plan symbols survived the clip.
## TArch Mapping Preset

View File

@@ -18,6 +18,8 @@ Deliver three variants for Web/digital-twin presentation:
Generate them with `build_showcase_variants.py` or `cad_showcase.py run`. Validate `variants_manifest.json` and every variant spec. Keep `source_file==site` floors intact across variants.
The Trimesh branch of `cad_showcase.py run` writes a retained `.raw.glb` and then runs `tools/compress.mjs` (weld, dedup, prune, Draco) to produce each delivered `.glb`. The Blender branch uses Blender's Draco export. `verify_showcase.py --strict` must see `draco=True` and every delivered variant within the size budget.
Both GLB backends consume versioned `building_spec.json`. They must preserve `<floor>__<category>` names and glTF Y-up. `floor.caps` is canonical; exporters must not independently infer different cap groups.
## Served Viewer
@@ -45,7 +47,7 @@ node scripts/web_smoke_test.mjs \
--screenshots-dir outputs/<project>/browser_smoke
```
Install Playwright/Chromium first when needed. The script checks desktop/mobile control visibility, console/page/request failures, and idle render behavior. Feed the report to final verification with `--browser-report`. Supplying `--web-dir` makes the report mandatory: no report is `BLOCKED`, never PASS.
Install Playwright/Chromium first when needed. The script checks real 1440×900/390×844 viewport dimensions, desktop/mobile control visibility, console/page/request failures, and idle render behavior. Feed the report to final verification with `--browser-report`. Supplying `--web-dir` makes the report mandatory: no report is `BLOCKED`, never PASS.
When an execution tool already has a `run_in_background` option, launch `python3 -m http.server ...` as the foreground command of that background process. Do not append shell `&`; the child server can die with the wrapper. Before presenting the viewer, probe the URL and keep that server process alive. Present the formal `web/index.html` URL when Web was requested; `viewer.html` is a separate offline fallback, not a substitute.