scope_duplicates
Detect overlapping floor-area shapes on a sheet to catch duplicate or double-counted claims before takeoff totals, with shared SF and a view region to inspect.
Instructions
Two conditions claiming the same floor, as a list (#366). Every pair of committed floor_area shapes on one sheet whose EXACT polygon intersection exceeds min_fraction of the smaller shape — with the shared SF, which condition each belongs to, whether the estimator already affirmed either, and a look region to pass to view_sheet {overlay: true}. Pairs on DIFFERENT conditions are collisions: every total downstream counts that floor twice. Pairs on the SAME condition are a double trace (a different bug) and come back in duplicates. shared_floor_sf is the whole compared set's Σ areas − union, counted once per cell no matter how many shapes pile on it — the number takeoff_summary carries and the one that has to read 0 before any total means anything. Machine-precision edge remnants are ignored; a real overlap below 0.01 SF stays listed with an explanatory note. Supporting materials belong in edit_materials coverage rows, not duplicate floor polygons. Deducts and runs are not claims. Read-only; a shape on an unscaled sheet or with a degenerate ring is listed in unmeasured, never counted as zero. Same rule as the room eval's shared-floor gate (iou ≥ 0.5 = the same space claimed twice). 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 |
|---|---|---|---|
| sheet | No | Restrict to one sheet; default every sheet with floor shapes | |
| min_fraction | No | List a pair only when shared ÷ smaller ≥ this (default 0.05 — rings that merely kiss along a wall are not claims; 0 lists every positive overlap above machine-precision noise) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | Yes | ||
| by_sheet | Yes | ||
| collisions | Yes | Pairs on DIFFERENT conditions, biggest shared floor first | |
| duplicates | Yes | Pairs on the SAME condition — a double trace, a different bug | |
| unmeasured | Yes | Shapes left out of every number, with the reason — never silently counted as zero | |
| floor_shapes | Yes | ||
| min_fraction | Yes | ||
| shared_floor_sf | Yes | Σ areas − union over the compared floor shapes, counted once per cell |