run_script
Execute custom Python inside the FreeCAD worker with App, Part, and ObjectsFem in scope, return JSON results via result, and auto-register new shapes for later tool calls.
Instructions
Escape hatch: execute Python in the worker with App/Part/ObjectsFem in scope.
Set __result__ in the script to return a JSON-serializable value.
auto_register (default True): any new shape-bearing object the script
creates is automatically registered into the handle table. The result
includes a registered list of {handle, name, type} entries so the next
tool call (render_view, list_faces, fillet_edges, mass_properties, etc.)
can address script-created objects via handle without a separate
register_handle round-trip.
Returns {result, registered}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| auto_register | No |