one_click
Click inside a room on a PDF plan to auto-trace its boundaries, compute area and perimeter, and commit the shape to a takeoff with a finish tag or deduct.
Instructions
One-Click Area: click inside a room (image px) and the plan's vector linework bounds it — flood fill, contour trace, vertices snapped to true PDF endpoints. With the sheet's scale set, returns area_sf / perimeter_lf; pass condition (a finish tag, e.g. "CPT-1") to commit the traced shape to the takeoff. Without a scale it returns px-only quantities with a warning and commits nothing. role "deduct" makes the committed shape subtract. Coordinates are image px at render scale 2.0: PDF pt × 2, origin top-left, y down (the browser canvas's native space). Sheet payloads carry dims in both px and pt.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| role | No | floor_area | |
| sheet | Yes | ||
| condition | No | Finish tag to commit under (minted on first use) | |
| return_verts | No | Include the traced polygon's vertices (image px) |