FEM: gui tools, code formating
This commit is contained in:
@@ -84,10 +84,11 @@ Workbench::~Workbench()
|
||||
|
||||
void Workbench::setupContextMenu(const char* recipient, Gui::MenuItem* item) const
|
||||
{
|
||||
StdWorkbench::setupContextMenu( recipient, item );
|
||||
*item << "Separator"
|
||||
<< "FEM_MeshClear"
|
||||
<< "FEM_MeshDisplayInfo";
|
||||
StdWorkbench::setupContextMenu( recipient, item );
|
||||
*item
|
||||
<< "Separator"
|
||||
<< "FEM_MeshClear"
|
||||
<< "FEM_MeshDisplayInfo";
|
||||
}
|
||||
|
||||
Gui::ToolBarItem* Workbench::setupToolBars() const
|
||||
@@ -96,106 +97,118 @@ Gui::ToolBarItem* Workbench::setupToolBars() const
|
||||
|
||||
Gui::ToolBarItem* model = new Gui::ToolBarItem(root);
|
||||
model->setCommand("Model");
|
||||
*model << "FEM_Analysis"
|
||||
<< "Separator"
|
||||
<< "FEM_MaterialSolid"
|
||||
<< "FEM_MaterialFluid"
|
||||
<< "FEM_MaterialMechanicalNonlinear"
|
||||
<< "FEM_MaterialReinforced"
|
||||
<< "FEM_MaterialEditor"
|
||||
<< "Separator"
|
||||
<< "FEM_ElementGeometry1D"
|
||||
<< "FEM_ElementRotation1D"
|
||||
<< "FEM_ElementGeometry2D"
|
||||
<< "FEM_ElementFluid1D";
|
||||
*model
|
||||
<< "FEM_Analysis"
|
||||
<< "Separator"
|
||||
<< "FEM_MaterialSolid"
|
||||
<< "FEM_MaterialFluid"
|
||||
<< "FEM_MaterialMechanicalNonlinear"
|
||||
<< "FEM_MaterialReinforced"
|
||||
<< "FEM_MaterialEditor"
|
||||
<< "Separator"
|
||||
<< "FEM_ElementGeometry1D"
|
||||
<< "FEM_ElementRotation1D"
|
||||
<< "FEM_ElementGeometry2D"
|
||||
<< "FEM_ElementFluid1D";
|
||||
|
||||
Gui::ToolBarItem* electrostat = new Gui::ToolBarItem(root);
|
||||
electrostat->setCommand("Electrostatic Constraints");
|
||||
*electrostat << "FEM_ConstraintElectrostaticPotential";
|
||||
*electrostat
|
||||
<< "FEM_ConstraintElectrostaticPotential";
|
||||
|
||||
Gui::ToolBarItem* fluid = new Gui::ToolBarItem(root);
|
||||
fluid->setCommand("Fluid Constraints");
|
||||
*fluid << "FEM_ConstraintInitialFlowVelocity"
|
||||
<< "Separator"
|
||||
<< "FEM_ConstraintFlowVelocity";
|
||||
*fluid
|
||||
<< "FEM_ConstraintInitialFlowVelocity"
|
||||
<< "Separator"
|
||||
<< "FEM_ConstraintFlowVelocity";
|
||||
|
||||
Gui::ToolBarItem* geom = new Gui::ToolBarItem(root);
|
||||
geom->setCommand("Geometrical Constraints");
|
||||
*geom << "FEM_ConstraintPlaneRotation"
|
||||
<< "FEM_ConstraintTransform";
|
||||
*geom
|
||||
<< "FEM_ConstraintPlaneRotation"
|
||||
<< "FEM_ConstraintTransform";
|
||||
|
||||
Gui::ToolBarItem* mech = new Gui::ToolBarItem(root);
|
||||
mech->setCommand("Mechanical Constraints");
|
||||
*mech << "FEM_ConstraintFixed"
|
||||
<< "FEM_ConstraintDisplacement"
|
||||
<< "FEM_ConstraintContact"
|
||||
<< "FEM_ConstraintTie"
|
||||
<< "Separator"
|
||||
<< "FEM_ConstraintForce"
|
||||
<< "FEM_ConstraintPressure"
|
||||
<< "FEM_ConstraintSelfWeight";
|
||||
*mech
|
||||
<< "FEM_ConstraintFixed"
|
||||
<< "FEM_ConstraintDisplacement"
|
||||
<< "FEM_ConstraintContact"
|
||||
<< "FEM_ConstraintTie"
|
||||
<< "Separator"
|
||||
<< "FEM_ConstraintForce"
|
||||
<< "FEM_ConstraintPressure"
|
||||
<< "FEM_ConstraintSelfWeight";
|
||||
|
||||
Gui::ToolBarItem* thermal = new Gui::ToolBarItem(root);
|
||||
thermal->setCommand("Thermal Constraints");
|
||||
*thermal << "FEM_ConstraintInitialTemperature"
|
||||
<< "Separator"
|
||||
<< "FEM_ConstraintHeatflux"
|
||||
<< "FEM_ConstraintTemperature"
|
||||
<< "FEM_ConstraintBodyHeatSource";
|
||||
*thermal
|
||||
<< "FEM_ConstraintInitialTemperature"
|
||||
<< "Separator"
|
||||
<< "FEM_ConstraintHeatflux"
|
||||
<< "FEM_ConstraintTemperature"
|
||||
<< "FEM_ConstraintBodyHeatSource";
|
||||
|
||||
Gui::ToolBarItem* mesh = new Gui::ToolBarItem(root);
|
||||
mesh->setCommand("Mesh");
|
||||
#ifdef FCWithNetgen
|
||||
*mesh << "FEM_MeshNetgenFromShape";
|
||||
*mesh
|
||||
<< "FEM_MeshNetgenFromShape";
|
||||
#endif
|
||||
*mesh << "FEM_MeshGmshFromShape"
|
||||
<< "Separator"
|
||||
<< "FEM_MeshBoundaryLayer"
|
||||
<< "FEM_MeshRegion"
|
||||
<< "FEM_MeshGroup"
|
||||
<< "Separator"
|
||||
<< "FEM_FEMMesh2Mesh";
|
||||
*mesh
|
||||
<< "FEM_MeshGmshFromShape"
|
||||
<< "Separator"
|
||||
<< "FEM_MeshBoundaryLayer"
|
||||
<< "FEM_MeshRegion"
|
||||
<< "FEM_MeshGroup"
|
||||
<< "Separator"
|
||||
<< "FEM_FEMMesh2Mesh";
|
||||
|
||||
Gui::ToolBarItem* solve = new Gui::ToolBarItem(root);
|
||||
solve->setCommand("Solve");
|
||||
*solve << "FEM_SolverCalculixCxxtools"
|
||||
<< "FEM_SolverCalculiX"
|
||||
<< "FEM_SolverElmer"
|
||||
<< "Separator"
|
||||
<< "FEM_EquationElasticity"
|
||||
<< "FEM_EquationElectrostatic"
|
||||
<< "FEM_EquationFlow"
|
||||
<< "FEM_EquationFluxsolver"
|
||||
<< "FEM_EquationElectricforce"
|
||||
<< "FEM_EquationHeat"
|
||||
<< "Separator"
|
||||
<< "FEM_SolverControl"
|
||||
<< "FEM_SolverRun";
|
||||
*solve
|
||||
<< "FEM_SolverCalculixCxxtools"
|
||||
<< "FEM_SolverCalculiX"
|
||||
<< "FEM_SolverElmer"
|
||||
<< "Separator"
|
||||
<< "FEM_EquationElasticity"
|
||||
<< "FEM_EquationElectrostatic"
|
||||
<< "FEM_EquationFlow"
|
||||
<< "FEM_EquationFluxsolver"
|
||||
<< "FEM_EquationElectricforce"
|
||||
<< "FEM_EquationHeat"
|
||||
<< "Separator"
|
||||
<< "FEM_SolverControl"
|
||||
<< "FEM_SolverRun";
|
||||
|
||||
Gui::ToolBarItem* results = new Gui::ToolBarItem(root);
|
||||
results->setCommand("Results");
|
||||
*results << "FEM_ResultsPurge"
|
||||
<< "FEM_ResultShow";
|
||||
*results
|
||||
<< "FEM_ResultsPurge"
|
||||
<< "FEM_ResultShow";
|
||||
#ifdef FC_USE_VTK
|
||||
*results << "Separator"
|
||||
<< "FEM_PostApplyChanges"
|
||||
<< "FEM_PostPipelineFromResult"
|
||||
<< "Separator"
|
||||
<< "FEM_PostFilterWarp"
|
||||
<< "FEM_PostFilterClipScalar"
|
||||
<< "FEM_PostFilterCutFunction"
|
||||
<< "FEM_PostFilterClipRegion"
|
||||
<< "FEM_PostFilterDataAlongLine"
|
||||
<< "FEM_PostFilterLinearizedStresses"
|
||||
<< "FEM_PostFilterDataAtPoint"
|
||||
<< "Separator"
|
||||
<< "FEM_PostCreateFunctions";
|
||||
*results
|
||||
<< "Separator"
|
||||
<< "FEM_PostApplyChanges"
|
||||
<< "FEM_PostPipelineFromResult"
|
||||
<< "Separator"
|
||||
<< "FEM_PostFilterWarp"
|
||||
<< "FEM_PostFilterClipScalar"
|
||||
<< "FEM_PostFilterCutFunction"
|
||||
<< "FEM_PostFilterClipRegion"
|
||||
<< "FEM_PostFilterDataAlongLine"
|
||||
<< "FEM_PostFilterLinearizedStresses"
|
||||
<< "FEM_PostFilterDataAtPoint"
|
||||
<< "Separator"
|
||||
<< "FEM_PostCreateFunctions";
|
||||
#endif
|
||||
|
||||
Gui::ToolBarItem* utils = new Gui::ToolBarItem(root);
|
||||
utils->setCommand("Utilities");
|
||||
*utils << "FEM_ClippingPlaneAdd"
|
||||
<< "FEM_ClippingPlaneRemoveAll";
|
||||
*utils
|
||||
<< "FEM_ClippingPlaneAdd"
|
||||
<< "FEM_ClippingPlaneRemoveAll";
|
||||
|
||||
return root;
|
||||
}
|
||||
@@ -207,136 +220,151 @@ Gui::MenuItem* Workbench::setupMenuBar() const
|
||||
|
||||
Gui::MenuItem* material = new Gui::MenuItem;
|
||||
material->setCommand("Materials");
|
||||
*material << "FEM_MaterialSolid"
|
||||
<< "FEM_MaterialFluid"
|
||||
<< "FEM_MaterialMechanicalNonlinear"
|
||||
<< "FEM_MaterialReinforced"
|
||||
<< "FEM_MaterialEditor";
|
||||
*material
|
||||
<< "FEM_MaterialSolid"
|
||||
<< "FEM_MaterialFluid"
|
||||
<< "FEM_MaterialMechanicalNonlinear"
|
||||
<< "FEM_MaterialReinforced"
|
||||
<< "FEM_MaterialEditor";
|
||||
|
||||
Gui::MenuItem* elegeom = new Gui::MenuItem;
|
||||
elegeom->setCommand("&Element Geometry");
|
||||
*elegeom << "FEM_ElementGeometry1D"
|
||||
<< "FEM_ElementRotation1D"
|
||||
<< "FEM_ElementGeometry2D"
|
||||
<< "FEM_ElementFluid1D";
|
||||
*elegeom
|
||||
<< "FEM_ElementGeometry1D"
|
||||
<< "FEM_ElementRotation1D"
|
||||
<< "FEM_ElementGeometry2D"
|
||||
<< "FEM_ElementFluid1D";
|
||||
|
||||
Gui::MenuItem* elec = new Gui::MenuItem;
|
||||
elec->setCommand("&Electrostatic Constraints");
|
||||
*elec << "FEM_ConstraintElectrostaticPotential";
|
||||
*elec
|
||||
<< "FEM_ConstraintElectrostaticPotential";
|
||||
|
||||
Gui::MenuItem* fluid = new Gui::MenuItem;
|
||||
fluid->setCommand("&Fluid Constraints");
|
||||
*fluid << "FEM_ConstraintInitialFlowVelocity"
|
||||
<< "Separator"
|
||||
<< "FEM_ConstraintFlowVelocity";
|
||||
*fluid
|
||||
<< "FEM_ConstraintInitialFlowVelocity"
|
||||
<< "Separator"
|
||||
<< "FEM_ConstraintFlowVelocity";
|
||||
|
||||
Gui::MenuItem* geom = new Gui::MenuItem;
|
||||
geom->setCommand("&Geometrical Constraints");
|
||||
*geom << "FEM_ConstraintPlaneRotation"
|
||||
<< "FEM_ConstraintTransform";
|
||||
*geom
|
||||
<< "FEM_ConstraintPlaneRotation"
|
||||
<< "FEM_ConstraintTransform";
|
||||
|
||||
Gui::MenuItem* mech = new Gui::MenuItem;
|
||||
mech->setCommand("&Mechanical Constraints");
|
||||
*mech << "FEM_ConstraintFixed"
|
||||
<< "FEM_ConstraintDisplacement"
|
||||
<< "FEM_ConstraintContact"
|
||||
<< "FEM_ConstraintTie"
|
||||
<< "Separator"
|
||||
<< "FEM_ConstraintForce"
|
||||
<< "FEM_ConstraintPressure"
|
||||
<< "FEM_ConstraintSelfWeight";
|
||||
*mech
|
||||
<< "FEM_ConstraintFixed"
|
||||
<< "FEM_ConstraintDisplacement"
|
||||
<< "FEM_ConstraintContact"
|
||||
<< "FEM_ConstraintTie"
|
||||
<< "Separator"
|
||||
<< "FEM_ConstraintForce"
|
||||
<< "FEM_ConstraintPressure"
|
||||
<< "FEM_ConstraintSelfWeight";
|
||||
|
||||
Gui::MenuItem* thermal = new Gui::MenuItem;
|
||||
thermal->setCommand("&Thermal Constraints");
|
||||
*thermal << "FEM_ConstraintInitialTemperature"
|
||||
<< "Separator"
|
||||
<< "FEM_ConstraintHeatflux"
|
||||
<< "FEM_ConstraintTemperature"
|
||||
<< "FEM_ConstraintBodyHeatSource";
|
||||
*thermal
|
||||
<< "FEM_ConstraintInitialTemperature"
|
||||
<< "Separator"
|
||||
<< "FEM_ConstraintHeatflux"
|
||||
<< "FEM_ConstraintTemperature"
|
||||
<< "FEM_ConstraintBodyHeatSource";
|
||||
|
||||
Gui::MenuItem* nosolver = new Gui::MenuItem;
|
||||
nosolver->setCommand("&Constraints without solver");
|
||||
*nosolver << "FEM_ConstraintFluidBoundary"
|
||||
<< "Separator"
|
||||
<< "FEM_ConstraintBearing"
|
||||
<< "FEM_ConstraintGear"
|
||||
<< "FEM_ConstraintPulley";
|
||||
*nosolver
|
||||
<< "FEM_ConstraintFluidBoundary"
|
||||
<< "Separator"
|
||||
<< "FEM_ConstraintBearing"
|
||||
<< "FEM_ConstraintGear"
|
||||
<< "FEM_ConstraintPulley";
|
||||
|
||||
Gui::MenuItem* model = new Gui::MenuItem;
|
||||
root->insertItem(item, model);
|
||||
model->setCommand("M&odel");
|
||||
*model << "FEM_Analysis"
|
||||
<< "Separator"
|
||||
<< material
|
||||
<< elegeom
|
||||
<< "Separator"
|
||||
<< elec
|
||||
<< fluid
|
||||
<< geom
|
||||
<< mech
|
||||
<< thermal
|
||||
<< "Separator"
|
||||
<< nosolver;
|
||||
*model
|
||||
<< "FEM_Analysis"
|
||||
<< "Separator"
|
||||
<< material
|
||||
<< elegeom
|
||||
<< "Separator"
|
||||
<< elec
|
||||
<< fluid
|
||||
<< geom
|
||||
<< mech
|
||||
<< thermal
|
||||
<< "Separator"
|
||||
<< nosolver;
|
||||
|
||||
Gui::MenuItem* mesh = new Gui::MenuItem;
|
||||
root->insertItem(item, mesh);
|
||||
mesh->setCommand("M&esh");
|
||||
#ifdef FCWithNetgen
|
||||
*mesh << "FEM_MeshNetgenFromShape";
|
||||
*mesh
|
||||
<< "FEM_MeshNetgenFromShape";
|
||||
#endif
|
||||
*mesh << "FEM_MeshGmshFromShape"
|
||||
<< "Separator"
|
||||
<< "FEM_MeshBoundaryLayer"
|
||||
<< "FEM_MeshRegion"
|
||||
<< "FEM_MeshGroup"
|
||||
<< "Separator"
|
||||
<< "FEM_CreateNodesSet"
|
||||
<< "FEM_FEMMesh2Mesh";
|
||||
*mesh
|
||||
<< "FEM_MeshGmshFromShape"
|
||||
<< "Separator"
|
||||
<< "FEM_MeshBoundaryLayer"
|
||||
<< "FEM_MeshRegion"
|
||||
<< "FEM_MeshGroup"
|
||||
<< "Separator"
|
||||
<< "FEM_CreateNodesSet"
|
||||
<< "FEM_FEMMesh2Mesh";
|
||||
|
||||
Gui::MenuItem* solve = new Gui::MenuItem;
|
||||
root->insertItem(item, solve);
|
||||
solve->setCommand("&Solve");
|
||||
*solve << "FEM_SolverCalculixCxxtools"
|
||||
<< "FEM_SolverCalculiX"
|
||||
<< "FEM_SolverElmer"
|
||||
<< "FEM_SolverZ88"
|
||||
<< "Separator"
|
||||
<< "FEM_EquationElasticity"
|
||||
<< "FEM_EquationElectrostatic"
|
||||
<< "FEM_EquationFlow"
|
||||
<< "FEM_EquationFluxsolver"
|
||||
<< "FEM_EquationElectricforce"
|
||||
<< "FEM_EquationHeat"
|
||||
<< "Separator"
|
||||
<< "FEM_SolverControl"
|
||||
<< "FEM_SolverRun";
|
||||
*solve
|
||||
<< "FEM_SolverCalculixCxxtools"
|
||||
<< "FEM_SolverCalculiX"
|
||||
<< "FEM_SolverElmer"
|
||||
<< "FEM_SolverZ88"
|
||||
<< "Separator"
|
||||
<< "FEM_EquationElasticity"
|
||||
<< "FEM_EquationElectrostatic"
|
||||
<< "FEM_EquationFlow"
|
||||
<< "FEM_EquationFluxsolver"
|
||||
<< "FEM_EquationElectricforce"
|
||||
<< "FEM_EquationHeat"
|
||||
<< "Separator"
|
||||
<< "FEM_SolverControl"
|
||||
<< "FEM_SolverRun";
|
||||
|
||||
Gui::MenuItem* results = new Gui::MenuItem;
|
||||
root->insertItem(item, results);
|
||||
results->setCommand("&Results");
|
||||
*results << "FEM_ResultsPurge"
|
||||
<< "FEM_ResultShow";
|
||||
*results
|
||||
<< "FEM_ResultsPurge"
|
||||
<< "FEM_ResultShow";
|
||||
#ifdef FC_USE_VTK
|
||||
*results << "Separator"
|
||||
<< "FEM_PostApplyChanges"
|
||||
<< "FEM_PostPipelineFromResult"
|
||||
<< "Separator"
|
||||
<< "FEM_PostFilterWarp"
|
||||
<< "FEM_PostFilterClipScalar"
|
||||
<< "FEM_PostFilterCutFunction"
|
||||
<< "FEM_PostFilterClipRegion"
|
||||
<< "FEM_PostFilterDataAlongLine"
|
||||
<< "FEM_PostFilterLinearizedStresses"
|
||||
<< "FEM_PostFilterDataAtPoint"
|
||||
<< "Separator"
|
||||
<< "FEM_PostCreateFunctions";
|
||||
*results
|
||||
<< "Separator"
|
||||
<< "FEM_PostApplyChanges"
|
||||
<< "FEM_PostPipelineFromResult"
|
||||
<< "Separator"
|
||||
<< "FEM_PostFilterWarp"
|
||||
<< "FEM_PostFilterClipScalar"
|
||||
<< "FEM_PostFilterCutFunction"
|
||||
<< "FEM_PostFilterClipRegion"
|
||||
<< "FEM_PostFilterDataAlongLine"
|
||||
<< "FEM_PostFilterLinearizedStresses"
|
||||
<< "FEM_PostFilterDataAtPoint"
|
||||
<< "Separator"
|
||||
<< "FEM_PostCreateFunctions";
|
||||
#endif
|
||||
|
||||
Gui::MenuItem* utils = new Gui::MenuItem;
|
||||
root->insertItem(item, utils);
|
||||
utils->setCommand("Utilities");
|
||||
*utils << "FEM_ClippingPlaneAdd"
|
||||
<< "FEM_ClippingPlaneRemoveAll";
|
||||
*utils
|
||||
<< "FEM_ClippingPlaneAdd"
|
||||
<< "FEM_ClippingPlaneRemoveAll";
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user