Drawing: Finalize (validate + save + screenshot)
drawing_finalizeValidates drawing through 8-step checker and premium critique, then saves and exports screenshot. Returns DWG path or raises error if issues found.
Instructions
Premium completion gate: runs BOTH the 8-step validator AND the premium critique focuses (iso128, layer_color, dim_overlap, untrimmed_corner, duplicate_entities, construction_left), then saves to disk, exports a screenshot, and returns the DWG path.
Raises ToolError if any validator 'error' finding is present, or if critique reports an 'error' (or, with strict_critique=True, any critique issue). Critique warnings are surfaced under payload['critique'] without failing the gate by default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expected | No | Optional contract: {'part_type', 'helix_angle', 'must_have_bore', 'must_have_keyway'} | |
| save_path | No | If given, save drawing here before validation. Pass full path including extension. | |
| screenshot_path | No | If given, write PNG screenshot to this path. | |
| strict_critique | No | If true, ANY critique issue (including warnings) fails the gate — the full premium discipline. Default false: only critique 'error' issues (e.g. leftover construction geometry) fail; warnings are surfaced in the payload. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||