I just experimented with FreeCAD, it's GUI and its headless freecadcmd. I observed, that the headless execution of the following script leads to a model that differs from the model created when the script is executed within the FreeCAD UI. Is this due to the lack of GUI-concepts within the headless execution? On the other hand I read the response from yorik here (https://forum.freecadweb.org/viewtopic.php?t=28559, "both should work perfectly without the GUI") which gives me the feeling that I am doing something wrong.
The script:
Code: Select all
import FreeCAD, Draft, Arch
FreeCAD.newDocument("test")
p1 = FreeCAD.Vector(0, 0, 0)
p2 = FreeCAD.Vector(2000, 0, 0)
baseline = Draft.makeLine(p1, p2)
Arch.makeWall(baseline, length=None, width=200, height=2000)
FreeCAD.activeDocument().recompute()
FreeCAD.ActiveDocument.saveAs("test_arch.FCStd")
Code: Select all
/c/"Program Files"/"FreeCAD 0.19"/bin/FreeCAD.exe -P . test_arch.py
Code: Select all
/c/"Program Files"/"FreeCAD 0.19"/bin/FreeCADCmd.exe -P . test_arch.py