Skip to content

Commit

Permalink
+ fix crash of ccx, use darker green for ccx output, fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Apr 9, 2015
1 parent 4024f46 commit e18796e
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/Mod/Fem/MechanicalAnalysis.py
Expand Up @@ -283,10 +283,13 @@ def calculixFinished(self,exitCode):
print "calculixFinished()",exitCode
print self.Calculix.state()

# Restore previous cwd
QtCore.QDir.setCurrent(self.cwd)

self.printCalculiXstdout()
self.Timer.stop()

self.femConsoleMessage("Calculix done!", "#00FF00")
self.femConsoleMessage("Calculix done!", "#00AA00")

self.form.pushButton_generate.setText("Re-run Calculix")
print "Loading results...."
Expand All @@ -297,7 +300,7 @@ def calculixFinished(self,exitCode):
QApplication.setOverrideCursor(Qt.WaitCursor)
CalculixLib.importFrd(self.Basename + '.frd',FemGui.getActiveAnalysis())
QApplication.restoreOverrideCursor()
self.femConsoleMessage("Loading results done!", "#00FF00")
self.femConsoleMessage("Loading results done!", "#00AA00")
else:
self.femConsoleMessage("Loading results failed! Results file doesn\'t exist", "#FF0000")
self.form.label_Time.setText('Time: {0:4.1f}: '.format(time.time() - self.Start))
Expand Down Expand Up @@ -561,8 +564,11 @@ def runCalculix(self):
self.femConsoleMessage("CalculiX binary: {}".format(self.CalculixBinary))
self.femConsoleMessage("Run Calculix...")

# run Claculix
print 'run Calclulix at: ', self.CalculixBinary , ' with: ', self.Basename
# run Calculix
print 'run Calculix at: ', self.CalculixBinary , ' with: ', self.Basename
# change cwd because ccx may crash if directory has no write permission
self.cwd = QtCore.QDir.currentPath()
QtCore.QDir.setCurrent(QtCore.QDir.homePath())
self.Calculix.start(self.CalculixBinary, ['-i',self.Basename])


Expand Down

0 comments on commit e18796e

Please sign in to comment.