get_sheet_vectors
Extracts a tight crop's vector linework from a plan PDF as normalized segments and merged runs, so you can build accurate takeoff polygons on real wall geometry instead of guessing from an image.
Instructions
READ THE LINES — the PDF's own vector linework for a WINDOW of a sheet, as data. This is how you draw a takeoff polygon on real geometry instead of guessing from a picture: coordinates come back in the SAME 0..1 normalized frame verts_norm uses (rotation already applied), so a wall endpoint is a polygon vertex VERBATIM — copy the number, never convert it. Collinear segments are merged into straight runs, each with its length in feet (calibrated sheets), so you can sanity-check a wall before building on it. crop IS REQUIRED and must be tight — one room, not one sheet; a dense page truncates and this tool then REFUSES rather than hand you a partial picture of the walls (halve the crop and re-call). min_width_pt filters to structural linework: walls run ~0.5-1.0 pt, equipment and hatch are ~0.24 pt hairlines — pass 0.5 first. Scanned sheets have no vector layer and come back empty — that is not an error, it means look with get_sheet_image instead. Also takes the open-source OpenTakeoff server's arguments (sheet, region, limit, cursor): sheet keys or numbers, image px at render scale 2, finish tags.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sheet": "<sheet>"
},
"name": "get_sheet_vectors"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| crop | No | normalized page-fraction crop rect (origin top-left, y down); omit for the full page | |
| limit | No | Page size in segments (default 20000, max 100000) — about 1 MB of JSON per 20000 | |
| sheet | Yes | Sheet key ("plan.pdf", "plan.pdf#2") or title-block number ("A-101"). A sheet key ("plan.pdf#2") or sheet number ("A-101"); sheet_id is accepted in its place. | |
| cursor | No | A previous reply's next_cursor — resume paging there. Omit for the first page | |
| region | No | Rect in image px (origin top-left, y down); omit for the full sheet. A segment is kept when it intersects the rect | |
| max_runs | No | cap on reported runs (default 240) — tighten the crop instead of raising this | |
| sheet_id | No | sheet key "file.pdf#page" (same as sheet; give one) | |
| min_len_ft | No | drop runs shorter than this in feet (default 1.0) — hatch ticks and fixture detail | |
| project_id | No | The project to work on (list_projects names them). Optional for the open-source arguments: the project the last call named (load_plan makes one) is used. | |
| min_width_pt | No | drop strokes thinner than this (points). 0.5 keeps walls, drops hairline equipment/hatch. Default 0 = everything. |