Extract geometric data (CSV/WKT) and 2D floor plans from IFC building models
📊 Export geometric data as WKT/CSV ✨ Professional floor plan images with architectural styling 🎨 Multiple visual styles (professional, minimal, colorful, technical) 🌈 Colored room type visualization with customizable legends 🏠 Room naming conversion (e.g., Dutch to English) ⚡ Batch processing for multiple IFC files 🔧 Robust geometry engine using Trimesh + Shapely
# Install dependencies
pip install -r requirements.txt
# Show file overview (storeys, element counts)
python extract_floor_plans.py building.ifc --overview
# Extract specific storey only (much faster!)
python extract_floor_plans.py building.ifc --storey 5
# Extract geometric data as CSV/WKT
python extract_floor_plans.py building.ifc
# Generate professional floor plan images with colored room types
python extract_floor_plans.py building.ifc --formatter image wkt --colored-spaces --naming-conversion naming_conversion.csv
# Extract only spaces with room type coloring for one floor
python extract_floor_plans.py building.ifc --storey 0 --space-only --colored-spaces --naming-conversion naming_conversion.csvRequirements: Python 3.8+
git clone https://github.com/datarefinerylab/BatchPlan.git
cd BatchPlan
pip install -r requirements.txt# Show file overview first (fast, no geometry processing)
python extract_floor_plans.py building.ifc --overview
# Extract only one storey (much faster than all storeys!)
python extract_floor_plans.py building.ifc --storey 5
# Basic usage (default: professional black & white style)
python extract_floor_plans.py input.ifc
# Extract only spaces with colored room types from storey 0
python extract_floor_plans.py building.ifc \
--storey 0 \
--space-only \
--colored-spaces \
--naming-conversion naming_conversion.csv
# Generate both colored and black & white versions
python extract_floor_plans.py building.ifc \
--both \
--naming-conversion naming_conversion.csv
# Multiple outputs and styling for specific storey
python extract_floor_plans.py building.ifc \
--storey 2 \
--output ./plans \
--formatter image wkt \
--style colorful \
--colored-spaces \
--width 4096
# Batch process multiple files
python extract_floor_plans.py "buildings/*.ifc" --output ./all_plans| Option | Description | Default |
|---|---|---|
--overview |
Show IFC file overview without processing geometry | False |
--storey INDEX |
Process only specific storey by index (0-based) | All storeys |
--output |
Output directory | output |
--formatter |
Output format: image, wkt (space-separated) |
wkt |
--style |
Visual style: professional, minimal, colorful, technical |
professional |
--colored-spaces |
Color spaces by room type (requires naming conversion) | False |
--both |
Generate both colored and black & white versions | False |
--space-only |
Extract only IfcSpace elements | False |
--naming-conversion |
CSV file for room name translation (format: original,english) |
None |
--width/--height |
Image dimensions (pixels) | 2048 |
--max-elements |
Limit for large files (testing) | None |
output/
└── building_name/
├── Level_1_floor_plan.png # Floor plan image (b&w by default)
├── Level_1_floor_plan_colored.png # Colored version (if --both or --colored-spaces)
├── Level_1_floor_plan_bw.png # Black & white version (if --both)
├── Level_1_floor_plan.csv # Geometric data (WKT format)
└── Level_2_floor_plan.png
...
Create a CSV file with room name translations (e.g., Dutch to English):
original,english
badkamer,bathroom
slaapkamer,bedroom
woonkamer,livingroom
keuken,kitchen
gang,corridor
berging,storage
balkon,balconyThen use it with:
python extract_floor_plans.py building.ifc --colored-spaces --naming-conversion naming_conversion.csvThe tool supports four visual styles, each with optional room type coloring:
Clean architectural style with subtle colors. When --colored-spaces is enabled, each room type gets a distinct pastel color.
Black and white style with grayscale room differentiation when colored mode is enabled.
Bright, vibrant colors for presentations. Room types use highly saturated colors in colored mode.
Line-only drawings with no fills (architectural drafting style). Room coloring is not applicable.
📸 View example outputs
Default output with uniform space coloring

With --colored-spaces flag, each room type has a distinct color

No floor plans generated?
- Ensure your IFC file contains
IfcBuildingStoreyelements - Try
--max-elements 100for testing large files - Check that
--formatter imageis specified if you want image outputs
Room types not colored?
- Ensure you use
--colored-spacesflag - Provide a naming conversion CSV with
--naming-conversion - Check that room names in IFC match entries in your CSV (case-insensitive)
AttributeError: 'float' object has no attribute 'lower'?
- Remove empty rows from your naming conversion CSV file
- Ensure all entries in the CSV have both original and translated names
Memory issues?
- Use
--max-elementsto limit processing - Process files individually instead of batch
Processing very slow?
- Larger files take longer - this is normal
- Check that your system isn't running other intensive tasks
- Try with a smaller test file first using
--max-elements 100
MIT License - see LICENSE file for details.
Built with: IfcOpenShell • Trimesh • Shapely
