Skip to content

Commit

Permalink
FEM: solver control command, make name fit in FEM name system
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach authored and yorikvanhavre committed Mar 3, 2017
1 parent 8cf0001 commit ef0a253
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/Mod/Fem/App/CMakeLists.txt
Expand Up @@ -109,7 +109,6 @@ SET(FemGuiScripts_SRCS
PyGui/_CommandAnalysis.py
PyGui/_CommandBeamSection.py
PyGui/_CommandClearMesh.py
PyGui/_CommandControlSolver.py
PyGui/_CommandConstraintSelfWeight.py
PyGui/_CommandFEMMesh2Mesh.py
PyGui/_CommandFluidSection.py
Expand All @@ -125,6 +124,7 @@ SET(FemGuiScripts_SRCS
PyGui/_CommandShellThickness.py
PyGui/_CommandShowResult.py
PyGui/_CommandSolverCalculix.py
PyGui/_CommandSolverControl.py
PyGui/_CommandSolverRun.py
PyGui/_CommandSolverZ88.py
PyGui/_TaskPanelFemBeamSection.py
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Fem/CMakeLists.txt
Expand Up @@ -70,7 +70,6 @@ INSTALL(
PyGui/_CommandAnalysis.py
PyGui/_CommandBeamSection.py
PyGui/_CommandClearMesh.py
PyGui/_CommandControlSolver.py
PyGui/_CommandConstraintSelfWeight.py
PyGui/_CommandFEMMesh2Mesh.py
PyGui/_CommandFluidSection.py
Expand All @@ -86,6 +85,7 @@ INSTALL(
PyGui/_CommandShellThickness.py
PyGui/_CommandShowResult.py
PyGui/_CommandSolverCalculix.py
PyGui/_CommandSolverControl.py
PyGui/_CommandSolverRun.py
PyGui/_CommandSolverZ88.py
PyGui/_TaskPanelFemBeamSection.py
Expand Down
4 changes: 2 additions & 2 deletions src/Mod/Fem/Gui/Workbench.cpp
Expand Up @@ -100,7 +100,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const
<< "FEM_ConstraintHeatflux"
<< "FEM_ConstraintInitialTemperature"
<< "Separator"
<< "FEM_ControlSolver"
<< "FEM_SolverControl"
<< "FEM_SolverRun"
<< "Separator"
<< "FEM_PurgeResults"
Expand Down Expand Up @@ -176,7 +176,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const
<< "FEM_ConstraintHeatflux"
<< "FEM_ConstraintInitialTemperature"
<< "Separator"
<< "FEM_ControlSolver"
<< "FEM_SolverControl"
<< "FEM_SolverRun"
<< "Separator"
<< "FEM_PurgeResults"
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Fem/InitGui.py
Expand Up @@ -49,7 +49,6 @@ def Initialize(self):
import PyGui._CommandPurgeResults
import PyGui._CommandClearMesh
import PyGui._CommandPrintMeshInfo
import PyGui._CommandControlSolver
import PyGui._CommandFEMMesh2Mesh
import PyGui._CommandMeshGmshFromShape
import PyGui._CommandMeshNetgenFromShape
Expand All @@ -63,6 +62,7 @@ def Initialize(self):
import PyGui._CommandMaterialFluid
import PyGui._CommandMaterialMechanicalNonlinear
import PyGui._CommandSolverCalculix
import PyGui._CommandSolverControl
import PyGui._CommandSolverRun
import PyGui._CommandSolverZ88
import PyGui._CommandConstraintSelfWeight
Expand Down
Expand Up @@ -24,27 +24,27 @@
__author__ = "Juergen Riegel"
__url__ = "http://www.freecadweb.org"

## @package CommandControlSolver
## @package CommandSolverControl
# \ingroup FEM

from FemCommands import FemCommands
import FreeCADGui
from PySide import QtCore


class _CommandControlSolver(FemCommands):
"the FEM_ControlSolver command definition"
class _CommandSolverControl(FemCommands):
"the FEM_SolverControl command definition"
def __init__(self):
super(_CommandControlSolver, self).__init__()
super(_CommandSolverControl, self).__init__()
self.resources = {'Pixmap': 'fem-control-solver',
'MenuText': QtCore.QT_TRANSLATE_NOOP("FEM_ControlSolver", "Solver job control"),
'MenuText': QtCore.QT_TRANSLATE_NOOP("FEM_SolverControl", "Solver job control"),
'Accel': "S, C",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("FEM_ControlSolver", "Changes solver attributes and runs the calculations for the selected solver")}
'ToolTip': QtCore.QT_TRANSLATE_NOOP("FEM_SolverControl", "Changes solver attributes and runs the calculations for the selected solver")}
self.is_active = 'with_solver'

def Activated(self):
solver_obj = FreeCADGui.Selection.getSelection()[0]
FreeCADGui.ActiveDocument.setEdit(solver_obj, 0)


FreeCADGui.addCommand('FEM_ControlSolver', _CommandControlSolver())
FreeCADGui.addCommand('FEM_SolverControl', _CommandSolverControl())

0 comments on commit ef0a253

Please sign in to comment.