edit_params
Change named parameters in a script mesh2cad generated and re-render the solid.
Instructions
Change named parameters in a script mesh2cad generated and re-render the solid.
Args: script_path: path to a .py, .scad, or .FCMacro file written by mesh2cad. changes: mapping of parameter name to a new number, or to a string that starts with + or - to add that delta (for example {"hole_1_d": 8, "base_x": "+2"}). output_path: STEP or STL to write. CadQuery and FreeCAD accept .step or .stl. OpenSCAD accepts .stl. When omitted, a .step (or .stl for OpenSCAD) is written next to the script if that backend is available. The script is updated in place. Every byte outside the replaced numbers stays the same. Unknown names are refused with the valid list. An edit that does not produce one valid solid, or a hole larger than the wall it sits in, is refused and nothing is written. Returns old and new values, the rendered path, validity, volume and bounding-box delta, and warnings. Returns an "error" key when the edit is refused or the backend needed for output_path is not available.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| changes | Yes | ||
| output_path | No | ||
| script_path | Yes |