Commit Graph

3 Commits

Author SHA1 Message Date
12ddc9488d detect_sheet_frames: wildcard axis-layer defaults (prefixed-layer institutes)
13号地块 prefixes every layer (A_DOTE/A_AXIS/A_WALL); the exact-token
axis defaults silently zeroed grid-correlation votes for all 44 frames.
Defaults now *AXIS*/*DOTE*; rowframe fixture gains a layer_prefix="A_"
variant asserting the grid still votes (no WEAK).

Logged open item: the tower sheets still vote 0 after the pattern fix —
axis stubs vs full-span grid lines or clip-window semantics, to debug next
round; plus the plot-13 storey table and the finding that per-floor
multi-clip stitching already works via repeated floor keys.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 21:36:01 +08:00
221626b1c7 Generalization hardening from test3d-7 round 1 (黄桥文体中心): 8 gap fixes
Conversion/encoding chain (libredwg on Chinese TArch DWGs):
- run_dwg2dxf: capture bytes, decode leniently (GBK console output crashed
  the batch under subprocess text=True)
- sanitize_dxf_comments: byte-level, code/value pair walk — the UTF-8
  errors="ignore" round-trip mangled every GBK CJK string ("一层平面图"
  -> "一平图") and eating XRECORD "999" VALUE lines corrupted files
- read_doc: recover fallback also on ValueError; scrub_surrogates keeps one
  corrupt drawing from killing the whole report
- decode_mif in report + frame detector: \M+5XXXX escapes (whole 黄桥 set)
  restored so plan-title detection works at all
- ODA auto-fallback: reconvert DWGs whose libredwg DXF fails inspection or
  reads an empty modelspace (黄桥 plans: 0 entities via dwg2dxf, 21k via
  ODA); env ODA_CONVERTER override, fake-converter regression test

Frame detection:
- detect_sheet_frames expands INSERTs (memoized, depth<=3) when collecting
  axis/wall lines — 黄桥 wraps each frame's grid in anonymous A$C... blocks
  (msp had 8 DOTE lines, blocks held 700); all 7 frames went from WEAK
  clip-corner fallback to grid-aligned votes x=14

Extraction judgment rules (both loud, both default-on, both switchable):
- drop_isolated_clusters: tiny segment clusters far from the main mass are
  sheet-legend content drawn on real layers (title-block window symbols made
  every floor's footprint grow a sliver fin)
- drop_unsupported_roof_lines: roof outlines with no footprint/cap plate
  within 2m beneath are hatch-only-support canopies that extrude into
  floating ribbons (F3 SW 坡屋面, B1 ground canopy at -5.85m)

Tests: 64 -> 75 checks, incl. GBK/MIF synthetic DXFs, block-wrapped grid
alignment (non-uniform bays — uniform grids make subset correlation
ambiguous), legend-cluster and unsupported-roof fixtures.
references/generalization_test_log.md tracks the test protocol, per-project
gate table, and every gap with its regression coverage.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 21:23:20 +08:00
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