Module 11 — Rhino.Inside Revit
Thời lượng: ~6 giờ · Độ khó: Nâng cao
Mục tiêu: Chạy Grasshopper bên trong Revit để tạo và chỉnh sửa Revit elements từ GH script — kết nối parametric design và BIM workflow.
11.1 — Rhino.Inside Revit là gì?
RiR (Rhino.Inside Revit) là technology cho phép chạy Rhino engine bên trong Revit như một Add-in. Kết quả:
GH chạy bên trong Revit:
- Đọc Revit elements vào GH (geometry + parameters)
- Tạo Revit elements native từ GH geometry
- Update Revit parameters từ GH calculations
- Hỗ trợ Revit API đầy đủ qua GH components
Khác với Speckle/IFC:
Speckle/IFC: Round-trip (export → import) = mất kết nối
RiR: Live connection = thay đổi GH → Revit cập nhật tức thì
11.2 — Cài Đặt RiR
1. Cài Rhino 7 hoặc 8
2. Download Rhino.Inside.Revit từ rhino3d.com/inside/revit/
3. Chạy installer → tự detect Revit version (2021–2024+)
4. Khởi động lại Revit → tab "Rhino.Inside" xuất hiện
Trong Revit:
Rhino.Inside tab → "Start" → Rhino và GH chạy embedded trong Revit
11.3 — Đọc Revit Elements vào GH
Các Collector Components
Collector category:
Query Elements → tất cả elements theo category
Query Walls → tất cả tường
Query Floors → tất cả sàn
Query Rooms → tất cả phòng (với area)
Query Views → tất cả views/sheets
Extract Geometry
Element Geometry → geometry từ Revit element
Input: Revit Element
Output: Brep/Mesh (geometry native Revit, đơn vị feet)
Chú ý đơn vị:
Revit = feet
Rhino = mm (hoặc m tùy setting)
Cần Scale component để convert
Extract Parameters
Get Parameter Value
Input: Element + Parameter Name (string)
Output: Value (có thể là số, string, ElementId)
Ví dụ:
Wall element → "Width" → 0.2 (feet = 60.96mm)
Room element → "Area" → 25.5 (sq feet = 2.37 m²)
11.4 — Tạo Revit Elements từ GH
DirectShape (Geometry Container)
DirectShape là cách đơn giản nhất để push bất kỳ geometry vào Revit mà không cần family:
Component: Add DirectShape
Input:
- Brep/Mesh (B) → geometry từ GH
- Category (C) → Revit category (Generic Model, Walls, etc.)
- Name (N) → tên element
Output: Revit DirectShape element
Ứng dụng:
Mass model từ GH → DirectShape trong Revit
Conceptual form phức tạp không tạo được bằng Revit native
Tạo Revit Walls Native
Component: Add Wall (Curve Based)
Input:
- Curve (C) → centerline của wall (must be planar)
- Wall Type (T) → Revit WallType (từ Query Wall Types)
- Level (L) → Revit Level
- Height (H) → chiều cao (feet!)
Output: Revit Wall element (native, schedulable, taggable)
Tạo Floors
Component: Add Floor
Input:
- Boundary curves (B) → perimeter của floor
- Floor Type (T)
- Level (L)
Output: Revit Floor element
11.5 — Parametric Mass → BIM
Quy trình chuyển GH parametric mass thành Revit BIM elements:
Step 1: GH Mass Design
→ Slider-driven form
→ Surfaces cho từng mặt đứng, mái, sàn
Step 2: Send mặt sàn → Revit Floors
→ GH Curves (floor outlines) → Add Floor (by Level)
→ Mỗi slider change → floors update trong Revit
Step 3: Send mặt tường → Revit Walls
→ GH Curves (wall centerlines) → Add Wall
Step 4: GH Form Mass → DirectShape (Generic Model)
→ Overall mass visible trong Revit 3D view
Step 5: Assign Parameters
→ Set Parameter Value → gán area, usage, zone vào rooms
11.6 — Facade Curtain Wall Tham số Hóa
Bài toán: Uneven Curtain Wall
Curtain Wall thông thường trong Revit = đều nhau. Với RiR + GH, tạo được CW với panel kích thước không đều theo attractor logic.
Workflow:
1. Revit: Tạo Curtain Wall host (dạng blank, không có mullions/panels)
2. GH: Đọc CW host geometry
3. GH: Tạo Attractor-based panel grid trên surface
4. GH: Add Curtain Panel (by UV coordinate) với kích thước từng panel
Components (RiR):
Query CW Panels → lấy panels hiện tại
Set CW Panel Type → đổi type từng panel (solid/glass/opening)
[Ảnh: Revit model với Uneven Curtain Wall — panel kích thước biến đổi theo attractor, tạo từ GH]
Bài tập Module 11 — Parametric Mass → Revit BIM
Đề bài: Tạo một tòa tháp văn phòng 20 tầng với mặt đứng biến đổi trong Revit bằng RiR.
Part A: Mass → Basic BIM
1. GH: Thiết kế tháp với 3 sliders (Width, Depth, Twist Angle per floor)
2. RiR: Tạo Floors tại mỗi level từ GH floor outlines
- 20 levels × floor outline curves
- Floor Type: "Generic 200mm"
3. RiR: Tạo Columns tại 4 góc mỗi tầng
4. RiR: Tạo Mass DirectShape (overall building form)
Part B: Curtain Wall Facade
5. Mặt đứng chính (South): Extruded surface từ GH
6. Add Curtain Wall bằng surface
7. GH: Attractor logic → mỗi panel có 2 states:
- Glass (khi gần attractor)
- Solid (khi xa attractor)
8. Set CW Panel Type theo attractor logic
Part C: Parameters
9. Set Parameter "Area" cho mỗi floor (tính từ GH floor curves)
10. Xem Schedule trong Revit → confirm area đúng
Output: Revit .rvt file + GH script
Liên kết kiến thức
Nền tảng cần nắm
Chủ đề liên quan