to_openscad
Converts an STL/OBJ/PLY mesh into an editable parametric OpenSCAD (.scad) script for simple parts like plates, holes, bosses and fillets, then verifies the script against the mesh and reports deviation.
Instructions
Write an editable parametric OpenSCAD script (.scad) for a simple part.
Same parts as to_cadquery: a box/plate base with rectangular pads, holes and bosses along X, Y, or Z (countersink, draft, and chamfer only when the axis is vertical), one radius on the four vertical corners, a quarter-torus fillet on a vertical boss or hole (boss_N_fillet, hole_N_rim_r, hole_N_floor_r), a straight extrusion of a 2D outline, and a small boolean of those extrusions. Parameter names match the CadQuery script (hole_1_d, boss_1_h, fillet_r, boss_1_fillet, extrude_len, ...). Edit one and render in OpenSCAD. Returns the parameters, whether the openscad CLI verified the script against the mesh, and the measured deviation when it did. Without the openscad program the script is still written and verified is false. 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 |