A desktop preprocessing tool that converts IFC/BonsaiBIM-derived SVG floor plans—or floor plans drawn manually—into the Structured Scene Representation (SSR) consumed by the Opening-Aware, Style-Coherent Apartment Furnishing pipeline.
- Detect enclosed rooms in IFC-annotated SVG floor plans.
- Assign room types and group rooms into apartment units.
- Preserve doors and windows in the exported SSR.
- Adjust detected room boundaries when the source drawing is ambiguous.
- Draw rooms and openings manually without an input SVG.
- Export room JSON files, unit metadata, and overview images for downstream furnishing.
- Python 3.10 or newer
- A desktop environment capable of running PySide6
git clone https://github.com/Thenolypus/FloorPlan-Cleaner.git
cd FloorPlan-Cleaner
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
python main.pyThe activation command above is for Bash and Zsh. Fish users should run:
source .venv/bin/activate.fishThe SVG workflow is designed for 1:100 IFC/BonsaiBIM exports containing wall, door, and window metadata.
- Select Open SVG and choose the exported floor plan.
- Click inside each enclosed room to detect its boundary.
- Select a room type and choose Assign Label.
- Use Extend Boundary where a detected boundary needs correction.
- After selecting all rooms belonging to an apartment, choose Save Unit.
- Set the room height and choose Export All.
Repeat the room-selection and save steps before exporting when the SVG contains multiple apartment units.
Select Create Unit to draw a floor plan without an SVG:
- Draw and close each room polygon.
- Add doors and windows to the appropriate walls.
- Assign a room type to every room.
- Adjust opening widths where necessary.
- Choose Export Unit.
Manual projects can be saved and reopened. Exported metadata.json files can also be loaded back into Create mode for editing.
An SVG-based export produces:
<selected-output>/<floorplan-name>/
├── metadata.json
├── <floorplan-name>_centered.svg
└── unit_1/
├── unit_1_overview.png
├── unit_1_overview.svg
├── unit_1_room_1_<type>.json
└── unit_1_room_2_<type>.json
Each room JSON contains its boundary, room type, architectural openings, and an initially empty object list. metadata.json records the room-to-unit mapping and the transforms required to reconstruct the complete apartment.
Pass the exported floor-plan directory to the furnishing pipeline:
uv run python -m src.run.pipeline \
--floorplan-dir /path/to/<floorplan-name> \
--unit 1 \
--checkpoint /path/to/checkpoint \
--arch- Infer an editable initial sketch from PDF, JPEG, or PNG floor plans.
Released under the MIT License.
