measure_polygon
Measures a closed polygon you define by vertices to compute area and perimeter at the sheet's scale. Requires scale set; supports condition and deduct role.
Instructions
Measure a closed polygon you supply (min 3 vertices, image px): area_sf and perimeter_lf at the sheet's scale. Requires the scale to be set. Pass condition to commit it; role "deduct" subtracts. A room ring belongs on the innermost wall-face strokes from get_sheet_vectors, crossing each door opening on the wall centerline and wrapping columns and stubs; never on a hatch edge, casework or a door leaf. Check it with view_sheet overlay:true on a tight crop and fix it with edit_shape. A CURVED wall is a circle: do not chord it and do not hand-tessellate it — give the bow one point on the wall and list its index in arc_through. 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 |
|---|---|---|---|
| role | No | floor_area | |
| sheet | Yes | ||
| verts | Yes | ||
| condition | No | ||
| arc_through | No | Indices of points that are the MIDDLE of an arc: the trace runs the point before → this point → the point after as the unique circle through the three (the canvas's Curve mode). For a curved wall put one point anywhere ON the bow between its two ends and mark it. The arc is baked to ordinary vertices on commit and origin.curved is stamped; a mark on an end of an open run, or two marks in a row, refuses. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| arcs | No | How many arc_through bows were laid — present only when the trace was bent; the vertices reported are the baked arc, not the three points you gave | |
| nverts | Yes | ||
| area_sf | Yes | ||
| warning | No | Mixed-scale warning (#153): a scale note disagreeing with the sheet's sits in the measured region — verify before trusting these numbers | |
| shape_id | No | Present when condition was passed and the shape committed | |
| perimeter_lf | Yes |