From d548490a2bd7c0bd2be3dba8003c3a2b161a5767 Mon Sep 17 00:00:00 2001 From: Przemo Firszt Date: Mon, 20 Apr 2015 21:36:32 +0100 Subject: [PATCH] FEM: Clean white spaces in MechanicalAnalysis.py Signed-off-by: Przemo Firszt --- src/Mod/Fem/MechanicalAnalysis.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Mod/Fem/MechanicalAnalysis.py b/src/Mod/Fem/MechanicalAnalysis.py index 9af5b4a8b04b..0a0af1578612 100644 --- a/src/Mod/Fem/MechanicalAnalysis.py +++ b/src/Mod/Fem/MechanicalAnalysis.py @@ -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: @@ -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) @@ -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) @@ -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 + '{0:4.1f}: {2}
'.\ - 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): @@ -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): @@ -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()