Skip to content

Commit

Permalink
FEM: visible command names, use FEM instead of Fem
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach authored and wwmayer committed Feb 28, 2017
1 parent 5a6ccfb commit 5f5797e
Show file tree
Hide file tree
Showing 23 changed files with 224 additions and 224 deletions.
114 changes: 57 additions & 57 deletions src/Mod/Fem/Gui/Command.cpp

Large diffs are not rendered by default.

166 changes: 83 additions & 83 deletions src/Mod/Fem/Gui/Workbench.cpp
Expand Up @@ -54,72 +54,72 @@ void Workbench::setupContextMenu(const char* recipient, Gui::MenuItem* item) con
{
StdWorkbench::setupContextMenu( recipient, item );
*item << "Separator"
<< "Fem_ClearMesh"
<< "Fem_PrintMeshInfo";
<< "FEM_ClearMesh"
<< "FEM_PrintMeshInfo";
}

Gui::ToolBarItem* Workbench::setupToolBars() const
{
Gui::ToolBarItem* root = StdWorkbench::setupToolBars();
Gui::ToolBarItem* fem = new Gui::ToolBarItem(root);
fem->setCommand("FEM");
*fem << "Fem_FemMesh2Mesh"
<< "Fem_Analysis"
<< "Fem_SolverCalculix"
// << "Fem_SolverZ88"
<< "Separator"
<< "Fem_MeshNetgenFromShape"
<< "Fem_MeshGmshFromShape"
<< "Fem_MeshRegion"
<< "Fem_MeshGroup"
//<< "Fem_CreateNodesSet"
<< "Separator"
<< "Fem_MaterialSolid"
<< "Fem_MaterialFluid"
<< "Fem_MaterialMechanicalNonlinear"
<< "Fem_BeamSection"
<< "Fem_ShellThickness"
<< "Fem_FluidSection"
<< "Separator"
<< "Fem_ConstraintFixed"
<< "Fem_ConstraintDisplacement"
<< "Fem_ConstraintPlaneRotation"
<< "Fem_ConstraintContact"
<< "Fem_ConstraintTransform"
<< "Separator"
<< "Fem_ConstraintSelfWeight"
<< "Fem_ConstraintForce"
<< "Fem_ConstraintPressure"
*fem << "FEM_FemMesh2Mesh"
<< "FEM_Analysis"
<< "FEM_SolverCalculix"
// << "FEM_SolverZ88"
<< "Separator"
<< "FEM_MeshNetgenFromShape"
<< "FEM_MeshGmshFromShape"
<< "FEM_MeshRegion"
<< "FEM_MeshGroup"
//<< "FEM_CreateNodesSet"
<< "Separator"
<< "FEM_MaterialSolid"
<< "FEM_MaterialFluid"
<< "FEM_MaterialMechanicalNonlinear"
<< "FEM_BeamSection"
<< "FEM_ShellThickness"
<< "FEM_FluidSection"
<< "Separator"
<< "FEM_ConstraintFixed"
<< "FEM_ConstraintDisplacement"
<< "FEM_ConstraintPlaneRotation"
<< "FEM_ConstraintContact"
<< "FEM_ConstraintTransform"
<< "Separator"
<< "FEM_ConstraintSelfWeight"
<< "FEM_ConstraintForce"
<< "FEM_ConstraintPressure"
//<< "Separator"
//<< "Fem_ConstraintBearing"
//<< "Fem_ConstraintGear"
//<< "Fem_ConstraintPulley"
//<< "Fem_ConstraintFluidBoundary"
//<< "FEM_ConstraintBearing"
//<< "FEM_ConstraintGear"
//<< "FEM_ConstraintPulley"
//<< "FEM_ConstraintFluidBoundary"
<< "Separator"
<< "Fem_ConstraintTemperature"
<< "Fem_ConstraintHeatflux"
<< "Fem_ConstraintInitialTemperature"
<< "FEM_ConstraintTemperature"
<< "FEM_ConstraintHeatflux"
<< "FEM_ConstraintInitialTemperature"
<< "Separator"
<< "Fem_ControlSolver"
<< "Fem_RunSolver"
<< "FEM_ControlSolver"
<< "FEM_RunSolver"
<< "Separator"
<< "Fem_PurgeResults"
<< "Fem_ShowResult";
<< "FEM_PurgeResults"
<< "FEM_ShowResult";

#ifdef FC_USE_VTK
Gui::ToolBarItem* post = new Gui::ToolBarItem(root);
post->setCommand("Post Processing");
*post << "Fem_PostApplyChanges"
<< "Fem_PostPipelineFromResult"
*post << "FEM_PostApplyChanges"
<< "FEM_PostPipelineFromResult"
<< "Separator"
<< "Fem_PostCreateClipFilter"
<< "Fem_PostCreateScalarClipFilter"
<< "Fem_PostCreateCutFilter"
<< "Fem_PostCreateWarpVectorFilter"
<< "Fem_PostCreateDataAlongLineFilter"
<< "Fem_PostCreateLinearizedStressesFilter"
<< "FEM_PostCreateClipFilter"
<< "FEM_PostCreateScalarClipFilter"
<< "FEM_PostCreateCutFilter"
<< "FEM_PostCreateWarpVectorFilter"
<< "FEM_PostCreateDataAlongLineFilter"
<< "FEM_PostCreateLinearizedStressesFilter"
<< "Separator"
<< "Fem_PostCreateFunctions";
<< "FEM_PostCreateFunctions";
#endif

return root;
Expand All @@ -132,55 +132,55 @@ Gui::MenuItem* Workbench::setupMenuBar() const

Gui::MenuItem* util = new Gui::MenuItem;
util->setCommand("&Utilities");
*util << "Fem_FemMesh2Mesh";
*util << "FEM_FemMesh2Mesh";

Gui::MenuItem* fem = new Gui::MenuItem;
root->insertItem(item, fem);
fem->setCommand("&FEM");
*fem << util
<< "Separator"
<< "Fem_Analysis"
<< "Fem_SolverCalculix"
<< "Fem_SolverZ88"
<< "FEM_Analysis"
<< "FEM_SolverCalculix"
<< "FEM_SolverZ88"
<< "Separator"
<< "Fem_MeshNetgenFromShape"
<< "Fem_MeshGmshFromShape"
<< "Fem_MeshRegion"
<< "Fem_MeshGroup"
<< "Fem_CreateNodesSet"
<< "FEM_MeshNetgenFromShape"
<< "FEM_MeshGmshFromShape"
<< "FEM_MeshRegion"
<< "FEM_MeshGroup"
<< "FEM_CreateNodesSet"
<< "Separator"
<< "Fem_MaterialSolid"
<< "Fem_MaterialFluid"
<< "Fem_MaterialMechanicalNonlinear"
<< "Fem_BeamSection"
<< "Fem_ShellThickness"
<< "Fem_FluidSection"
<< "FEM_MaterialSolid"
<< "FEM_MaterialFluid"
<< "FEM_MaterialMechanicalNonlinear"
<< "FEM_BeamSection"
<< "FEM_ShellThickness"
<< "FEM_FluidSection"
<< "Separator"
<< "Fem_ConstraintFixed"
<< "Fem_ConstraintDisplacement"
<< "Fem_ConstraintPlaneRotation"
<< "Fem_ConstraintContact"
<< "Fem_ConstraintTransform"
<< "FEM_ConstraintFixed"
<< "FEM_ConstraintDisplacement"
<< "FEM_ConstraintPlaneRotation"
<< "FEM_ConstraintContact"
<< "FEM_ConstraintTransform"
<< "Separator"
<< "Fem_ConstraintSelfWeight"
<< "Fem_ConstraintForce"
<< "Fem_ConstraintPressure"
<< "FEM_ConstraintSelfWeight"
<< "FEM_ConstraintForce"
<< "FEM_ConstraintPressure"
<< "Separator"
<< "Fem_ConstraintBearing"
<< "Fem_ConstraintGear"
<< "Fem_ConstraintPulley"
<< "FEM_ConstraintBearing"
<< "FEM_ConstraintGear"
<< "FEM_ConstraintPulley"
<< "Separator"
<< "Fem_ConstraintFluidBoundary"
<< "FEM_ConstraintFluidBoundary"
<< "Separator"
<< "Fem_ConstraintTemperature"
<< "Fem_ConstraintHeatflux"
<< "Fem_ConstraintInitialTemperature"
<< "FEM_ConstraintTemperature"
<< "FEM_ConstraintHeatflux"
<< "FEM_ConstraintInitialTemperature"
<< "Separator"
<< "Fem_ControlSolver"
<< "Fem_RunSolver"
<< "FEM_ControlSolver"
<< "FEM_RunSolver"
<< "Separator"
<< "Fem_PurgeResults"
<< "Fem_ShowResult";
<< "FEM_PurgeResults"
<< "FEM_ShowResult";

return root;
}
8 changes: 4 additions & 4 deletions src/Mod/Fem/PyGui/_CommandAnalysis.py
Expand Up @@ -34,13 +34,13 @@


class _CommandAnalysis(FemCommands):
"the Fem_Analysis command definition"
"the FEM_Analysis command definition"
def __init__(self):
super(_CommandAnalysis, self).__init__()
self.resources = {'Pixmap': 'fem-analysis',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_Analysis", "Analysis container"),
'MenuText': QtCore.QT_TRANSLATE_NOOP("FEM_Analysis", "Analysis container"),
'Accel': "N, A",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_Analysis", "Creates a analysis container with standard solver CalculiX")}
'ToolTip': QtCore.QT_TRANSLATE_NOOP("FEM_Analysis", "Creates a analysis container with standard solver CalculiX")}
self.is_active = 'with_document'

def Activated(self):
Expand All @@ -57,4 +57,4 @@ def Activated(self):
FreeCADGui.doCommand("FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [App.activeDocument()." + sel[0].Name + "]")
FreeCADGui.Selection.clearSelection()

FreeCADGui.addCommand('Fem_Analysis', _CommandAnalysis())
FreeCADGui.addCommand('FEM_Analysis', _CommandAnalysis())
8 changes: 4 additions & 4 deletions src/Mod/Fem/PyGui/_CommandBeamSection.py
Expand Up @@ -34,13 +34,13 @@


class _CommandBeamSection(FemCommands):
"The Fem_BeamSection command definition"
"The FEM_BeamSection command definition"
def __init__(self):
super(_CommandBeamSection, self).__init__()
self.resources = {'Pixmap': 'fem-beam-section',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_BeamSection", "Beam cross section"),
'MenuText': QtCore.QT_TRANSLATE_NOOP("FEM_BeamSection", "Beam cross section"),
'Accel': "C, B",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_BeamSection", "Creates a FEM beam cross section")}
'ToolTip': QtCore.QT_TRANSLATE_NOOP("FEM_BeamSection", "Creates a FEM beam cross section")}
self.is_active = 'with_analysis'

def Activated(self):
Expand All @@ -49,4 +49,4 @@ def Activated(self):
FreeCADGui.doCommand("FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [ObjectsFem.makeBeamSection()]")


FreeCADGui.addCommand('Fem_BeamSection', _CommandBeamSection())
FreeCADGui.addCommand('FEM_BeamSection', _CommandBeamSection())
8 changes: 4 additions & 4 deletions src/Mod/Fem/PyGui/_CommandClearMesh.py
Expand Up @@ -34,13 +34,13 @@


class _CommandClearMesh(FemCommands):
"clear the FEM mesh"
"the FEM_ClearMesh command definition"
def __init__(self):
super(_CommandClearMesh, self).__init__()
self.resources = {'Pixmap': 'fem-femmesh-clear-mesh',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_ClearMesh", "Clear FEM mesh"),
'MenuText': QtCore.QT_TRANSLATE_NOOP("FEM_ClearMesh", "Clear FEM mesh"),
# 'Accel': "Z, Z",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_ClearMesh", "Clear the Mesh of a FEM mesh object")}
'ToolTip': QtCore.QT_TRANSLATE_NOOP("FEM_ClearMesh", "Clear the Mesh of a FEM mesh object")}
self.is_active = 'with_femmesh'

def Activated(self):
Expand All @@ -53,4 +53,4 @@ def Activated(self):

FreeCADGui.Selection.clearSelection()

FreeCADGui.addCommand('Fem_ClearMesh', _CommandClearMesh())
FreeCADGui.addCommand('FEM_ClearMesh', _CommandClearMesh())
8 changes: 4 additions & 4 deletions src/Mod/Fem/PyGui/_CommandConstraintSelfWeight.py
Expand Up @@ -34,13 +34,13 @@


class _CommandConstraintSelfWeight(FemCommands):
"The Fem_ConstraintSelfWeight command definition"
"The FEM_ConstraintSelfWeight command definition"
def __init__(self):
super(_CommandConstraintSelfWeight, self).__init__()
self.resources = {'Pixmap': 'fem-constraint-selfweight',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_ConstraintSelfWeight", "Constraint self weigt"),
'MenuText': QtCore.QT_TRANSLATE_NOOP("FEM_ConstraintSelfWeight", "Constraint self weigt"),
'Accel': "C, W",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_ConstraintSelfWeight", "Creates a FEM constraint self weigt")}
'ToolTip': QtCore.QT_TRANSLATE_NOOP("FEM_ConstraintSelfWeight", "Creates a FEM constraint self weigt")}
self.is_active = 'with_analysis'

def Activated(self):
Expand All @@ -49,4 +49,4 @@ def Activated(self):
FreeCADGui.doCommand("FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [ObjectsFem.makeConstraintSelfWeight()]")


FreeCADGui.addCommand('Fem_ConstraintSelfWeight', _CommandConstraintSelfWeight())
FreeCADGui.addCommand('FEM_ConstraintSelfWeight', _CommandConstraintSelfWeight())
8 changes: 4 additions & 4 deletions src/Mod/Fem/PyGui/_CommandControlSolver.py
Expand Up @@ -33,18 +33,18 @@


class _CommandControlSolver(FemCommands):
"the Fem_ControlSolver command definition"
"the FEM_ControlSolver command definition"
def __init__(self):
super(_CommandControlSolver, self).__init__()
self.resources = {'Pixmap': 'fem-control-solver',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_ControlSolver", "Solver job control"),
'MenuText': QtCore.QT_TRANSLATE_NOOP("FEM_ControlSolver", "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_ControlSolver", "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_ControlSolver', _CommandControlSolver())
8 changes: 4 additions & 4 deletions src/Mod/Fem/PyGui/_CommandFEMMesh2Mesh.py
Expand Up @@ -35,12 +35,12 @@


class _CommandFemMesh2Mesh(FemCommands):
# the Fem_FemMesh2Mesh command definition
# the FEM_FemMesh2Mesh command definition
def __init__(self):
super(_CommandFemMesh2Mesh, self).__init__()
self.resources = {'Pixmap': 'fem-femmesh-to-mesh',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_FemMesh2Mesh", "FEM mesh to mesh"),
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_FemMesh2Mesh", "Convert the surface of a FEM mesh to a mesh")}
'MenuText': QtCore.QT_TRANSLATE_NOOP("FEM_FemMesh2Mesh", "FEM mesh to mesh"),
'ToolTip': QtCore.QT_TRANSLATE_NOOP("FEM_FemMesh2Mesh", "Convert the surface of a FEM mesh to a mesh")}
self.is_active = 'with_femmesh_andor_res'

def Activated(self):
Expand Down Expand Up @@ -77,4 +77,4 @@ def Activated(self):
FreeCADGui.Selection.clearSelection()


FreeCADGui.addCommand('Fem_FemMesh2Mesh', _CommandFemMesh2Mesh())
FreeCADGui.addCommand('FEM_FemMesh2Mesh', _CommandFemMesh2Mesh())
8 changes: 4 additions & 4 deletions src/Mod/Fem/PyGui/_CommandFluidSection.py
Expand Up @@ -35,13 +35,13 @@


class _CommandFluidSection(FemCommands):
"The Fem_FluidSection command definition"
"The FEM_FluidSection command definition"
def __init__(self):
super(_CommandFluidSection, self).__init__()
self.resources = {'Pixmap': 'fem-fluid-section',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_FluidSection", "Fluid section for 1D flow"),
'MenuText': QtCore.QT_TRANSLATE_NOOP("FEM_FluidSection", "Fluid section for 1D flow"),
'Accel': "C, B",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_FluidSection", "Creates a FEM Fluid section for 1D flow")}
'ToolTip': QtCore.QT_TRANSLATE_NOOP("FEM_FluidSection", "Creates a FEM Fluid section for 1D flow")}
self.is_active = 'with_analysis'

def Activated(self):
Expand All @@ -50,4 +50,4 @@ def Activated(self):
FreeCADGui.doCommand("FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [ObjectsFem.makeFemFluidSection()]")


FreeCADGui.addCommand('Fem_FluidSection', _CommandFluidSection())
FreeCADGui.addCommand('FEM_FluidSection', _CommandFluidSection())
8 changes: 4 additions & 4 deletions src/Mod/Fem/PyGui/_CommandMaterialFluid.py
Expand Up @@ -35,13 +35,13 @@


class _CommandMaterialFluid(FemCommands):
"the Fem_MaterialFluid command definition"
"the FEM_MaterialFluid command definition"
def __init__(self):
super(_CommandMaterialFluid, self).__init__()
self.resources = {'Pixmap': 'fem-material-fluid',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_MaterialFluid", "FEM material for Fluid"),
'MenuText': QtCore.QT_TRANSLATE_NOOP("FEM_MaterialFluid", "FEM material for Fluid"),
'Accel': "M, M",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_MaterialFluid", "Creates a FEM material for Fluid")}
'ToolTip': QtCore.QT_TRANSLATE_NOOP("FEM_MaterialFluid", "Creates a FEM material for Fluid")}
self.is_active = 'with_analysis'

def Activated(self):
Expand All @@ -55,4 +55,4 @@ def Activated(self):
FreeCADGui.doCommand("Gui.activeDocument().setEdit(App.ActiveDocument.ActiveObject.Name)")


FreeCADGui.addCommand('Fem_MaterialFluid', _CommandMaterialFluid())
FreeCADGui.addCommand('FEM_MaterialFluid', _CommandMaterialFluid())

0 comments on commit 5f5797e

Please sign in to comment.