Skip to content

rsasaki0109/pointcloud2ifc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pointcloud2ifc -- Automated Scan-to-BIM Pipeline

CI Scan-to-IFC Python 3.10+ License: MIT

Automated point cloud to IFC (BIM) conversion with CI/CD integration. The first open-source tool that offers automated IFC generation in CI -- drop a scan into your repo and get BIM output as a build artifact.

Pipeline

Point Cloud (PLY/PCD/LAS)
  |
  v
[1. Load & Downsample]  -- open3d voxel downsampling
  |
  v
[2. Segment]             -- DBSCAN clustering / RANSAC plane extraction
  |
  v
[3. Label]               -- Heuristic classification into BIMNet categories
  |
  v
[4. Build IFC]           -- Bounding-box geometry per segment (IfcExtrudedAreaSolid)
  |
  v
IFC File (.ifc) + JSON Report

CI/CD: Automated Scan-to-IFC in GitHub Actions

This is the key differentiator. No other tool offers automated IFC generation as a CI/CD pipeline.

Use from another repository (reusable workflow)

# .github/workflows/convert.yml in YOUR repo
name: Convert scans to IFC
on:
  push:
    paths: ["scans/**"]

jobs:
  scan2ifc:
    uses: MapIV/pointcloud2ifc/.github/workflows/scan2ifc.yml@main
    with:
      point_cloud_path: scans/building.ply
      method: ransac
      voxel_size: "0.05"

The IFC file and a JSON report are uploaded as build artifacts automatically.

Manual trigger (ad-hoc conversion)

Go to Actions > Scan-to-IFC Pipeline > Run workflow and specify:

  • Point cloud file path
  • Segmentation method (dbscan, ransac, or ml)
  • Output path (optional)
  • Voxel size (optional)

Segmentation methods

Method Description
dbscan DBSCAN clustering followed by heuristic labelling based on surface normals and geometry
ransac Iterative RANSAC plane extraction; planes classified by normal orientation
ml Pretrained PointNet segmentation (requires pip install 'pointcloud2ifc[ml]')

BIMNet 14-category labels

ID Category IFC Class
0 wall IfcWall
1 floor IfcSlab
2 ceiling IfcCovering
3 door IfcDoor
4 window IfcWindow
5 column IfcColumn
6 beam IfcBeam
7 stair IfcStairFlight
8 railing IfcRailing
9 furniture IfcFurnishingElement
10 slab IfcSlab
11 curtain_wall IfcCurtainWall
12 roof IfcRoof
13 other IfcBuildingElementProxy

Installation

pip install -e .

For development (includes pytest and ruff):

pip install -e ".[dev]"

For ML-based segmentation (PointNet backbone, requires PyTorch):

pip install -e ".[ml]"

For LAS/LAZ support:

pip install laspy[lazrs]

Usage

Convert a single point cloud to IFC

pointcloud2ifc convert input.ply -o output.ifc --method ransac --voxel-size 0.05

Supported input formats: PLY, PCD, LAS/LAZ.

Batch-convert a directory

pointcloud2ifc batch scans/ --output-dir output/ --method ransac --voxel-size 0.05

Processes all PLY, PCD, and LAS/LAZ files in the directory. Generates an IFC file and JSON report for each input, plus a batch_summary.json.

Evaluate against ground truth

pointcloud2ifc evaluate generated.ifc ground_truth.ifc --iou-threshold 0.5

Python API

from pointcloud2ifc.pipeline import Scan2IFCPipeline

pipeline = Scan2IFCPipeline()

# Single file
report = pipeline.run("scan.ply", "output.ifc", method="ransac")
print(f"Segments: {report.segments_found}, IFC elements: {report.ifc_elements_created}")

# Batch
reports = pipeline.run_batch("scans/", "output/", method="ransac")

Run tests

pytest tests/ -v

Architecture

src/pointcloud2ifc/
  __init__.py        # BIMNet category definitions
  cli.py             # Click CLI (convert, evaluate, batch)
  io.py              # Point cloud loading, IFC writing
  segmentation.py    # Semantic segmentation (DBSCAN, RANSAC, ML)
  pretrained.py      # Pretrained PointNet segmentation backend
  ifc_builder.py     # IFC model construction from segments
  pipeline.py        # End-to-end pipeline with batch processing and JSON reporting

License

MIT

About

Automatic point cloud to IFC (BIM) conversion using semantic segmentation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages