Skip to content

feat: improve 3D smoke-review diagnostics and section boxes - #134

Closed
7alexhuang-ux wants to merge 2 commits into
shuotao:mainfrom
7alexhuang-ux:codex/smoke-section-review
Closed

7alexhuang-ux wants to merge 2 commits into
shuotao:mainfrom
7alexhuang-ux:codex/smoke-section-review

Conversation

@7alexhuang-ux

Copy link
Copy Markdown
Contributor

Summary

  • add get_view_graphics_diagnostics for read-only view appearance diagnosis
  • add a true set_3d_section_box tool backed by View3D.SetSectionBox(); keep the legacy crop-box entry as a compatible 3D bridge
  • support independent XY/top/bottom padding and optional full supporting-beam inclusion so room review views show complete current-level beams without exposing the floor above
  • make smoke-window operation ratios explicit and auditable; use the formal 橫拉窗 name and keep unknown-type assumptions visibly flagged
  • update the smoke-exhaust Skill to route ceiling height by model maturity and preserve the same policy in Excel export
  • synchronize tool counts and documentation to 194 tools

Project policy used in the documented example

  • projected/top-hung: 1.0
  • casement: 0.5
  • horizontal sliding: 0.5
  • fixed: 0
  • unknown: temporarily treated as projected while retaining manual-confirmation status

The runtime defaults remain configurable so this project-specific policy is not imposed on other models.

Validation

  • C# builds: Release.R22, R23, R24, R25, R26 — 0 errors
  • MCP Server TypeScript build — passed
  • smoke-exhaust Skill quick validation — passed
  • repository QA/QC — 67 PASS, 0 FAIL, 1 existing unrelated WARN, 3 skipped deployment/build phases
  • git diff --check — clean apart from Windows line-ending notices

Live Revit note

The original Section Box path was exercised in the active Revit model and returned Mode=SectionBox, SectionBoxActive=true, CropBoxActive=false. Geometry inspection of room A1-09 confirmed the supporting beam extends from about -2848 mm to -5348 mm, which motivated the beam-union fix. Revit remained open and locked the deployed DLL during the final build, so the new asymmetric-padding/supporting-beam build could not be hot-reloaded; no claim of final live-reload verification is made.

7alexhuang-ux and others added 2 commits September 9, 2026 21:42
接手他人模型時,看到不合預期的表現法(某面牆莫名被填色、某個元素該在卻不見、
線變粗變淡),要查出原因只能到 VG、篩選器、視圖樣板、材料、元素覆寫逐層點開比對。
最麻煩的是「同時有兩個來源」——查到第一個就停手,往往修錯地方。

本工具沿 Revit 的覆寫優先序一次掃完五個來源,唯讀回報:

  視覺型式 > 元素個別覆寫 > 視圖篩選器 > 類別覆寫 > 材料本身

並列出**所有**命中的成因(不是只回第一個),每筆帶影響範圍與修正方式。

實作:
- MCP/Core/Commands/CommandExecutor.ViewGraphicsDiagnostics.cs(新檔,partial class)
- CommandExecutor.cs 新增 dispatcher case
- visualization-tools.ts 註冊工具;工具名 get_ 開頭,annotations.ts 自動判定
  readOnlyHint=true,無須新增覆寫條目

回傳 Verdict 結構:
- Causes[]:每筆含 Priority / Source / Scope(整個視圖/這個元素/整個品類/
  全專案)/ Detail / Fix,依優先序排列
- PrimaryCause、CauseCount、人類可讀的 Summary

偵測涵蓋:表面與剖面的前景/背景填滿(顏色與樣式)、投影線色、剖面線色、線寬、
半色調、透明度;以及兩種「元素根本看不到」的情形——篩選器把可見性關掉、
品類在本視圖被關閉。視圖樣板鎖住哪些圖形參數也會一併回報(那是使用者在視圖上
改不動的原因)。

唯讀保證:不開 Transaction,只呼叫 getter。

文件連動:工具數 192 → 193,同步 CLAUDE.md / README / README.zh-TW /
DOCUMENT_AUDIENCE_INVENTORY / BIM_MCP 各索引頁與 tools-index 卡片。

驗收:
- dotnet build R22 / R24 / R25 / R26 皆 0 errors(跨 REVIT2025_OR_GREATER 的
  Int32/Int64 ElementId 分歧已驗)
- verify-qaqc.ps1 -SkipDeploy:PASS 72 / FAIL 0 / WARN 2(兩個 WARN 皆為既有項目)

未驗:尚未在真實 Revit session 實跑;多成因同時命中時的排序是否符合 Revit 實際
勝出規則,目前僅以 API 語意為據。連結模型覆寫、設計選項、階段化圖形覆寫未涵蓋,
只在「都沒找到」時以文字提示使用者自行檢查。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@7alexhuang-ux

Copy link
Copy Markdown
Contributor Author

Superseded by #135, which contains the upstream-allowed domain-only contribution. The complete implementation remains available on the contributor fork branch codex/smoke-section-review because this repository's contribution gate accepts only domain/ and GEMINI.md changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant