Files
cad-building-showcase/claudecode_prompt.md
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

29 lines
4.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Claude Code 提示词:CAD 展示模型 skill 剩余改进项
(在 /Users/zhengwr/workspace/cad-building-showcase 目录下启动 claude 后粘贴)
---
你在 CAD 建筑展示模型 skill 的仓库里工作。开始前先完整阅读 SKILL.md(操作手册,含 One-Shot Definition of Done 七条门禁)、references/web_presentation_notes.md(效果升级清单与 PENDING 项)、贝昂CAD诊断与skill优化.md(项目全程记录)。铁律:任何脚本改动后必须跑 `python3 tests/test_extraction_pipeline.py`(当前 24 项全绿);门禁失败就停下修复,绝不绕过;产出必须亲眼验证(渲染图/浏览器截图),不做假数据。
现成数据:outputs/beian_1hao/ 下有 campus_spec.json(厂区 22 层合成 spec)、building_spec.json / spec_2.json / spec_3.json(1#/2#/3# 单体)、beian_campus.glb(14.9MB 未压缩)、site_manifest.json(摆位配方)、site_floors.json(场布)。CAD 源图在 /Users/zhengwr/workspace/test3d-6/fs贝昂科技_新建项目cad20250728/(如需重新提取,按 SKILL.md 步骤 1 的 WASM 兜底或 macOS ODA 转换)。
按顺序执行,每项完成后简报结果再继续:
任务 1 — Draco 压缩(30 分钟)
在仓库根目录 `npm install @gltf-transform/core @gltf-transform/extensions @gltf-transform/functions draco3dgltf`,然后 `node tools/compress.mjs outputs/beian_1hao/beian_campus.glb outputs/beian_1hao/beian_campus.draco.glb`。验收:压缩后 ≤3MB,用 pygltflib 或 gltf-transform inspect 确认节点数不变(122)、KHR_draco_mesh_compression 存在。沙盒里 WASM 会崩,macOS 正常——如果这里也崩,报告环境信息,不要硬试。
任务 2 — 正式 Web 模板部署验证(1 小时)
按 SKILL.md 步骤 6:用 scripts/build_showcase_variants.py --build 生成 overview/standard/detail 三档(输入 outputs/beian_1hao/campus_spec.json),scripts/write_web_showcase.py --variants-manifest 组装到 outputs/beian_1hao/web/,`npm install --prefix outputs/beian_1hao/web three@0.181.2 lucide@0.468.0`,起本地服务打开。验收:亲自在浏览器确认——RoomEnvironment 环境光与阴影生效(模板 app.js 刚升级过:主光已移到地上、阴影视锥按模型自适应、幕墙为物理玻璃)、楼层爆炸/剖切/点击溯源可用、桌面与手机宽度布局正常、控制台无报错;截图存 outputs/beian_1hao/web_verify/。
任务 3 — Tier 2 几何升级:连续墙体(半天,先写测试)
给 scripts/spec_to_glb.py 和 scripts/build_blender_showcase.py 加配置开关 `merge_wall_solids`(默认 false):每层墙段用 shapely buffer(width/2, cap_style=2) + unary_union 合并为连续多边形再挤出,消除转角缝。先在 tests/test_extraction_pipeline.py 加用例(L 形墙 union 后应为单一多边形、顶点数合理、默认关闭时输出与现状逐字节一致),再实现。完成后用 campus_spec.json 开关对比渲染两张图,肉眼验证转角处无缝且无异常鼓包,写入 references/web_presentation_notes.md 的 Status。
任务 4 — 幕墙竖梃分格(半天,同样先测试后实现)
spec_to_glb 加 `glazing_mullions`(默认 false):合并后的每条玻璃带按 glazing_panel_w(默认 1.5m)生成竖梃、按层高生成横梃(细盒型材,walls 材质),玻璃面保留。验收同任务 3:新增测试 + 前后对比渲染 + notes 更新。
任务 5 — 4#/5# 与 3# 精确定位(依赖外部数据,先问我)
现有图纸没有 4# 机械停车坑、5# 污水处理池的定位轮廓,3# 是 ±1m 近似摆位。先向我确认是否已拿到设计院"含全部构筑物的可点坐标总平面";拿到后按 SKILL.md 厂区章节流程(detect_sheet_frames → 提取 → 在 site_manifest.json 增加条目 → scripts/assemble_campus.py 重新装配,它会自动做邻栋间距门禁)。没拿到就跳过并在报告里注明,不要造假体量。
全部完成后:更新 贝昂CAD诊断与skill优化.md 追加一节记录本轮结果与教训,确认 24+ 项测试全绿,git status 列出改动清单(不要自行 commit,等我确认)。