Build and check a part
build_partBuild one part from CadQuery code in KinetiCAD's CAD kernel and check that it is a solid a shop can machine. Returns a part_id, the measured size and volume, every round hole and round outside surface with its diameter and direction, warnings (for example a cut that removed nothing), a picture, and a link where the user can rotate the part in 3D. The code runs in a sandbox with only cadquery (as cq) and math. Leave the finished solid in a variable named result, or pass it to show_object(). Units are millimeters. The part must be ONE closed solid, at most 1000 mm long. A cavity sealed inside the material is rejected, because no cutter can reach it. The code can be up to 20000 characters long. Optional: define PARAMS (a list of {name, label, unit, value, min, max}) and a function build(p) that returns the solid. The user can then change those dimensions on the part's page. If the build fails, the error says what is wrong and on which line: fix the code and call again. Parts are kept for 30 days.
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": {
"cadquery": "<cadquery>"
},
"name": "build_part"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Short name of the part, for example: Motor bracket. | |
| about | No | One sentence on what the part is for. The KinetiCAD team sees it with an order request. | |
| cadquery | Yes | CadQuery (Python) code for one part, in millimeters. |