edit_shape
Modify a previously committed shape: move vertices, reassign to another finish tag, switch between area/linear/deduct, or relabel the room. Quantities recalculate from the revision.
Instructions
REVISE a shape you already committed, instead of deleting it and starting over: pass new verts to move the geometry, condition to reassign it to a different finish tag, role to switch between floor_area / deduct / linear, label to name the room it belongs to, or any combination. Quantities are recomputed from the result — a role flip alone re-measures (closed area vs open length). The loop this is for: one_click or measure_polygon to commit, view_sheet with overlay:true to LOOK at what landed, then edit_shape to fix the two vertices that overshot into the corridor. label is the per-room reporting seam: detect_rooms already stamps the room number it traced from, so this is how a shape traced by hand — or one whose room number the sweep read wrong — joins the same per-room breakdown the Report and the workbook's floor × room tab group by. Shapes a human affirmed (origin.reviewed) are ink and are refused — an agent revises its own pencil and nothing else. Agent self-revision is tallied on origin.agent_edits, kept deliberately separate from the human-correction fields. 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 | Switch what the shape measures — flipping INTO surface_area needs a height on the shape or its condition | |
| label | No | The room (or phase/area) this shape belongs to, e.g. "134" or "OFFICE 101" — what per-room reporting groups by. Pass "" to clear it | |
| verts | No | Replacement geometry (image px): ≥3 vertices for an area shape, ≥2 points for a linear/surface run, ≥1 for a count marker | |
| shape_id | Yes | Id returned when the shape was committed | |
| condition | No | Reassign to this finish tag (minted on first use) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | count shapes only — the marker's EA (preserved across the edit) | |
| label | No | The shape's room/phase label after this call — absent when it carries none (a cleared label reports as absent, not as an empty string) | |
| nverts | Yes | ||
| area_sf | No | 0 for linear shapes; LF × height for surface_area; absent for count | |
| changed | Yes | Which fields this call actually changed | |
| shape_id | Yes | ||
| agent_edits | Yes | How many times the agent has revised this shape — separate from the human-correction tally | |
| measure_role | Yes | ||
| perimeter_lf | No | Length for linear/surface runs, perimeter for closed ones; absent for count |