Skip to content

Commit

Permalink
FEM: Clean white spaces in MechanicalAnalysis.py
Browse files Browse the repository at this point in the history
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
  • Loading branch information
PrzemoF authored and wwmayer committed Apr 23, 2015
1 parent f482dc2 commit d548490
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Mod/Fem/MechanicalAnalysis.py
Expand Up @@ -208,7 +208,7 @@ def __init__(self,object):
# the panel has a tree widget that contains categories
# 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.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Fem/MechanicalAnalysis.ui")
self.fem_prefs = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Fem")
ccx_binary = self.fem_prefs.GetString("ccxBinaryPath","")
if ccx_binary:
Expand All @@ -222,7 +222,7 @@ def __init__(self,object):
self.CalculixBinary = FreeCAD.getHomePath() + 'bin/ccx.exe'
else:
self.CalculixBinary = 'ccx'
self.TempDir = FreeCAD.ActiveDocument.TransientDir.replace('\\','/') + '/FemAnl_'+ object.Uid[-4:]
self.TempDir = FreeCAD.ActiveDocument.TransientDir.replace('\\','/') + '/FemAnl_' + object.Uid[-4:]
if not os.path.isdir(self.TempDir):
os.mkdir(self.TempDir)

Expand All @@ -231,9 +231,9 @@ def __init__(self,object):
self.Calculix = QtCore.QProcess()
self.Timer = QtCore.QTimer()
self.Timer.start(300)

self.fem_console_message = ''

#Connect Signals and Slots
QtCore.QObject.connect(self.form.toolButton_chooseOutputDir, QtCore.SIGNAL("clicked()"), self.chooseOutputDir)
QtCore.QObject.connect(self.form.pushButton_write, QtCore.SIGNAL("clicked()"), self.write_input_file_handler)
Expand All @@ -248,10 +248,10 @@ def __init__(self,object):
QtCore.QObject.connect(self.Timer, QtCore.SIGNAL("timeout()"), self.UpdateText)

self.update()

def femConsoleMessage(self, message="", color="#000000"):
self.fem_console_message = self.fem_console_message + '<font color="#0000FF">{0:4.1f}:</font> <font color="{1}">{2}</font><br>'.\
format(time.time() - self.Start, color, message.encode('utf-8'))
format(time.time() - self.Start, color, message.encode('utf-8'))
self.form.textEdit_Output.setText(self.fem_console_message)

def printCalculiXstdout(self):
Expand Down Expand Up @@ -596,7 +596,7 @@ def write_calculix_input_file(self):
def start_ext_editor(self, ext_editor_path, filename):
if not hasattr(self, "ext_editor_process"):
self.ext_editor_process = QtCore.QProcess()
if self.ext_editor_process.state() != QtCore.QProcess.Running:
if self.ext_editor_process.state() != QtCore.QProcess.Running:
self.ext_editor_process.start(ext_editor_path, [filename])

def editCalculixInputFile(self):
Expand All @@ -620,7 +620,7 @@ def runCalculix(self):
self.femConsoleMessage("Run Calculix...")

# run Calculix
print 'run Calculix at: ', self.CalculixBinary , ' with: ', self.Basename
print 'run Calculix at: ', self.CalculixBinary, ' with: ', self.Basename
# change cwd because ccx may crash if directory has no write permission
# there is also a limit of the length of file names so jump to the document directory
self.cwd = QtCore.QDir.currentPath()
Expand Down

0 comments on commit d548490

Please sign in to comment.