execute_code
Run custom Python code in FreeCAD to create, modify, or analyze 3D models. Returns execution output and an optional view screenshot.
Instructions
Execute arbitrary Python code in FreeCAD.
Args: code: The Python code to execute. include_screenshot: Whether to return a screenshot of the model (default True). Set to False to save tokens when the code does not change the model's appearance, e.g. analytical or computational scripts whose result is printed output, or intermediate steps in a longer sequence of changes. view_name: The view orientation of the returned screenshot (default "Isometric"). Pick the view that best shows the change being made.
Returns: A message indicating the success or failure of the code execution, the output of the code execution, and a screenshot of the object.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| view_name | No | Isometric | |
| include_screenshot | No |