Measure the plan
measureMeasure distances, gaps, and free floor space between objects or along axes in a floor plan, and determine how large a piece can grow before hitting obstacles.
Instructions
Tape measure over the plan, in cm. from= alone: free floor on all four sides, {clear:{"+y":[cm,id,name]}} — dirs picks sides (+x -x +y -y, or front/back/left/right of the piece). from+to (ids or [x,y]): the distance between them, {cm}, or the gap along axis. axis+at: what a straight probe runs into, {spans:[[from,to,id,name]]} with id null for free floor — the answer to "how wide is the corridor here, and between what". Add gap= and grow= and it also answers how big that piece can be along the axis before the gap is broken, and what stops it there: {fit:{free,max,blocked_by}} — the question a layout decision actually ends in, without trying a size and undoing it. z limits the height band that counts (default 0-200).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| z | No | Height band that counts, `[z0, z1]` cm above this storey's floor. Default `[0, 200]`: what a person walking through meets | |
| at | No | Probe line: with `axis`, the other axis' coordinate. Reports every stretch a straight line crosses, free floor and solids alike | |
| to | No | What to measure to: an id or `[x,y]` | |
| gap | No | With a probe: how much free floor has to be left along it, cm | |
| axis | No | Restrict to one axis, `x` or `y`. Between two boxes this is the gap along that axis (negative when they overlap) | |
| dirs | No | Sides to measure free floor on: `+x`, `-x`, `+y`, `-y`, or, relative to the piece, `front`, `back`, `left`, `right` | |
| from | No | What to measure from: an id or `[x,y]`. Alone, reports the free floor on all four sides of that piece. Openings instead report wall-axis spans, distances to wall ends and neighboring openings; no floor clearances | |
| grow | No | With a probe and `gap`: the piece that would grow. The answer says how big it can be along the axis and what stops it there | |
| range | No | Limits of the probe along `axis`, `[from, to]` cm. Default: the plan |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Gap along x, cm | |
| y | No | Gap along y, cm | |
| cm | No | Distance, cm | |
| id | No | The element measured | |
| fit | No | Probe with gap: {free, max, blocked_by} | |
| axis | No | Axis measured along | |
| clear | No | Free floor by side: [cm, against id, name] | |
| faces | No | Side its front looks to | |
| spans | No | Probe: [from, to, id, name] along the axis | |
| bounds | No | The piece's [[minx,miny],[maxx,maxy]] cm | |
| opening | No | A door or window: {basis, hosts} |