set_scale
Set a drawing sheet's scale using a standard label, feet-per-pixel factor, calibration points, or the detected scale note for accurate takeoff measurements.
Instructions
Set a sheet's scale — exactly ONE of: label (a standard scale, e.g. '1/4" = 1'-0"'), upp (real feet per image px), calibrate (two points along a known dimension plus its real feet), or use_detected (adopt the drawn scale note read off the sheet). The detected scale is never applied automatically — setting it is always this explicit call. 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 |
|---|---|---|---|
| upp | No | Real feet per image px at render scale 2.0 | |
| label | No | A standard scale label, exactly as listed in the error on a miss | |
| sheet | Yes | ||
| calibrate | No | Two points (image px) a known real distance apart, and that distance in feet | |
| use_detected | No | true = adopt the sheet's detected scale |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| upp | Yes | Real feet per image px at render scale 2.0 | |
| label | No | The standard scale label, when set by label or detected note | |
| sheet | Yes | ||
| source | Yes | ||
| warning | No | Present when the sheet carries MULTIPLE distinct scale notes (#153) — enlarged plans/details likely; region measurements under a disagreeing note will warn |