Geometry Check Dfm
geometry_check_dfmRuns design-for-manufacturing checks on solid 3D CAD files for CNC milling or sheet metal, returning rule-based findings with severity, measured values, and limits.
Instructions
Design-for-manufacturing checks of a solid 3D CAD file (.step .stp .iges .igs .brep, millimetres) for one process: 'cnc_milling' (internal corner radius against the tool radius, thinnest wall, hole depth/diameter ratio, smallest hole, planar faces no axis direction reaches) or 'sheet_metal' (uniform thickness, bend radius against thickness, hole-to-edge distance). Other processes (turning, injection_molding, additive, ...) are not supported and are refused, not guessed. Each finding has a rule id, severity (error, warn, info), the measured value and the limit, face and edge ids, a point in model coordinates and whether the check is 'exact' or 'heuristic'; the result also counts findings by severity and lists the checks that were NOT performed. 'limits' is an optional JSON object that overrides the defaults, e.g. {"min_wall": "1 mm", "tool_radius": "1.5 mm"} for cnc_milling, where tool_radius is the end mill RADIUS, half its diameter (a 3 mm end mill is '1.5 mm') (keys: min_wall, tool_radius, max_hole_depth_ratio, min_hole_diameter, min_access_directions, near_tangent_deg), or {"min_bend_radius_ratio": 1.5} for sheet_metal (keys: max_thickness, min_bend_radius_ratio, min_hole_edge_ratio, near_tangent_deg). The defaults are the toolkit's own rules of thumb, not a standard; a bad limit is refused at its own key (details.param '/limits/'). A file that is not made of closed solids only (a shell, a solid whose shell is open, loose faces beside a solid) is refused (geometry.not_a_solid). max_seconds is a wall-clock budget (default 120, 1 to 600 seconds). On expiry, returns geometry.time_budget_exceeded at the next check. An OpenCASCADE call already running cannot be interrupted. Needs the optional cad engine (uv sync --extra cad).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"model_path": "<model_path>"
},
"name": "geometry_check_dfm"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limits | No | Optional JSON object of limits overriding the defaults, lengths as strings with a unit: {"min_wall": "1 mm", "tool_radius": "1.5 mm", "max_hole_depth_ratio": 8}. tool_radius is the end mill RADIUS, not its diameter: a 3 mm end mill is "1.5 mm". near_tangent_deg (default 5, degrees) is the smallest turn between two faces read as a corner. Unknown keys are refused. Empty = defaults | |
| process | No | 'cnc_milling' or 'sheet_metal'; anything else is refused | cnc_milling |
| tool_axis | No | cnc_milling: spindle axis, one of +x -x +y -y +z -z; give the shop's setup. Empty = +z, with a warning | |
| model_path | Yes | Path to the model: .step .stp .iges .igs or .brep | |
| max_seconds | No | Wall-clock budget in seconds, 1 to 600; default 120. Stops at the next check; a running OpenCASCADE call cannot be interrupted | |
| output_unit | No | Length unit of the measured values and limits, e.g. 'mm', 'inch' | mm |
| max_findings | No | Findings listed in data, 1 to 500. The summary counts and dfm_findings.json cover all of them |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| data | No | Non-quantity payload (reports, listings) | |
| error | No | ||
| value | No | Primary quantity result | |
| values | No | All named quantity results (includes the primary) | |
| warnings | No | ||
| artifacts | No | ||
| provenance | Yes | What produced the result and from which inputs. | |
| review_status | No | unreviewed |