- Blender discovery adds the Windows versioned install dir (Program Files/
Blender Foundation/Blender */blender.exe); ODA adds Program Files/ODA
(both still env > PATH first; shutil.which resolves .exe via PATHEXT)
- README cross-platform section: pathlib + explicit UTF-8 I/O + bytes-decoded
subprocesses throughout; Windows advice (PYTHONUTF8=1, LongPathsEnabled,
ODA as the primary DWG path since libredwg is rare there)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Ported from the test3d-5 session build: in-page variant switching, share
link (full state in URL hash), auto tour, toast, building-grouped floor
toggles, per-(floor,category) geometry merge (draw calls), progressive
overview->standard loading. Hardened during the port: {{BUILD}} placeholder
restored (Date.now() defeated caching), single-GLB deployments skip the
phantom overview.glb phase, building-group fallback now derives from
floor-key prefixes (assemble_campus convention) instead of a hardcoded "A"
test, bookmarks completed (list + restore + remove + hash persistence).
Render-on-demand lands in BOTH the template and the offline viewer: static
scenes rendered at 60fps pegged the GPU/fans for identical frames —
invalidate()-driven rendering + shadowMap.autoUpdate=false (bake per
change). 27号 measured: template web 0 frames over 3s idle, offline viewer
25 frames total through load; features browser-verified (tour, bookmarks,
hash restore), zero console errors. window.__renders is the diagnostic
counter — idle growth must be 0.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Mechanical pattern tools WILL miss new dialects; these gates are
ledger/cross-evidence INVARIANTS that hold for conventions never seen:
- frame_ledger (audit --frames <detect out-config>): every detected plan
frame must be used by the config or listed in discarded_frames with a
reason — silently ignored frames are where wings vanish
- area_declared (config declared_areas_m2): model footprint area vs
经济技术指标表 within ±15% — 1#B lost half the building and only the
site plan exposed it
- storey_count (config expected_storeys_above_ground): above-ground F<n>
count vs 总图 labels / elevation ladder
- unknown_layer_dialect (read report): plan file with no *WALL*/*墙* layer
= unfamiliar institute convention, map layers consciously
All three gates SKIP when unarmed (zero impact on existing projects);
regression suite +8 checks, all green.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- register_site_outlines.py: point-to-edge ICP registration CLI (footprint
union vs site outline / DIM_COOR corners), manifest-ready output, loud
warning above 2 m residual
- massing_from_outline.py: honest massing spec CLI (outline x storeys x
height, labeled 总图轮廓体量), manifest anchors on stdout
- detect_sheet_frames: multi-floor titles (四、六、八 / 十一至十四) expand to
per-storey config entries sharing clip/offset — the 13号 b2 silent-floor-
loss class is now prevented at the source; compound CN numerals parsed
(十一/二十一 no longer collapse to F0 keys); per-frame DIM_ELEV ladders +
uniform-step storey suggestion in the report (evidence, not auto-filled z)
- 27号 2# real data: 19-storey enumerated title auto-expands, step 3.0 x 11
suggestion correct; regression suite +11 checks
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- detect_sheet_frames: title-block INSERTs (A0_V1/A0+0.5_V1/*图框*) define the
clip window when they contain the title — pitch windows halved elongated
sheets (13号 加长A0, one frame holding both towers); wall refine is clamped
inside the frame rect; 13号 b1 real data: all 45 frames rect-clipped
- audit floors_aligned: cross-floor wall-profile datum check catches
"self-consistent but misplaced" floors (13号 F3 错槽 85.8m that envelope
centers PASSed); zero-shift guard kills the dense-podium false positive
(27号 1#A PH matched "better" 1.5m off while already fitting in place)
- 门卫 size mismatch root-caused as representation granularity (gate compound
vs kiosk symbol), not an extraction bug — closed in the log
- regression suite +6 checks (titleblock / crossdatum bad+good), all three
projects re-audited with no false positives
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
concave_hull over all points cannot split disconnected masses: 13号 一号楼
standard floors (A/B towers in one floor key) got ONE 135.6m hull and
use_footprint_slabs laid plates across the 36m void (user-visible as
"triangular links" between towers). Points are now union-find clustered
(footprint_cluster_linkage, 6m grid buckets; segment endpoints forced into
one cluster) and hulled per cluster — real link bridges keep clusters
merged via their walls. F4-F10 now 2x49.8m hulls matching the site-plan
OBB; 黄桥/27号 re-derived with no regression; DoD visual check extended
(look at the AIR between masses in front/side views). Regression: twintower
scenario (+3 checks).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- detect_sheet_frames: auxiliary-titled frames (非机动坡道/无障碍改造…) never
become the alignment reference; wall-profile correlation fallback when a
frame has no axis geometry (coverage+peak-ratio gated); bogus x-pitch from
stray same-row titles distrusted (pitch_x < 0.7*pitch_y); plan titles inside
cached-xref blocks scanned too
- cad_dxf_report: cached_xref_content warning (msp INSERT stubs + in-file
block cache -> expand_blocks ≈ bind, not a re-export ask)
- derive_showcase_spec: floor_order gaps warn loudly in both directions
- assemble_campus: per-building rotation_deg overrides the global one
- SKILL.md updated; regression suite +14 checks (auxref/nogrid/mixedrow/
blocktitle/cachedxref/floor_order/rotation scenarios)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
dxf.get("height") raises DXFAttributeError on MTEXT (undefined-for-type);
a short MTEXT reaching the title probe crashed the 27号 1#A detection.
Fixture gains a short MTEXT note.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Membership by midpoint/endpoint kept whole segments, so long table borders
and annotation rules carried the full sheet width into a floor — 13号's 56m
frame emitted 143m of geometry and footprint hulls grew stray plates.
Segments are now clipped to the frame rect; fully-inside geometry passes
through unchanged. Regression: a 140m line crossing a 40m frame comes out
frame-wide. Dense sheet layouts hit this; 贝昂's wide frame pitch never did.
Round-3 log: tower-1 twin towers aligned and gated (union-clip standard
floors; PH centered on cores, RF parapet bbox-anchored, wing offsets
self-consistent to 50mm); podium F1-F3 zoning still open.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Two vote-killers found on 13号地块 towers: axis geometry sits OUTSIDE the
wall-tight clip (stubs beyond the facade), and min_grid_len = pitch*0.25
discarded 0.8m axis-number ticks outright. Axis candidates are now
collected in a pitch*0.16-expanded window, and strictly axis-parallel
stubs (pitch*0.004..0.05) count alongside full-span lines — same-position
ticks cluster into one vote. Synthetic tick fixture goes WEAK -> full votes.
Honest finding logged: the 13号 tower frames genuinely contain NO axis
geometry (all 249 ticks belong to other frames), so votes=0 is the correct
verdict there — modeling proceeds via clip-corner fallback plus mandatory
per-floor overlay verification; wall-position correlation noted as the
future alignment source when axes are absent.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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>
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>
Agent-led CAD-drawing → 3D web showcase pipeline. Inspects CAD reports,
maps layers/floors, extracts a normalized building spec (with block-probed
glazing and audit gates), builds Blender/trimesh GLB variants, and assembles
a Three.js web viewer. Includes XREF-shell detection and a regression test.
Large inputs/outputs (work/, outputs/, source_cad/, renders) are gitignored.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>