to_cadquery
Converts a mesh into an editable parametric CadQuery script with named dimensions, returning the parameters and the measured deviation between the script output and the original mesh.
Instructions
Write an editable parametric CadQuery script (.py) for a simple part.
Works for a box/plate base with rectangular pads, holes along X, Y, or Z (through, blind, counterbored, and countersunk when the axis is vertical), bosses along X, Y, or Z (straight, and drafted or chamfered when the axis is vertical), a fillet at the base of a vertical boss (boss_N_fillet), a round on a vertical hole rim (hole_N_rim_r, hole_N_bot_rim_r) and a blind-hole floor fillet (hole_N_floor_r), a straight extrusion of a 2D outline along X, Y, or Z, and a small boolean of those extrusions (intersection, or one minus a cut along another axis) with round through-holes, counterbores, and a few planar clips. Each dimension is a named parameter (e.g. hole_1_d = 6.0, extrude_len): edit it and run the script with Python to regenerate the part. Returns the parameters and the measured deviation of the script's output from the mesh. Returns an "error" key when the part is outside that vocabulary.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tol | No | ||
| input_path | Yes | ||
| output_path | No |