ifc-qto-extraction
Extract quantities from IFC/Revit models for quantity takeoff. Uses DDC converters to get element counts, areas, volumes, lengths with grouping and reporting.
What this skill does
# IFC Quantity Takeoff Extraction
Extract structured quantity data from BIM models (IFC, Revit) for cost estimation, material ordering, and progress tracking.
## Business Case
**Problem**: Manual quantity takeoff is:
- Time-consuming (40-80 hours for medium project)
- Error-prone (human counting mistakes)
- Not repeatable (changes require full rework)
- Disconnected from design (no live updates)
**Solution**: Automated QTO from BIM that:
- Extracts all quantities in minutes
- Groups by type, level, zone
- Updates instantly with model changes
- Exports to Excel for pricing
**ROI**: 90% reduction in QTO time, near-zero counting errors
## DDC Tools Used
```
┌──────────────────────────────────────────────────────────────────────┐
│ QTO EXTRACTION PIPELINE │
├──────────────────────────────────────────────────────────────────────┤
│ │
│ INPUT CONVERT ANALYZE │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ .rvt │ │ DDC │ │ Python │ │
│ │ .ifc │─────────►│Converter│───────────►│ pandas │ │
│ │ .dwg │ │ │ │ │ │
│ └─────────┘ └─────────┘ └─────────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌─────────┐ ┌─────────┐ │
│ │ .xlsx │ │ Grouped │ │
│ │ raw data│ │ QTO │ │
│ └─────────┘ └─────────┘ │
│ │ │
│ OUTPUT ▼ │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ QTO Report │ │
│ │ • Element counts by type │ │
│ │ • Areas (m², ft²) │ │
│ │ • Volumes (m³, ft³) │ │
│ │ • Lengths (m, ft) │ │
│ │ • Weights (kg, tons) │ │
│ │ • Grouped by level/zone/system │ │
│ └─────────────────────────────────────────────────────────────┘ │
│ │
└──────────────────────────────────────────────────────────────────────┘
```
## CLI Commands
### Revit to Excel (with BBox for volumes)
```bash
# Basic extraction
RvtExporter.exe "C:\Models\Building.rvt"
# Full extraction with bounding boxes (for volume calculations)
RvtExporter.exe "C:\Models\Building.rvt" complete bbox
# Include schedules (Revit's built-in QTO)
RvtExporter.exe "C:\Models\Building.rvt" complete bbox schedule
```
### IFC to Excel
```bash
# Extract IFC data
IfcExporter.exe "C:\Models\Building.ifc"
# Output: Building.xlsx with all IFC entities
```
### DWG to Excel (2D areas)
```bash
# Extract DWG blocks and areas
DwgExporter.exe "C:\Drawings\FloorPlan.dwg"
```
## Python Implementation
```python
import pandas as pd
import numpy as np
from pathlib import Path
import subprocess
from typing import List, Dict, Optional
from dataclasses import dataclass
@dataclass
class QuantityItem:
"""Single quantity line item"""
category: str
type_name: str
count: int
area: float = 0.0
volume: float = 0.0
length: float = 0.0
weight: float = 0.0
unit_area: str = "m²"
unit_volume: str = "m³"
unit_length: str = "m"
level: str = ""
zone: str = ""
class BIMQuantityExtractor:
"""Extract quantities from BIM models using DDC converters"""
def __init__(self, converter_path: str):
self.converter_path = Path(converter_path)
def convert_model(self, model_path: str, options: List[str] = None) -> Path:
"""Convert BIM model to Excel"""
model = Path(model_path)
options = options or ["complete", "bbox"]
# Determine converter
ext = model.suffix.lower()
converters = {
'.rvt': 'RvtExporter.exe',
'.rfa': 'RvtExporter.exe',
'.ifc': 'IfcExporter.exe',
'.dwg': 'DwgExporter.exe',
'.dgn': 'DgnExporter.exe'
}
converter = self.converter_path / converters.get(ext, 'RvtExporter.exe')
# Build command
cmd = [str(converter), str(model)] + options
# Execute
result = subprocess.run(cmd, capture_output=True, text=True)
if result.returncode != 0:
raise RuntimeError(f"Conversion failed: {result.stderr}")
# Return path to generated Excel
xlsx_path = model.with_suffix('.xlsx')
return xlsx_path
def load_bim_data(self, xlsx_path: str) -> pd.DataFrame:
"""Load converted BIM data from Excel"""
xlsx = Path(xlsx_path)
if not xlsx.exists():
raise FileNotFoundError(f"Excel file not found: {xlsx}")
# Read main data sheet
df = pd.read_excel(xlsx, sheet_name=0)
# Clean column names
df.columns = df.columns.str.strip()
return df
def extract_quantities(
self,
df: pd.DataFrame,
group_by: str = "Type Name",
include_categories: List[str] = None
) -> List[QuantityItem]:
"""Extract quantities grouped by type"""
# Filter categories if specified
if include_categories and 'Category' in df.columns:
df = df[df['Category'].isin(include_categories)]
# Group and aggregate
quantities = []
for (category, type_name), group in df.groupby(['Category', group_by]):
item = QuantityItem(
category=str(category),
type_name=str(type_name),
count=len(group)
)
# Extract area
area_cols = ['Area', 'Surface Area', 'Gross Area', 'Net Area']
for col in area_cols:
if col in group.columns:
item.area = group[col].sum()
break
# Extract volume
vol_cols = ['Volume', 'Gross Volume', 'Net Volume']
for col in vol_cols:
if col in group.columns:
item.volume = group[col].sum()
break
# Extract length
len_cols = ['Length', 'Curve Length', 'Unconnected Height']
for col in len_cols:
if col in group.columns:
item.length = group[col].sum()
break
# Extract level if available
if 'Level' in group.columns:
levels = group['Level'].dropna().unique()
item.level = ', '.join(str(l) for l in levels)
quantities.append(item)
return quantities
def extract_by_level(
self,
df: pd.DataFrame,
group_by: str = "Type Name"
) -> Dict[str, List[QuantityItem]]:
"""Extract quantities grouped by level"""
result = {}
if 'Level' not in df.columns:
result['All Levels'] = self.extract_quantities(df, group_by)
return result
for level, level_df in df.groupby('Level'):
level_name = str(level) if pd.notna(level) else 'Unassigned'
result[level_name] = self.extract_quantities(level_df, group_by)
return result
def calculate_concrete_quantities(self, df: pd.DataFrame) -> dict:
"""Calculate concrete quantities for typical elements"""
concrete_categories = [
'Floors', 'StrRelated in Data & Analytics
clawarr-suite
IncludedComprehensive management for self-hosted media stacks (Sonarr, Radarr, Lidarr, Readarr, Prowlarr, Bazarr, Overseerr, Plex, Tautulli, SABnzbd, Recyclarr, Unpackerr, Notifiarr, Maintainerr, Kometa, FlareSolverr). Deep library exploration, analytics, dashboard generation, content management, request handling, subtitle management, indexer control, download monitoring, quality profile sync, library cleanup automation, notification routing, collection/overlay management, and media tracker integration (Trakt, Letterboxd, Simkl).
querying-soql
IncludedSOQL query generation, optimization, and analysis with 100-point scoring. Use this skill when the user needs SOQL/SOSL authoring or optimization: natural-language-to-query generation, relationship queries, aggregates, query-plan analysis, and performance or safety improvements for Salesforce queries. TRIGGER when: user writes, optimizes, or debugs SOQL/SOSL queries, touches .soql files, or asks about relationship queries, aggregates, or query performance. DO NOT TRIGGER when: bulk data operations (use handling-sf-data), Apex DML logic (use generating-apex), or report/dashboard queries.
app-store-optimization
IncludedApp Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklists, and tracking ranking changes.
habit-flow
IncludedAI-powered atomic habit tracker with natural language logging, streak tracking, smart reminders, and coaching. Use for creating habits, logging completions naturally ("I meditated today"), viewing progress, and getting personalized coaching.
app-store-optimization
IncludedApp Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklists, and tracking ranking changes.
visualizing-data
IncludedBuilds dashboards, reports, and data-driven interfaces requiring charts, graphs, or visual analytics. Provides systematic framework for selecting appropriate visualizations based on data characteristics and analytical purpose. Includes 24+ visualization types organized by purpose (trends, comparisons, distributions, relationships, flows, hierarchies, geospatial), accessibility patterns (WCAG 2.1 AA compliance), colorblind-safe palettes, and performance optimization strategies. Use when creating visualizations, choosing chart types, displaying data graphically, or designing data interfaces.