I have a bash script that executes several OpenFOAM (openfoam.org) commands:
Code: Select all
#!/bin/sh
touch test.txt
source /opt/openfoam9/etc/bashrc
blockMesh > log
snappyHexMesh -overwrite >> log
Code: Select all
os.system('myscript.sh')
I know that my script does get launched from the FreeCAD script because the
Code: Select all
touch test.txt
Trying to overcome this problem, I added to my bash script a line that has to be included in the .bashrc file for OpenFOAM to work:
Code: Select all
source /opt/openfoam9/etc/bashrc
I believe that it has to do with the OpenFOAM environment not properly loading when called from FreeCAD...
Any clues?
Thank,
Barak K