Mechanical: Sheet From Spec
mech_part_from_specDraw multiple mechanical parts with views and dimensions from a spec in one atomic AutoCAD transaction, validating every part first and rolling back on failure.
Instructions
Several parts, their views and their dimensions, drawn inside one transaction.
Every part is validated before the transaction opens, so a refusal leaves
the drawing untouched and names the offending path (parts[1]: segments[0].d_outer: ...). If a draw fails or the request is cancelled
part-way, the transaction is rolled back under an anyio shield, so a
cancelled call cannot leave half a sheet inside an open transaction.
Refused by name: an empty parts list, any part refusal from
mech_part_draw, and a transaction that cannot be opened.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | Yes | {sheet: {intent, sheet_size, scale, layer_set}, parts: [{part: {...}, at: [x, y], rotation, views: ['front','side'], projection, dimension, style}]} |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||