1. One measurement engine, every output
floorplan.fast has exactly one implementation of area, perimeter, room size and totals: the Measurements module. The unit screen, the plan editor, the PDF report, the PNG/JPG listing image and the text labels in the DXF all call it. There is no second calculation in the report path, so the total on the PDF cover is the same number the app shows, to the hundredth of a square foot.
| Stage | What happens |
|---|---|
| Capture | Apple RoomPlan returns walls, doors, windows, openings, objects and room sections per scan segment, all in one shared ARKit world coordinate space. |
| Merge | Segments are combined; overlapping walls, objects and openings are deduplicated (rules below); overlapping room polygons from the same space are unioned. |
| Store | Geometry is stored in meters (floor plane). Raw RoomPlan output is kept so plans can be re-derived when algorithms improve. |
| Measure | One Measurements module computes area, perimeter, width × length, wall area and totals. |
| Format | Converted to feet-inches (nearest 1/4″) and sq ft (0.01), or meters and m², only at display/export time. |
| Render | The unit screen, editor, PDF report, PNG/JPG image and DXF labels all read from the same engine. |
2. Area: the shoelace formula
Each room is a closed polygon of vertices (xi, yi) on the floor plane. Its area is computed with the shoelace (Gauss area) formula, which is exact for any simple polygon, including L-shapes and rooms with jogs:
A = ½ · | Σi=1..n ( xi·yi+1 − xi+1·yi ) |
Worked example: an L-shaped room
| i | (xi, yi) | (xi+1, yi+1) | term |
|---|---|---|---|
| 1 | (0, 0) | (14, 0) | 0 |
| 2 | (14, 0) | (14, 10) | 140 |
| 3 | (14, 10) | (8, 10) | 60 |
| 4 | (8, 10) | (8, 16) | 48 |
| 5 | (8, 16) | (0, 16) | 128 |
| 6 | (0, 16) | (0, 0) | 0 |
| Σ | 376 | ||
| A = |Σ| ÷ 2 | 188.00 | ||
The app does the same arithmetic in meters and converts once at the end (1 m² = 10.763910416709722 sq ft). Width × length for a room is the minimum-area oriented bounding box over the polygon’s edge directions, so a room rotated on the plan still reports its true width and length. Wall area is perimeter × ceiling height minus the doors and windows on that room’s boundary.
Run your own check: tape to shoelace
Calculator · same math as the app
- Area
- sq ft
- Perimeter
Area 174.00 square feet, perimeter 53' 0".
App vs your tape
0.00%
Edge lengths · nearest 1/4″, as the app formats them
- 1→2 12' 0"
- 2→3 14' 6"
- 3→4 12' 0"
- 4→1 14' 6"
| i | (xi, yi) | (xi+1, yi+1) | term |
|---|---|---|---|
| 1 | (0.00, 0.00) | (12.00, 0.00) | 0.00 |
| 2 | (12.00, 0.00) | (12.00, 14.50) | 174.00 |
| 3 | (12.00, 14.50) | (0.00, 14.50) | 174.00 |
| 4 | (0.00, 14.50) | (0.00, 0.00) | 0.00 |
| Σ | 348.00 | ||
| A = |Σ| ÷ 2 | 174.00 | ||
Area is computed the way the app does it: convert to meters, shoelace in m², then × 10.763910416709722 and round to 0.01 sq ft.
3. Units, rounding and formatting
- Internal unit: meters, double precision. Nothing is rounded until it is displayed or exported.
- Imperial lengths: rounded to the nearest 1/4″ and shown as feet-inches (e.g.
13' 9 1/4"). - Imperial areas: square feet to two decimals (0.01 sq ft).
- Metric toggle: lengths to 0.01 m, areas to 0.01 m².
- DXF: geometry in inches at 1:1 (1 m = 39.37007874015748 in); see LiDAR to DXF.
| Meters | Imperial | Metric |
|---|---|---|
| 0.3048 | 1' 0" | 0.30 m |
| 2.5 | 8' 2 1/2" | 2.50 m |
| 4.2 | 13' 9 1/4" | 4.20 m |
| 3.6576 | 12' 0" | 3.66 m |
| 0.1 | 4" | 0.10 m |
| m² | Imperial | Metric |
|---|---|---|
| 0.929 | 10.00 sq ft | 0.93 m² |
| 17.4658 | 188.00 sq ft | 17.47 m² |
| 0.11 | 1.18 sq ft | 0.11 m² |
4. Multi-segment capture and dedupe
Scanning uses Apple RoomPlan on a single shared ARKit session, so every room scanned in a visit lands in one coordinate space. RoomPlan is tuned for residential-scale rooms; when a large commercial floor exceeds its scene size limit, floorplan.fast ends the current segment, keeps the AR session running and continues in a new segment with the same alignment. Each completed segment is saved to disk immediately, so a crash or dead battery loses at most the segment in progress. Details: commercial suite scanning.
Segments overlap by design, so the merge step removes duplicates with these rules:
| Element | Treated as duplicate when | Resolution |
|---|---|---|
| Walls | Parallel within ~6°, both endpoints within 10 cm of the other wall’s line, and overlapping by more than 50% of the shorter wall | Longer wall kept |
| Objects / fixtures | Same category and same vertical layer (items ≥ 1 m off the floor, such as upper cabinets, are a separate layer), centers within 30 cm | Higher-confidence detection kept |
| Doors / windows / openings | Same kind on the same wall, centers within 30 cm along the wall | Wider opening kept |
| Room polygons | Overlap greater than 50% of the smaller room, or segments of the same space overlapping by more than 0.3 m² | Polygons unioned into one room |
Tenant furniture (beds, sofas, tables, chairs, televisions) is detected but hidden by default, because it is not part of an as-built record. It can be shown with a layer toggle and included in exports.
5. Review queue and totals
Small or malformed rooms are a common scan artifact (a sliver between two segments, a 1 sq ft “closet”). After every scan and edit the engine flags a room as Needs review when:
- its area is below 10 sq ft (0.929 m²), or
- its polygon is not closed (fewer than 3 vertices).
Overlapping polygons of the same space are unioned during the merge (section 4) rather than left as two rooms. Flagged rooms appear in a review list with one-tap Keep or Delete; until resolved they are hatched on the plan and labeled “(unconfirmed)” in the PDF. Any room can also be marked Exclude from totals.
Totals (measured interior area, wall area, rooms, bathrooms) are the sum over rooms not excluded from totals. A room counts as a bathroom if it is categorized as one or contains a toilet. Empty floors (no plan) are omitted from the PDF and from the all-floors PNG, so a report never prints a blank “0 sq ft” page.
6. The ±2% benchmark and how to verify it yourself
Our acceptance target for a scanned apartment room is room area within ±2% of a tape-measured reference. This is a benchmark target used in development, not a certified or guaranteed tolerance: real results depend on the room, the surfaces and the scan. For the example room above, ±2% is ±3.76 sq ft on 188.00 sq ft.
The calculation itself adds no error beyond floating-point precision and display rounding (1/4″, 0.01 sq ft). What a tape check measures is the capture: how closely the wall positions RoomPlan reports match the real walls. Run this protocol on your own units:
| Step | Action | Notes |
|---|---|---|
| 1 | Pick a rectangular, empty room (no tenant furniture) with clear wall bases. | Furniture and clutter hide wall-floor lines. |
| 2 | Tape or laser-measure wall-to-wall width and length at floor level, twice each. Average. | Record to 1/4″. |
| 3 | Reference area = width × length. | e.g. 12′ 0″ × 14′ 6″ = 174.00 sq ft |
| 4 | Scan the room in floorplan.fast; walk the perimeter slowly, keeping walls in view. | Single segment for a small room. |
| 5 | Read the room’s area (editor → room) and W × L. | W × L is the minimum-area oriented bounding box. |
| 6 | Deviation = |app − reference| ÷ reference × 100. | Benchmark target: ≤ 2%. |
| 7 | Export the PDF and confirm the room page and cover total equal the app values exactly. | Any difference is a bug; please report it. |
7. Limitations
| Factor | Effect and mitigation |
|---|---|
| LiDAR range | The iPhone LiDAR scanner is a short-range sensor. In large rooms, walk toward distant walls rather than scanning them from across the space. |
| Glass and mirrors | Transparent and reflective surfaces return poor depth. Window walls, glass storefronts and mirrored closets can be misplaced or missed; verify them and correct in the editor. |
| Clutter | Furniture, boxes and stored goods occlude wall bases and corners. Scan vacant units where possible. |
| Straight-wall model | RoomPlan models walls as planar segments. Curved walls are approximated by straight runs. |
| Area definition | Figures are measured interior area of the room polygons. They are not BOMA rentable or usable area and are not a survey. |
| Very large spaces | Open floors beyond RoomPlan’s scene limit are captured in multiple segments; drift between segments is possible, so check long dimensions. |
| Critical dimensions | Verify any dimension that drives a contract, fit-out or permit on site with a tape or laser measure. |
Every PDF carries the same caution in its footer by default: “Floor plan dimensions are measured with LiDAR and provided for reference only; verify critical dimensions on site.”