Auto dimension

From shuotao/REVIT_MCP_study · View interactive version

Auto dimension is an AI agent skill from the GitHub repository shuotao/REVIT_MCP_study. 自動標註尺寸:使用 Ray-Casting / BoundingBox / Wall-Batch 方法,在平面視圖中自動建立房間、走廊、MEP、整批牆段的尺寸標註。觸發條件:使用者提到標註、尺寸、dimension、annotation、淨寬、淨高、measurement、自動標註、批次標註、自動標尺寸、外牆總尺寸、串接尺寸。工具:create_dimension_by_ray、create_dimension_by_bounding_box、auto_dimension_walls、get_room_info。

How to use this skill

Skill file

自動標註尺寸

Lessons Reference

Method Selection

| 場景 | 方法 | 工具 |

|------|------|------|

| 一般矩形房間 | Ray-Casting | create_dimension_by_ray |

| L 形或不規則房間 | BoundingBox | create_dimension_by_bounding_box |

| MEP 設備淨空檢查 | Ray-Casting | create_dimension_by_ray |

| 批次牆段標註(無 Room、剛蓋完牆) | Wall-Batch | auto_dimension_walls |

Wall-Batch Workflow(剛蓋完一批牆要標尺寸)

auto_dimension_walls 不依賴 Room,三模式擇一:

| mode | 用途 | 輸出條數 |

|------|------|---------|

| overall_bbox(預設)| 外圍兩條總長串:top 邊沿 X、right 邊沿 Y | 2 |

| chained | 同列/同排共線牆串成 string dimension(每列一條) | N(依 row/col 數) |

| per_wall | 每道牆獨立一個長度標註 | 每牆一條 |

參數

適用情境

行為

限制

Ray-Casting Workflow

  1. 取得房間中心:get_room_info → 提取 Location 座標
  2. 沿 X+/X- 方向發射射線 → 偵測牆面 → 建立 X 軸標註
  3. 沿 Y+/Y- 方向發射射線 → 偵測牆面 → 建立 Y 軸標註

關鍵參數

BoundingBox Workflow (Fallback)

  1. 透過 create_dimension_by_bounding_box 取得房間包圍框
  2. 指定軸向(X 或 Y)和偏移量(預設 500mm)
  3. 系統在最小/最大邊界建立 DetailCurves 並標註

Key Rules

Reference

詳見 domain/auto-dimension-workflow.md。

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.