From ddb20e73296146673b7851b2bbd88682b198e9c7 Mon Sep 17 00:00:00 2001 From: Przemo Firszt Date: Tue, 13 Oct 2015 17:50:00 +0100 Subject: [PATCH] FEM: Remove Frequency Analysis from GUI Separate Frequency analysis button is no longer required. Signed-off-by: Przemo Firszt --- src/Mod/Fem/App/CMakeLists.txt | 1 - src/Mod/Fem/CMakeLists.txt | 1 - src/Mod/Fem/Gui/AppFemGui.cpp | 1 - src/Mod/Fem/Gui/Workbench.cpp | 2 - src/Mod/Fem/_CommandFrequencyAnalysis.py | 64 ------------------------ 5 files changed, 69 deletions(-) delete mode 100644 src/Mod/Fem/_CommandFrequencyAnalysis.py diff --git a/src/Mod/Fem/App/CMakeLists.txt b/src/Mod/Fem/App/CMakeLists.txt index 309c1b29c..c2a42d21f 100755 --- a/src/Mod/Fem/App/CMakeLists.txt +++ b/src/Mod/Fem/App/CMakeLists.txt @@ -88,7 +88,6 @@ SET(FemScripts_SRCS _ViewProviderFemAnalysis.py _FemAnalysis.py _CommandMechanicalShowResult.py - _CommandFrequencyAnalysis.py _CommandQuickAnalysis.py _CommandPurgeFemResults.py _CommandMechanicalJobControl.py diff --git a/src/Mod/Fem/CMakeLists.txt b/src/Mod/Fem/CMakeLists.txt index 73de859b0..6eee63132 100755 --- a/src/Mod/Fem/CMakeLists.txt +++ b/src/Mod/Fem/CMakeLists.txt @@ -30,7 +30,6 @@ INSTALL( _ViewProviderFemAnalysis.py _FemAnalysis.py _CommandMechanicalShowResult.py - _CommandFrequencyAnalysis.py _CommandQuickAnalysis.py _CommandPurgeFemResults.py _CommandMechanicalJobControl.py diff --git a/src/Mod/Fem/Gui/AppFemGui.cpp b/src/Mod/Fem/Gui/AppFemGui.cpp index c8e621f3d..e29c17124 100644 --- a/src/Mod/Fem/Gui/AppFemGui.cpp +++ b/src/Mod/Fem/Gui/AppFemGui.cpp @@ -105,7 +105,6 @@ void FemGuiExport initFemGui() Base::Interpreter().loadModule("FemCommands"); Base::Interpreter().loadModule("_CommandMechanicalShowResult"); - Base::Interpreter().loadModule("_CommandFrequencyAnalysis"); Base::Interpreter().loadModule("_CommandQuickAnalysis"); Base::Interpreter().loadModule("_CommandPurgeFemResults"); Base::Interpreter().loadModule("_CommandMechanicalJobControl"); diff --git a/src/Mod/Fem/Gui/Workbench.cpp b/src/Mod/Fem/Gui/Workbench.cpp index 27592c9d2..e9210037e 100755 --- a/src/Mod/Fem/Gui/Workbench.cpp +++ b/src/Mod/Fem/Gui/Workbench.cpp @@ -72,7 +72,6 @@ Gui::ToolBarItem* Workbench::setupToolBars() const << "Separator" << "Fem_MechanicalJobControl" << "Fem_Quick_Analysis" - << "Fem_Frequency_Analysis" << "Fem_PurgeResults" << "Fem_ShowResult"; return root; @@ -102,7 +101,6 @@ Gui::MenuItem* Workbench::setupMenuBar() const << "Separator" << "Fem_MechanicalJobControl" << "Fem_Quick_Analysis" - << "Fem_Frequency_Analysis" << "Fem_PurgeResults" << "Fem_ShowResult"; diff --git a/src/Mod/Fem/_CommandFrequencyAnalysis.py b/src/Mod/Fem/_CommandFrequencyAnalysis.py deleted file mode 100644 index 0f2ebb88c..000000000 --- a/src/Mod/Fem/_CommandFrequencyAnalysis.py +++ /dev/null @@ -1,64 +0,0 @@ -#*************************************************************************** -#* * -#* Copyright (c) 2013-2015 - Juergen Riegel * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* This program is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with this program; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#*************************************************************************** - -__title__ = "Command Frequency Analysis" -__author__ = "Juergen Riegel" -__url__ = "http://www.freecadweb.org" - -import FreeCAD -from FemCommands import FemCommands -from FemTools import FemTools - -if FreeCAD.GuiUp: - import FreeCADGui - from PySide import QtCore, QtGui - - -class _CommandFrequencyAnalysis(FemCommands): - def __init__(self): - super(_CommandFrequencyAnalysis, self).__init__() - self.resources = {'Pixmap': 'fem-frequency-analysis', - 'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_Frequency_Analysis", "Run frequency analysis with CalculiX ccx"), - 'Accel': "R, F", - 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_Frequency_Analysis", "Write .inp file and run frequency analysis with CalculiX ccx")} - self.is_active = 'with_analysis' - - def Activated(self): - def load_results(ret_code): - if ret_code == 0: - self.fea.load_results() - else: - print "CalculiX failed ccx finished with error {}".format(ret_code) - - self.fea = FemTools() - self.fea.reset_all() - self.fea.set_analysis_type('frequency') - message = self.fea.check_prerequisites() - if message: - QtGui.QMessageBox.critical(None, "Missing prerequisite", message) - return - self.fea.finished.connect(load_results) - QtCore.QThreadPool.globalInstance().start(self.fea) - - -if FreeCAD.GuiUp: - FreeCADGui.addCommand('Fem_Frequency_Analysis', _CommandFrequencyAnalysis())