An interactive 2D architectural floor plan editor built with Python and PyQt6. Create, edit, and export professional floor plans with walls, doors, windows, furniture, fixtures, and multi-story support. Import floor plans directly from iPhone LiDAR scans.
- Interactive wall drawing with snap-to-grid
- Door and window placement (17+ types: french doors, sliding, bay windows, etc.)
- Room creation with color fills and labels
- Multi-floor building support
- Grid display with zoom and pan
- Click to select furniture, fixtures, and stairs
- Drag to move, corner handles to resize, rotation handle to rotate
- Properties panel for precise position, size, and rotation editing
- Full undo/redo for all transformations
- Import from iPhone LiDAR scans (Apple RoomPlan JSON format)
- Save/load native
.floorplanformat (JSON-based) - Export to PNG and PDF with title blocks and scale notation
- 18 furniture types: beds, sofas, tables, desks, chairs, bookshelves
- 18 fixture types: toilets, sinks, stoves, refrigerators, washers
- 6 stair types: straight, L-shaped, U-shaped, spiral
pip install -r requirements.txtThe only dependency is PyQt6 (>= 6.4.0).
python main.pyOptionally load an existing floor plan:
python main.py data/examples/comprehensive_house.floorplan- Use the toolbar to select a drawing tool (Draw Wall, Add Door, Add Window)
- Click on the canvas to draw walls, place doors on walls, etc.
- Press S to switch to Select mode for editing objects
- Use the Object Library panel to place furniture and fixtures
- Save your work with Ctrl+S
| Shortcut | Action |
|---|---|
| S | Select tool |
| W | Draw wall |
| D | Add door |
| N | Add window |
| M | Measure |
| G | Toggle grid |
| Delete | Delete selected object |
| Escape | Deselect |
| Ctrl+N | New floor plan |
| Ctrl+O | Open file |
| Ctrl+S | Save |
| Ctrl+Z | Undo |
| Ctrl+Shift+Z | Redo |
| Ctrl+C / Ctrl+V | Copy / Paste |
| Ctrl+D | Toggle dimensions |
| Ctrl+0 | Fit to view |
| Ctrl+I | Import iPhone scan |
floorplan_app/
├── core/ # Data models (no UI dependencies)
│ ├── geometry.py # Point, Wall, Opening, Room, FloorPlan, Furniture, etc.
│ └── level.py # Building, multi-floor support
├── gui/ # PyQt6 user interface
│ ├── main_window.py # Main application window, menus, toolbars
│ ├── canvas.py # Interactive 2D drawing canvas
│ ├── object_selection.py # Object selection and transformation engine
│ ├── properties_panel.py # Property editor for selected objects
│ ├── object_library.py # Furniture/fixture library panel
│ ├── floor_selector.py # Multi-floor navigation widget
│ └── viewer_3d.py # Basic 3D visualization
├── utils/ # Utilities and cross-cutting concerns
│ ├── logging_config.py # Logging setup and AppConfig constants
│ ├── undo_stack.py # Undo/redo command pattern
│ ├── undo_commands.py # Object transformation undo/redo
│ ├── export.py # PNG/PDF export
│ ├── roomplan_importer.py # iPhone LiDAR scan importer
│ ├── measurements.py # Area/perimeter calculations
│ ├── transforms.py # Move, rotate, array transforms
│ ├── annotations.py # Text and dimension annotations
│ └── clipboard.py # Copy/paste support
├── data/
│ ├── examples/ # Example floor plans and creation scripts
│ └── iphone_scans/ # Sample iPhone LiDAR scan JSON files
├── scripts/
│ └── generate_screenshots.py # Generate documentation screenshots
├── tests/ # Test and debug scripts
├── docs/ # Documentation and images
├── RoomScanner/ # iOS companion app (SwiftUI/RoomPlan)
├── main.py # Application entry point
├── requirements.txt # Python dependencies
└── LICENSE # MIT License
The application follows a three-layer architecture:
- Core Layer (
core/) -- Pure data structures with JSON serialization. No UI dependencies. ContainsFloorPlan,Building,Wall,Opening,Room,Furniture,Fixture, andStairclasses. - GUI Layer (
gui/) -- PyQt6 widgets for interactive editing. TheFloorPlanCanvashandles all drawing and mouse interaction.MainWindowprovides menus, toolbars, and dock panels. - Utils Layer (
utils/) -- Cross-cutting concerns: undo/redo (command pattern), import/export, measurements, and logging.
Design patterns used: MVC, Command (undo/redo), Observer (Qt signals/slots), Singleton (clipboard).
For detailed architecture documentation, see docs/ARCHITECTURE.md.
The RoomScanner/ directory contains a SwiftUI iOS app that captures room scans using Apple's RoomPlan framework and iPhone LiDAR sensor. Scans are exported as JSON and can be imported into the desktop editor via File > Import iPhone Scan or Ctrl+I.
See RoomScanner/README.md for setup instructions.
To regenerate the documentation screenshots:
python scripts/generate_screenshots.pyThis creates a demo floor plan, launches the GUI, and captures images to docs/images/.
MIT License. See LICENSE for details.
Built with AI assistance from Claude (Anthropic).




