コンテンツにスキップ

Automated analysis with Python scripts

Since FreeCAD has a Python API, it is possible to run the program automatically using Python. Although it is possible to run the program fully automatically without using the GUI at all, in this example we will run some operations from the GUI using Python. The sample script is included in the repository.

This sample script can be downloaded from FreeCAD's FEM Tutorial Python

  1. When you start FreeCAD and the Python console is not displayed, check View -> Panels -> Python console. The Python console will appear in the lower right corner, and you can execute FreeCAD functions from Python by typing in the console. python console
  2. For example, by pasting sample script into the Python console, you can create a CAD For example, by pasting sample script into the Python console, you can create a CAD file, perform automatic meshing, assign boundary conditions, and perform FrontISTR calculations all at once. ! python result