Skip to content

Commit

Permalink
Fix Fem Find Calculix binary (if installed) on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach authored and wwmayer committed Feb 24, 2015
1 parent 38eaf76 commit a6dd887
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Mod/Fem/MechanicalAnalysis.py
Expand Up @@ -213,8 +213,13 @@ def __init__(self,object):
# for the subcomponents, such as additions, subtractions.
# the categories are shown only if they are not empty.
self.form=FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Fem/MechanicalAnalysis.ui")

self.CalculixBinary = FreeCAD.getHomePath() +'bin/ccx.exe'
from platform import system
if system == 'Linux':
self.CalculixBinary = 'ccx'
elif system == 'Windows':
self.CalculixBinary = FreeCAD.getHomePath() + 'bin/ccx.exe'
else:
self.CalculixBinary = 'ccx'
self.TempDir = FreeCAD.ActiveDocument.TransientDir.replace('\\','/') + '/FemAnl_'+ object.Uid[-4:]
if not os.path.isdir(self.TempDir):
os.mkdir(self.TempDir)
Expand Down

0 comments on commit a6dd887

Please sign in to comment.