prepare_drawing
Detect spatial regions in raster engineering drawings, save an overview and readable crops, and return their pixel bounding boxes and paths for efficient inspection without manual crop scripting.
Instructions
Prepare a raster engineering drawing for efficient inspection. Detects substantial spatial regions, saves one labelled overview plus readable PNG crops, and returns their pixel bounding boxes and paths. Region ids are layout evidence only: this tool does NOT label views, recognise CAD features, interpret lines, infer dimensions, or trace geometry. Use it once near the start instead of repeatedly writing shell/PIL crop scripts; inspect the returned overview and only the relevant crops. Printed dimensions remain authoritative. image_path: PNG/JPEG/TIFF drawing under an allowed read root. output_dir: crop directory under an allowed write root. max_regions: 1..30. padding: crop padding in pixels, 0..500.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| padding | No | ||
| image_path | Yes | ||
| output_dir | No | drawing_regions | |
| max_regions | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |