to_freecad
Generate an editable parametric FreeCAD macro for simple mechanical parts from a mesh; edit parameters and verify the macro against the source geometry.
Instructions
Write an editable parametric FreeCAD macro (.FCMacro) 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 run the macro in FreeCAD, or with freecadcmd. Returns the parameters, whether freecadcmd verified the macro against the mesh, and the measured deviation when it did. Without freecadcmd the macro 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 |