This repository provides the implementation for reconstruction algorithm proposed in the paper Semi-Automatic Indoor Window Reconstruction.
-
evaluation/: contains script for evaluating the reconstruction from three aspects: 1. geometric accuracy with Chamfer distance and Hausdorff distance(geometric_comparison.py), 2. grid-based daylight availability with advanced 2-phase method(advanced_2phase.py), and 3. visual comfort performance with glare analysis(glare_render.py). The I/O data for the evaluation is available at.
-
The remaining folders contain the source code and CMake configuration files for the reconstruction program.
Use CMake to generate Makefiles, then compile with make (on Linux/macOS) or nmake (on Windows with Microsoft Visual Studio).
cd path-to-root-dir
mkdir Release
cd Release
cmake -DCMAKE_BUILD_TYPE=Release ..
make
On Windows (use the x64 Native Tools Command Prompt for VS XXXX, not x86):
cd path-to-root-dir
mkdir Release
cd Release
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release ..
nmake
Use an IDE that supports CMakeLists.txt directly (e.g., CLion). Open the root CMakeLists.txt file, configure, and build the project.
The program relies on user interaction in the following order:
- Run the code, you should see a window with point cloud and PolyFit output.
- Press
CTRL + left clickon the walls that contain windows. - Press
CTRL + Dto run the Delaunay triangulation on the selected walls. - Press
SHIFT + Sto start drawing the window regions on each selected wall, when done with a wall, pressSHIFT + right clickto switch to the next wall until all the walls are complete. - After completing the window selection, find the
win_boundary.obj,result.obj, andextruded{n}.objfiles in thebindirectory. These files contain the reconstructed window boundaries, the walls with windows, and the extruded windows, respectively.
A test dataset is provided at /resources/data/example.bvg. To make your own test data, you should (1) Remove outlier points (optional), (2) Estimate normals, and (3) Extract planes with RANSAC and (4) Downsample the point cloud for quicker processing (optional). We used CloudCompare and Mapple to do this. When adding your own data, update the input path in ./code/main.cpp accordingly.
This program relies on the commercial solver Gurobi for its main optimization process. To use Gurobi, you must first install it and ensure that CMake can locate its headers and libraries. This can be achieved by setting the appropriate paths in the FindGUROBI.cmake file. Please note that a license is required to use Gurobi, although it is available free of charge for academic purposes.
If you find this code useful for your research, please consider citing the following paper:
@article{FOROUZANDEH2025114045,
title = {Semi-automated indoor geometry reconstruction for daylight simulation},
journal = {Building and Environment},
pages = {114045},
year = {2025},
issn = {0360-1323},
doi = {https://doi.org/10.1016/j.buildenv.2025.114045},
url = {https://www.sciencedirect.com/science/article/pii/S0360132325015112},
author = {Nima Forouzandeh and Jin Huang and Liangliang Nan and Eleonora Brembilla and Jantien Stoter},
}
The I/O data for the evaluation is available at .
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. The full text of the license can be found in the accompanying LICENSE file.
Should you have any questions, comments, or suggestions, please feel free to contact us at: N.Forouzandeh@tudelft.nl, jinhuang.nuaa@gmail.com.
Nima Forouzandeh, Jin Huang.