Automated MEP coordination and routing with multi-model clash avoidance
Part of the Bonsai10D Vision - 10-dimensional construction coordination integrating 3D geometry, time, cost, compliance, and ERP systems.
This module enhances BlenderBIM's clash detection capabilities for large-scale MEP coordination projects. Following IfcOpenShell best practices, it provides bbox-based pre-broadphase filtering to optimize performance when working with multiple discipline models.
Design Philosophy: Enhance existing BlenderBIM tools, don't replace them.
- ✅ Automated conduit routing with obstacle avoidance
- ✅ Multi-discipline clash detection (90K+ elements)
- ✅ IFC4 cable carrier segment generation
- ✅ Federation-based spatial queries (<100ms)
- ✅ Discipline-grouped clash reporting
- 🚧 BCF export for Navisworks (Phase 2C - planned)
Based on community feedback from Dion Moult (IfcOpenShell maintainer), this module implements a three-component architecture:
┌─────────────────────────────────────────┐
│ 1. Preprocessing (One-time) │
│ IfcPatch Recipe: ExtractSpatialIndex│
│ → Creates bbox database │
└─────────────────────────────────────────┘
↓
┌─────────────────────────────────────────┐
│ 2. Runtime Optimization │
│ Federation Module: Spatial Index │
│ → 95% memory reduction │
│ → 20x faster queries │
└─────────────────────────────────────────┘
↓
┌─────────────────────────────────────────┐
│ 3. User Interface │
│ MEP Engineering: Routing + Validation│
│ → Blender integration │
└─────────────────────────────────────────┘
Performance: Validated on Terminal 1/2 project (7 disciplines, 93K elements, 302MB):
- Memory: 93% reduction (30GB → 2GB)
- Time: 20x faster (10 min → 30 sec)
- Accuracy: 100% (no false negatives)
- Blender 4.2+ with Bonsai addon installed
- Python dependencies:
# In Blender's Python environment /path/to/blender/python -m pip install rtree
This module depends on the Federation module for spatial indexing and multi-model queries.
cd src/bonsai/bonsai/bim/module/
# Install federation module (dependency)
git clone https://github.com/red1oon/federation.git
# Install MEP engineering module
git clone https://github.com/red1oon/mep_engineering.gitAdd to src/bonsai/bonsai/bim/__init__.py:
modules = {
# ... existing modules ...
"federation": None, # ← Add this
"mep_engineering": None, # ← Add this
}Restart Blender to load the modules.
Option A: Via Bonsai UI (Recommended for most users)
- Open Blender with any IFC project
- Go to Properties → Scene → Quality Control tab
- Expand "Multi-Model Federation" panel
- Click "Add File" for each discipline IFC file
- Set Database Path:
/path/to/project_federation.db - Click "Preprocess Federation" button
- Wait ~7 minutes for completion (progress shown in console)
Option B: Standalone CLI (For automation/scripting)
# Extract bounding boxes from discipline IFC files
cd /path/to/project
python federation_preprocessor.py \
--files ARC.ifc ACMV.ifc STR.ifc ELEC.ifc \
--output project_federation.db \
--disciplines ARC ACMV FP SP STR ELECSee Federation module documentation for detailed CLI usage.
Output: SQLite database with spatial index (~50MB for 90K elements)
- Open Blender with your IFC project
- Go to Properties → Scene → Quality Control tab
- Expand "Multi-Model Federation" panel
- Click "Load Federation Index"
✅ Status: "Federation Active - 93,000 elements from 4 disciplines"
- Go to Properties → Scene → Quality Control tab
- Expand "MEP Engineering" panel
- Set routing points:
- Position 3D cursor at start → Click "Set from Cursor"
- Position 3D cursor at end → Click "Set from Cursor"
- Configure settings:
- Clearance Distance: 0.5m (500mm default)
- Conduit Diameter: 0.05m (50mm default)
- Obstacle Disciplines:
STR,ACMV,ARC,FP,SP,CW
- Click "Route Conduit"
Result: IFC4 IfcCableCarrierSegment elements created, avoiding obstacles
-
After routing, click "Validate Route" in MEP panel
-
Console output:
═══════════════════════════════════════════════════ CLASH VALIDATION RESULTS ═══════════════════════════════════════════════════ Total clashes: 67 By responsible discipline: ARC: 31 clashes CW: 16 clashes FP: 11 clashes ACMV: 8 clashes STR: 1 clashes -
Review grouped results by discipline
-
(Phase 2C) Export to BCF for Navisworks coordination
- Obstacle Detection: Uses federation spatial queries to identify conflicts
- Pathfinding: Orthogonal routing (Phase 1: direct paths, Phase 2: A* planned)
- IFC Generation: Creates schema-aware elements (IFC2X3 fallback supported)
- Multi-discipline: Queries across Architecture, Structural, MEP, Fire Protection
- Conservative Filtering: Bbox-based prefilter eliminates 95% of candidates
- Discipline Grouping: Results organized by responsible discipline
- False Positive Reduction: Sanitizes clashes based on clearance rules
- Console Reporting: Detailed clash summary with top conflicts
- Memory Efficient: 2GB vs 30GB (traditional approach)
- Fast Queries: <100ms per corridor query (vs 10 min full geometry load)
- Scalable: Tested on 93K element federations
| Task | Before | After | Improvement |
|---|---|---|---|
| Material takeoffs | 2 hours | 5 minutes | 24x faster |
| Routing with clash avoidance | Manual | Automated | 100% |
| Clash detection (90K elements) | 10 min + 30GB RAM | 30 sec + 2GB RAM | 20x faster, 93% memory |
| Documentation reports | Manual | Auto-generated | 100% |
- Standalone bbox preprocessing script
- Spatial index with R-tree queries
- BlenderBIM module integration
- Start/end point selection
- Direct path routing
- Obstacle detection via federation
- IFC4 cable carrier segments
- System assignment
- Property sets (dimensions, type)
- Federation-based clash detection
- Discipline filtering
- Console reporting
- Export clashes to BCF format
- Navisworks/BIM360 integration
- Viewpoint snapshots
- A* pathfinding algorithm
- Multi-path optimization
- Cost-aware routing
- Submit IfcPatch recipe to IfcOpenShell
- Integrate bbox prefilter with IfcClash
- Community-maintained enhancement
This module follows BlenderBIM best practices:
✅ Reuses Community Modules:
- Federation module for spatial queries
- IfcOpenShell API for IFC manipulation
- Bonsai UI patterns for consistency
✅ No Reinvention:
- Leverages existing clash detection (IfcClash)
- Uses standard property groups and operators
- Follows naming conventions
✅ Clean Architecture:
- Separation of concerns (preprocessing → runtime → UI)
- Minimal dependencies (rtree only)
- Backward compatible
- Strategic Guide: See MEP Coordination: Strategic & Technical Guide
- Validation Checklist: See Federation Module Validation
- OSArch Forum: Community discussion
- GitHub Issues: Report bugs or request features
- Federation Module - Multi-model spatial indexing (required dependency)
- Bonsai10D - 10D construction coordination vision
- IfcOpenShell - IFC toolkit and library
- BlenderBIM - OpenBIM Blender add-on
Validated on real-world project:
- Project: Terminal 1/2 Jetty Complex Expansion
- Scale: 7 disciplines, 93,000 elements, 302MB
- Results: 67 clashes detected correctly, grouped by discipline
- Performance: 30 seconds, 2GB RAM
Run validation tests:
# From Blender console
import bpy
props = bpy.context.scene.BIMmepEngineeringProperties
# Set test route
props.route_start_point = (-50428, 34202, 6)
props.route_end_point = (-50434, 34210, 6)
# Run routing
bpy.ops.bim.route_mep_conduit()
# Validate clashes
bpy.ops.bim.validate_conduit_route()GPL-3.0-or-later
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
See LICENSE for full details.
Redhuan D. Oon (red1) - Lead Developer
Naquib Danial Oon - Contributor
We welcome contributions! This project aims to upstream enhancements to IfcOpenShell/Bonsai:
- Fork the repository
- Create a feature branch
- Follow BlenderBIM code standards
- Submit a pull request
For major changes, please open an issue first to discuss.
- Dion Moult - IfcOpenShell maintainer, architectural guidance
- OSArch Community - Feedback and support
- BlenderBIM Team - Foundation and ecosystem
Status: Active Development | Version: Phase 2B Complete (v0.2b)
Last Updated: 2025-01-14