In "Do the bed and desk overlap? Working it out for a 5.72 m² room" I mentioned that the planner's furniture total counts the 0.035 m² overlap twice. I knew about it and let it be, but it also meant the planner showed less free floor than there really was whenever pieces overlapped. I've fixed it and checked the new figures on five layouts.
Two overlapping pieces
Desk 105 × 50 = 5,250 cm²
Added up 27,250 cm² = 2.725 m²
Overlap 7 × 50 = 350 cm²
Floor actually covered 27,250 − 350 = 26,900 cm² = 2.69 m²
The old planner showed the first total; the new one shows the last line. The label on screen changed from "Furniture" to "Floor covered" to match.
When three overlap
Two tables and a shelf laid over each other make the difference bigger. Added up they come to 3.00 m², and 0.875 m² of that was counted more than once. By hand you'd subtract each pairwise overlap and then add back the part all three share. The planner instead cuts the floor into small pieces along the furniture edges and checks each piece.
A shelf outside the room, a column in the wardrobe
When part of a shelf sticks out of the room, that part (0.14 m²) is listed separately. In the bedroom where a column overlaps a wardrobe corner, the column's 0.16 m² is added but the shared bit is counted once, leaving 6.295 m² of free floor. All five layouts came out right.
Free floor isn't all usable
The spot where a chair rolls back or a door swings still counts as free. Area can't tell those apart, so experiment 005 keeps the area fixed and looks at the walking routes instead. Space shared by height, like storage under a bed, isn't separated out here either.
Data
| Layout | Plain sum | Old planner showed | Floor actually covered answer / new | Counted twice | Outside | Column | Free floor answer / new | Result |
|---|---|---|---|---|---|---|---|---|
| Bed and desk overlap by 7 × 50 cm | 2.725 m² | 2.725 m² | 2.69 m² / 2.69 m² | 0.035 m² | 0.00 m² | 0.00 m² | 3.03 m² / 3.03 m² | PASS |
| Three pieces overlapping each other | 3.00 m² | 3.00 m² | 2.125 m² / 2.125 m² | 0.875 m² | 0.00 m² | 0.00 m² | 6.875 m² / 6.875 m² | PASS |
| A shelf partly outside the room | 3.005 m² | 2.865 m² | 2.83 m² / 2.83 m² | 0.035 m² | 0.14 m² | 0.00 m² | 2.89 m² / 2.89 m² | PASS |
| Bedroom with no overlaps | 4.125 m² | 4.125 m² | 4.125 m² / 4.125 m² | 0.00 m² | 0.00 m² | 0.00 m² | 6.375 m² / 6.375 m² | PASS |
| A column overlapping the wardrobe | 4.125 m² | 4.125 m² | 4.125 m² / 4.125 m² | 0.00 m² | 0.00 m² | 0.16 m² | 6.295 m² / 6.295 m² | PASS |
Where the right answers came from. A separate Python program, not the planner's code, cut the room into 1 cm × 1 cm cells and checked each one against every piece of furniture. All coordinates are whole centimeters, so the count is the exact area.
Open in the planner
- Bed and desk overlap by 7 × 50 cm
- Three pieces overlapping each other
- A shelf partly outside the room
- Bedroom with no overlaps
- A column overlapping the wardrobe
Running these three lines in the site's repository rebuilds the files. If the calculation code changes and these files aren't rebuilt, the site won't build, so the numbers on this page can't drift away from what the planner does.
node tools/run_experiments.mjs
python tools/verify_experiments.py