drawing_extract_geometry
Extract exact geometry (circles, arcs, line segments) from vector PDF drawings to get part coordinates for CAD sketches, confirming dimensions with measured values.
Instructions
Extract EXACT geometry from a vector PDF drawing: numbered circles, arcs and line segments with centre, radius R and diameter D in part mm. Dimension values are drawn as vector strokes, not text: read them by eye on drawing_render, then CONFIRM with this measured geometry (they must agree; when they do not, the measurement wins). Workflow: (1) drawing_render the whole page to find the views and title block scale; (2) call this on one view's region WITHOUT origin to find the centre/axis (each entity lists its paper position); (3) call again with origin and scale to get part coordinates to feed the sketch tools. Beware: R vs D, rounded dimensions (a drawn tangent may differ from the written value by a few hundredths), wrong title block scale.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page index, 0-based. | |
| scale | No | Drawing scale '1:2' (1 mm on paper = 2 mm on the part). If omitted the title block text is used when readable, else 1:1. The title block scale is sometimes WRONG: cross-check with a known dimension. | |
| origin | No | [x, y] PAPER mm point that becomes the model origin (0, 0), typically an axis/centre found in a first call without origin. Model X is right, Y up. | |
| region | No | [x0, y0, x1, y1] in PAPER mm from the sheet's top-left corner (y down). Omit for the whole sheet. | |
| min_len | No | Ignore segments shorter than this (paper mm). | |
| pdf_path | Yes | Path to a VECTOR PDF drawing (not a scan). | |
| max_items | No | Max entities listed per category. | |
| min_radius | No | Ignore arcs/circles smaller than this (paper mm). |