A FastAPI-based web service that processes 3D point cloud files (PTX, XYZ, or PLY format) and a YAML configuration to generate structured BIM models in IFC format. Based on the open-source Cloud2BIM project, this service segments building elements such as slabs, walls, and openings, and returns both an IFC file and a point-to-element index mapping.
-
Accepts
.ptx,.xyz, and.plypoint cloud formats -
Automatically converts multiple point cloud files to PLY format for processing
-
Uses Cloud2BIM segmentation logic
-
Asynchronous processing with job tracking
-
YAML-based configurable pipeline
-
REST API with progress reporting
-
Outputs:
- IFC model file (
.ifc) - JSON file mapping IFC elements to point indices
- IFC model file (
-
Includes a CLI client tool
- Python 3.10+
- pip
- Optional: BlenderBIM or other IFC viewer for result validation
git clone <your-repository-url> # Replace with your actual repository URL
cd Cloud2BIM_web
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtThe easiest way to run the application is using Docker Compose:
# Build and start the container
docker-compose up -d
# View logs
docker-compose logs -f
# Stop the container
docker-compose downYou can also build and run the Docker container manually:
# Build the Docker image
docker build -t cloud2bim .
# Run the container
docker run -p 8001:8001 -v $(pwd)/jobs:/app/jobs --name cloud2bim cloud2bimThe API will be accessible at http://localhost:8001/docs
# Option 1: Using Python directly
uvicorn app.main:app --reload --port 8005
# Option 2: Using the main.py script
python main.pyVisit http://localhost:8005/docs for Swagger UI when using Option 1, or http://localhost:8001/docs when using Option 2 or Docker.
| Endpoint | Method | Description |
|---|---|---|
/convert |
POST | Upload point cloud file (PLY format) and config file, initiates conversion. |
/status/{job_id} |
GET | Check job progress, status, current stage, and any error messages. |
/results/{job_id}/model.ifc |
GET | Download the generated IFC model file for a completed job. |
/results/{job_id}/point_mapping.json |
GET | Download the JSON file mapping IFC elements to point indices for a completed job. |
python client/client.py tests/data/scan6.ptx tests/data/sample_config.yaml --server_url http://localhost:8005 --output_dir ./outputThis command will:
- Upload
scan6.ptxandsample_config.yamlto the server. - Poll the server for job status updates.
- Once the job is complete, download
model.ifcandpoint_mapping.jsonto the./output/directory, prefixed with the job ID.
Each job creates a folder under jobs/<job_id>/ containing:
input/- Original uploaded point cloud and configuration files.output/- Generatedmodel.ifcandpoint_mapping.jsonfiles.job_status.json- Contains the current status, progress, and stage of the job.
See developer-guide.md (to be created) for full development instructions.
It's recommended to use black for code formatting and flake8 for linting.
pip install black flake8
# To format
black .
# To lint
flake8 .- No authentication or file size limits
- No automatic cleanup of old jobs
- Limited to single-instance async workers (no Celery)
Contributions are welcome! Please open an issue or PR.
MIT License — see LICENSE file for details.
Built using Cloud2BIM and IfcOpenShell.
Happy building 🏠🚀