Skip to content

Commit

Permalink
FEM: Change menu-bar organization
Browse files Browse the repository at this point in the history
Split the menu-bar into multiple smaller ones. Group constraints by the
physics they are involed into. Also make the ordering a little more
consistent: Initial conditions first, followed by boundary conditions
followed by constraints on whole bodies.
  • Loading branch information
drhooves authored and yorikvanhavre committed Jul 10, 2017
1 parent f2c0f9c commit 1a0c193
Showing 1 changed file with 81 additions and 51 deletions.
132 changes: 81 additions & 51 deletions src/Mod/Fem/Gui/Workbench.cpp
Expand Up @@ -130,57 +130,87 @@ Gui::MenuItem* Workbench::setupMenuBar() const
Gui::MenuItem* root = StdWorkbench::setupMenuBar();
Gui::MenuItem* item = root->findItem("&Windows");

Gui::MenuItem* util = new Gui::MenuItem;
util->setCommand("&Utilities");
*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"
<< "Separator"
<< "FEM_MeshNetgenFromShape"
<< "FEM_MeshGmshFromShape"
<< "FEM_MeshRegion"
<< "FEM_MeshGroup"
<< "FEM_CreateNodesSet"
<< "Separator"
<< "FEM_MaterialSolid"
<< "FEM_MaterialFluid"
<< "FEM_MaterialMechanicalNonlinear"
<< "FEM_ElementGeometry1D"
<< "FEM_ElementGeometry2D"
<< "FEM_ElementFluid1D"
<< "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"
<< "Separator"
<< "FEM_ConstraintFluidBoundary"
<< "Separator"
<< "FEM_ConstraintTemperature"
<< "FEM_ConstraintHeatflux"
<< "FEM_ConstraintInitialTemperature"
<< "Separator"
<< "FEM_SolverControl"
<< "FEM_SolverRun"
<< "Separator"
<< "FEM_ResultsPurge"
<< "FEM_ResultShow";
Gui::MenuItem* mech = new Gui::MenuItem;
mech->setCommand("&Mechanical Constraints");
*mech << "FEM_ConstraintFixed"
<< "FEM_ConstraintDisplacement"
<< "FEM_ConstraintPlaneRotation"
<< "FEM_ConstraintContact"
<< "FEM_ConstraintTransform"
<< "Separator"
<< "FEM_ConstraintForce"
<< "FEM_ConstraintPressure"
<< "FEM_ConstraintSelfWeight"
<< "Separator"
<< "FEM_ConstraintBearing"
<< "FEM_ConstraintGear"
<< "FEM_ConstraintPulley";

Gui::MenuItem* thermal = new Gui::MenuItem;
thermal->setCommand("&Thermal Constraints");
*thermal << "FEM_ConstraintInitialTemperature"
<< "Separator"
<< "FEM_ConstraintHeatflux"
<< "FEM_ConstraintTemperature";

Gui::MenuItem* fluid = new Gui::MenuItem;
fluid->setCommand("&Fluid Constraints");
*fluid << "FEM_ConstraintFluidBoundary";

Gui::MenuItem* model = new Gui::MenuItem;
root->insertItem(item, model);
model->setCommand("M&odel");
*model << "FEM_Analysis"
<< "Separator"
<< "FEM_MaterialSolid"
<< "FEM_MaterialFluid"
<< "FEM_MaterialMechanicalNonlinear"
<< "FEM_ElementGeometry1D"
<< "FEM_ElementGeometry2D"
<< "FEM_ElementFluid1D"
<< "Separator"
<< mech
<< thermal
<< fluid;

Gui::MenuItem* mesh = new Gui::MenuItem;
root->insertItem(item, mesh);
mesh->setCommand("M&esh");
*mesh << "FEM_MeshNetgenFromShape"
<< "FEM_MeshGmshFromShape"
<< "Separator"
<< "FEM_MeshRegion"
<< "FEM_MeshGroup"
<< "Separator"
<< "FEM_CreateNodesSet"
<< "FEM_FEMMesh2Mesh";

Gui::MenuItem* solve = new Gui::MenuItem;
root->insertItem(item, solve);
solve->setCommand("&Solve");
*solve << "FEM_SolverCalculix"
<< "FEM_SolverZ88"
<< "Separator"
<< "FEM_SolverControl"
<< "FEM_SolverRun";

Gui::MenuItem* results = new Gui::MenuItem;
root->insertItem(item, results);
results->setCommand("&Results");
*results << "FEM_ResultsPurge"
<< "FEM_ResultShow"
<< "Separator"
<< "FEM_PostApplyChanges"
<< "FEM_PostPipelineFromResult"
<< "Separator"
<< "FEM_PostCreateClipFilter"
<< "FEM_PostCreateScalarClipFilter"
<< "FEM_PostCreateCutFilter"
<< "FEM_PostCreateWarpVectorFilter"
<< "FEM_PostCreateDataAlongLineFilter"
<< "FEM_PostCreateLinearizedStressesFilter"
<< "Separator"
<< "FEM_PostCreateFunctions";

return root;
}

0 comments on commit 1a0c193

Please sign in to comment.