feat: improve 3D smoke-review diagnostics and section boxes - #134
Closed
7alexhuang-ux wants to merge 2 commits into
Closed
7alexhuang-ux wants to merge 2 commits into
7alexhuang-ux wants to merge 2 commits into
Conversation
接手他人模型時,看到不合預期的表現法(某面牆莫名被填色、某個元素該在卻不見、 線變粗變淡),要查出原因只能到 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>
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
get_view_graphics_diagnosticsfor read-only view appearance diagnosisset_3d_section_boxtool backed byView3D.SetSectionBox(); keep the legacy crop-box entry as a compatible 3D bridgeProject policy used in the documented example
The runtime defaults remain configurable so this project-specific policy is not imposed on other models.
Validation
git diff --check— clean apart from Windows line-ending noticesLive 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.