Review Manufacturability
dfm_reviewUse this when you need a manufacturability (DFM) report before printing, machining, bending (sheet metal) or injection molding a part: returns a three-state checklist, no dfmSpec(...) needed. Pass { file | code } and optional processes: 'fdm' | 'cnc' | 'sheet-metal' | 'injection-molding' (default ['fdm', 'cnc']). FDM 3D printing checks: fdm.overhangs (unsupported overhang steeper than max_overhang_deg, default 45° from vertical), fdm.bridging (bridges over max_bridge_mm, default 10), fdm.min-wall (walls under 2 × nozzle_mm, default 0.4 mm nozzle), fdm.min-hole (holes under 5 × nozzle), fdm.min-pin (warn), fdm.bed-fit (printer profile bed, default generic-fdm), fdm.bed-contact (warn). CNC 3-axis milling checks: cnc.undercuts (surface unreachable from approach_axes, default ['+z']; list several axes for several setups) and cnc.internal-corner-radius (sharp internal corners and fillets smaller than the end-mill radius, tool_diameter_mm default 6). Sheet-metal checks (sheetMetal(...).bend(...) parts; thickness read from the model; a non-sheet part returns sheet.not-sheet-metal as not-checked) on the flat pattern: sheet.min-bend-radius (inner radius ≥ min_bend_radius_ratio × t, default 1), sheet.hole-to-bend (hole edge to bend line ≥ hole_to_bend_thicknesses × t + R, default 2.5), sheet.hole-to-edge (≥ hole_to_edge_thicknesses × t, default 2), sheet.min-flange (outside of bend to edge ≥ min_flange_thicknesses × t, default 4). Injection-molding checks (the dfmSpec({ process: 'moulding' }) engine; two-part mold opening along ±pull_direction, default '+z'): mold.draft (faces with less than min_draft_deg draft, default 1°; face refs are optional when unique lineage is available), mold.wall-thickness (fail under min_wall_mm, default 1; warn over max_wall_mm, default 4, or when thickest/thinnest > max_wall_ratio, default 2.5), mold.undercuts (faces neither mold half releases), mold.sharp-internal-corners (warn: creases and fillets under min_radius_mm, default 0.5); an unmeasured required rule is not-checked. Returns { ok, verdict?: 'pass'|'fail'|'not-checked', checks: [{ id (rule key), process, part, source, status: 'pass'|'fail'|'warn'|'not-checked', summary, value?, limit?, unit?, op?, tolerance?, refs? }] }. Tolerance is in the same unit as value and limit, defaults to zero, and is inclusive: for >=, pass when value + tolerance >= limit; for <=, pass when value - tolerance <= limit. Face refs are omitted when unique resolvable lineage is unavailable. Also returns fdm?, cnc?, sheetMetal?, injectionMolding?, diagnostics. ok reports successful invocation/model evaluation/process execution, not manufacturability: checked findings can fail while ok is true. Argument or model-evaluation errors return ok: false without a verdict; a completed review can be not-checked while ok is true. Settings from the script's dfmSpec({ process: 'fdm' | 'moulding' }) are used as defaults; call options win. For the script-declared gates (clearance, voids, channels) use verify({ check: 'dfm' }).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "dfm_review"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Inline kernelCAD script source. | |
| file | No | Path to a .kcad.ts script file. Hosted: `code`, `project:<slug>` (head), or a Studio `/p/<slug>?version=N` link (pinned); no local files. | |
| printer | No | FDM printer profile id for the bed-fit check. Default 'generic-fdm'. | |
| nozzle_mm | No | FDM nozzle diameter, mm. Default 0.4. | |
| processes | No | Processes to review. Default ['fdm', 'cnc']. | |
| max_wall_mm | No | Injection molding: thickest allowed section, mm. Default 4. | |
| min_wall_mm | No | Injection molding: thinnest allowed wall, mm. Default 1. | |
| approach_axes | No | CNC tool approach directions, one per setup (the tool comes from that side). Default ['+z']. | |
| max_bridge_mm | No | FDM longest unsupported bridge, mm. Default 10. | |
| min_draft_deg | No | Injection molding: minimum draft angle to the pull direction, degrees. Default 1. | |
| min_radius_mm | No | Injection molding: smallest internal corner radius before mold.sharp-internal-corners warns, mm. Default 0.5. | |
| max_wall_ratio | No | Injection molding: thickest / thinnest wall above this warns (non-uniform walls warp and sink). Default 2.5. | |
| pull_direction | No | Injection molding: part-local mold-opening axis (the two halves separate along ±this). Default '+z'. | |
| build_direction | No | FDM part-local axis pointing up from the bed. Default '+z'. | |
| max_overhang_deg | No | FDM steepest printable overhang, degrees from vertical (0 = wall, 90 = flat ceiling). Default 45. | |
| tool_diameter_mm | No | CNC end-mill diameter, mm. Default 6. | |
| max_undercut_area_mm2 | No | CNC unreachable area tolerated before cnc.undercuts fails, mm². Default 1. | |
| min_bend_radius_ratio | No | Sheet metal: inner bend radius must be ≥ this × thickness. Default 1. | |
| min_flange_thicknesses | No | Sheet metal: flange length from the outside of the bend must be ≥ this × thickness. Default 4. | |
| hole_to_bend_thicknesses | No | Sheet metal: hole edge to bend line must be ≥ this × thickness + bend radius. Default 2.5. | |
| hole_to_edge_thicknesses | No | Sheet metal: hole edge to blank edge must be ≥ this × thickness. Default 2. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||