Lay a pipe run
edit_plumbingLay plumbing pipe runs for cold, hot, sewer, or vent lines, choosing the cheapest feasible route and calculating required materials.
Instructions
Lay a pipe run of the plumbing project (the plumbing tool reads it). route {kind: cold|hot|sewer|vent, ids?, via?: ceiling|floor|wall, from?, depth?}: lays the run from its source to the points along the walls and inside them, or through the ceiling or under the floor, sharing the trunk, draws it (replacing the earlier run of the same points and the lines drawn by hand to them, listed in replaced_drawn) and replies {via, suggested, length_m, by_premise_m, bends, branches, materials: [[item, qty, unit]]} — water: pipe and bars, 90° elbows, tees, threaded elbows at the points, a gate valve per room, adhesive; sewer: the branch at the largest diameter it takes, the drops at each point's own, a 45° Y junction at each branch (never a 90° tee), two 45° elbows per turn, sealing rings, trap boxes. Sewer runs only under the floor, by gravity, with 2 % fall up to 75 mm and 1 % above: the reply says needs_depth_cm, and with depth a run that does not fit is refused saying how much it needs. Without via the cheapest premise that can be built is taken; one that cannot (a point in no wall; from the ceiling a low point in no wall, nowhere to drop; sewer up to the ceiling or lying in a wall) is refused with why.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ids | No | For `route`: the points; default every point of the kind | |
| via | No | For `route`: `ceiling`, `floor` or `wall`; omitted, the cheapest that can be built | |
| from | No | For `route`: the piece it starts from (a water meter, a valve, the heater, the inspection box or stack); default the nearest of its kind | |
| kind | No | For `route`: what the run carries, `cold`, `hot` or `sewer` | |
| depth | No | For `route` of sewer: the height free under the finished floor, cm (slab recess, or the ceiling void of the storey below) | |
| action | No | `route` |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rev | Yes | Plan revision | |
| run | Yes | The run: <system>:<circuit|all|ids> | |
| via | Yes | Where it runs: ceiling, floor, wall (or tape) | |
| bends | Yes | Bends along the run | |
| notes | No | What the rules say about the run | |
| branches | No | Branches off the trunk | |
| length_m | Yes | Metres: {horizontal, vertical, total} | |
| trunk_mm | No | Sewer: trunk diameter mm | |
| materials | Yes | Bill of materials: [item, quantity, unit] | |
| slope_pct | No | Sewer: slope % | |
| suggested | No | The route the rules suggest | |
| merged_into | No | The run this one joined, or null | |
| by_premise_m | No | Total metres by route: {ceiling, floor, wall}; a reason instead where one is impossible | |
| needs_depth_cm | No | Sewer: depth it needs under the floor, cm | |
| replaced_drawn | No | Hand-drawn lines this run replaced |