From 7bc69a8cbb3902bcf2ba7a80cc3e4a80b82772c8 Mon Sep 17 00:00:00 2001 From: Uwe Date: Fri, 25 Mar 2022 18:55:33 +0100 Subject: [PATCH] [skip CI] [FEM] some style changes by MSVC - to avoid annoying unnecessary diffs while working on the FEM module --- src/Mod/Fem/Gui/AbaqusHighlighter.cpp | 12 +- src/Mod/Fem/Gui/ActiveAnalysisObserver.cpp | 2 +- src/Mod/Fem/Gui/Command.cpp | 490 +++++++++--------- src/Mod/Fem/Gui/DlgSettingsFemElmerImp.cpp | 8 +- src/Mod/Fem/Gui/DlgSettingsFemGeneralImp.cpp | 8 +- src/Mod/Fem/Gui/DlgSettingsFemGmshImp.cpp | 8 +- src/Mod/Fem/Gui/DlgSettingsFemInOutVtkImp.cpp | 16 +- src/Mod/Fem/Gui/DlgSettingsFemMaterialImp.cpp | 8 +- src/Mod/Fem/Gui/DlgSettingsFemMystranImp.cpp | 8 +- src/Mod/Fem/Gui/DlgSettingsFemZ88Imp.cpp | 8 +- src/Mod/Fem/Gui/FemSelectionGate.cpp | 8 +- src/Mod/Fem/Gui/PropertyFemMeshItem.cpp | 4 +- src/Mod/Fem/Gui/TaskAnalysisInfo.cpp | 36 +- src/Mod/Fem/Gui/TaskCreateNodeSet.cpp | 71 +-- src/Mod/Fem/Gui/TaskDlgAnalysis.cpp | 5 +- src/Mod/Fem/Gui/TaskDlgCreateNodeSet.cpp | 15 +- src/Mod/Fem/Gui/TaskDlgMeshShapeNetgen.cpp | 17 +- src/Mod/Fem/Gui/TaskDriver.cpp | 19 +- 18 files changed, 363 insertions(+), 380 deletions(-) diff --git a/src/Mod/Fem/Gui/AbaqusHighlighter.cpp b/src/Mod/Fem/Gui/AbaqusHighlighter.cpp index 93fa63aed3..cbfb7e8eb8 100644 --- a/src/Mod/Fem/Gui/AbaqusHighlighter.cpp +++ b/src/Mod/Fem/Gui/AbaqusHighlighter.cpp @@ -44,7 +44,7 @@ AbaqusHighlighter::~AbaqusHighlighter() { } -void AbaqusHighlighter::highlightBlock(const QString &text) +void AbaqusHighlighter::highlightBlock(const QString& text) { // Find a syntax file for the Abaqus format here // http://notepad-plus.sourceforge.net/commun/userDefinedLang/userDefineLang_Abaqus.xml @@ -54,11 +54,11 @@ void AbaqusHighlighter::highlightBlock(const QString &text) int state = NormalState; int start = 0; - QColor keywordColor(102,0,227); // this->colorByType(SyntaxHighlighter::Keyword) - QColor defnameColor(0,119,255); // this->colorByType(SyntaxHighlighter::Defname) - QColor operateColor(153,0,102); // this->colorByType(SyntaxHighlighter::Operator) - QColor valueColor(0,0,0); // this->colorByType(SyntaxHighlighter::String) - QColor numberColor(0,127,127); // this->colorByType(SyntaxHighlighter::Number) + QColor keywordColor(102, 0, 227); // this->colorByType(SyntaxHighlighter::Keyword) + QColor defnameColor(0, 119, 255); // this->colorByType(SyntaxHighlighter::Defname) + QColor operateColor(153, 0, 102); // this->colorByType(SyntaxHighlighter::Operator) + QColor valueColor(0, 0, 0); // this->colorByType(SyntaxHighlighter::String) + QColor numberColor(0, 127, 127); // this->colorByType(SyntaxHighlighter::Number) QColor commentColor = this->colorByType(SyntaxHighlighter::Comment); for (int i = 0; i < text.length(); ++i) { diff --git a/src/Mod/Fem/Gui/ActiveAnalysisObserver.cpp b/src/Mod/Fem/Gui/ActiveAnalysisObserver.cpp index 2c018ed947..53434f40c5 100644 --- a/src/Mod/Fem/Gui/ActiveAnalysisObserver.cpp +++ b/src/Mod/Fem/Gui/ActiveAnalysisObserver.cpp @@ -55,7 +55,7 @@ void ActiveAnalysisObserver::setActiveObject(Fem::FemAnalysis* fem) activeObject = fem; App::Document* doc = fem->getDocument(); activeDocument = Gui::Application::Instance->getDocument(doc); - activeView = static_cast(activeDocument->getViewProvider(activeObject)); + activeView = static_cast(activeDocument->getViewProvider(activeObject)); attachDocument(doc); } else { diff --git a/src/Mod/Fem/Gui/Command.cpp b/src/Mod/Fem/Gui/Command.cpp index 3ec187b098..44ad6fe0a4 100644 --- a/src/Mod/Fem/Gui/Command.cpp +++ b/src/Mod/Fem/Gui/Command.cpp @@ -64,12 +64,12 @@ using namespace std; //================================================================================================ //================================================================================================ // helpers -bool getConstraintPrerequisits(Fem::FemAnalysis **Analysis) +bool getConstraintPrerequisits(Fem::FemAnalysis** Analysis) { Fem::FemAnalysis* ActiveAnalysis = FemGui::ActiveAnalysisObserver::instance()->getActiveObject(); - if (!ActiveAnalysis || !ActiveAnalysis->getTypeId().isDerivedFrom(Fem::FemAnalysis::getClassTypeId())){ + if (!ActiveAnalysis || !ActiveAnalysis->getTypeId().isDerivedFrom(Fem::FemAnalysis::getClassTypeId())) { QMessageBox::warning(Gui::getMainWindow(), QObject::tr("No active Analysis"), - QObject::tr("You need to create or activate a Analysis")); + QObject::tr("You need to create or activate a Analysis")); return true; } @@ -81,10 +81,10 @@ bool getConstraintPrerequisits(Fem::FemAnalysis **Analysis) } //OvG: Visibility automation show parts and hide meshes on activation of a constraint -std::string gethideMeshShowPartStr(std::string showConstr="") +std::string gethideMeshShowPartStr(std::string showConstr = "") { return "for amesh in App.activeDocument().Objects:\n\ - if \""+showConstr+"\" == amesh.Name:\n\ + if \"" + showConstr + "\" == amesh.Name:\n\ amesh.ViewObject.Visibility = True\n\ elif \"Mesh\" in amesh.TypeId:\n\ aparttoshow = amesh.Name.replace(\"_Mesh\",\"\")\n\ @@ -281,7 +281,7 @@ bool CmdFemCreateSolver::isActive(void) DEF_STD_CMD_A(CmdFemConstraintBearing) CmdFemConstraintBearing::CmdFemConstraintBearing() - : Command("FEM_ConstraintBearing") + : Command("FEM_ConstraintBearing") { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); @@ -294,22 +294,22 @@ CmdFemConstraintBearing::CmdFemConstraintBearing() void CmdFemConstraintBearing::activated(int) { - Fem::FemAnalysis *Analysis; + Fem::FemAnalysis* Analysis; - if(getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) return; std::string FeatName = getUniqueObjectName("ConstraintBearing"); openCommand(QT_TRANSLATE_NOOP("Command", "Make FEM constraint for bearing")); - doCommand(Doc,"App.activeDocument().addObject(\"Fem::ConstraintBearing\",\"%s\")",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.addObject(App.activeDocument().%s)",Analysis->getNameInDocument(),FeatName.c_str()); + doCommand(Doc, "App.activeDocument().addObject(\"Fem::ConstraintBearing\",\"%s\")", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.addObject(App.activeDocument().%s)", Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc,"%s",gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts updateActive(); - doCommand(Gui,"Gui.activeDocument().setEdit('%s')",FeatName.c_str()); + doCommand(Gui, "Gui.activeDocument().setEdit('%s')", FeatName.c_str()); } bool CmdFemConstraintBearing::isActive(void) @@ -322,7 +322,7 @@ bool CmdFemConstraintBearing::isActive(void) DEF_STD_CMD_A(CmdFemConstraintContact) CmdFemConstraintContact::CmdFemConstraintContact() - : Command("FEM_ConstraintContact") + : Command("FEM_ConstraintContact") { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); @@ -335,26 +335,26 @@ CmdFemConstraintContact::CmdFemConstraintContact() void CmdFemConstraintContact::activated(int) { - Fem::FemAnalysis *Analysis; + Fem::FemAnalysis* Analysis; - if(getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) return; std::string FeatName = getUniqueObjectName("ConstraintContact"); openCommand(QT_TRANSLATE_NOOP("Command", "Make FEM constraint contact on face")); - doCommand(Doc,"App.activeDocument().addObject(\"Fem::ConstraintContact\",\"%s\")",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Slope = 1000000.00",FeatName.c_str()); //OvG: set default not equal to 0 - doCommand(Doc,"App.activeDocument().%s.Friction = 0.0",FeatName.c_str()); //OvG: set default not equal to 0 - doCommand(Doc,"App.activeDocument().%s.Scale = 1",FeatName.c_str()); //OvG: set initial scale to 1 - doCommand(Doc,"App.activeDocument().%s.addObject(App.activeDocument().%s)", - Analysis->getNameInDocument(),FeatName.c_str()); + doCommand(Doc, "App.activeDocument().addObject(\"Fem::ConstraintContact\",\"%s\")", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.Slope = 1000000.00", FeatName.c_str()); //OvG: set default not equal to 0 + doCommand(Doc, "App.activeDocument().%s.Friction = 0.0", FeatName.c_str()); //OvG: set default not equal to 0 + doCommand(Doc, "App.activeDocument().%s.Scale = 1", FeatName.c_str()); //OvG: set initial scale to 1 + doCommand(Doc, "App.activeDocument().%s.addObject(App.activeDocument().%s)", + Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc,"%s",gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts updateActive(); - doCommand(Gui,"Gui.activeDocument().setEdit('%s')",FeatName.c_str()); + doCommand(Gui, "Gui.activeDocument().setEdit('%s')", FeatName.c_str()); } bool CmdFemConstraintContact::isActive(void) @@ -367,7 +367,7 @@ bool CmdFemConstraintContact::isActive(void) DEF_STD_CMD_A(CmdFemConstraintDisplacement) CmdFemConstraintDisplacement::CmdFemConstraintDisplacement() - : Command("FEM_ConstraintDisplacement") + : Command("FEM_ConstraintDisplacement") { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); @@ -380,24 +380,24 @@ CmdFemConstraintDisplacement::CmdFemConstraintDisplacement() void CmdFemConstraintDisplacement::activated(int) { - Fem::FemAnalysis *Analysis; + Fem::FemAnalysis* Analysis; - if(getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) return; std::string FeatName = getUniqueObjectName("ConstraintDisplacement"); openCommand(QT_TRANSLATE_NOOP("Command", "Make FEM constraint displacement on face")); - doCommand(Doc,"App.activeDocument().addObject(\"Fem::ConstraintDisplacement\",\"%s\")",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Scale = 1",FeatName.c_str()); //OvG: set initial scale to 1 - doCommand(Doc,"App.activeDocument().%s.addObject(App.activeDocument().%s)", - Analysis->getNameInDocument(),FeatName.c_str()); + doCommand(Doc, "App.activeDocument().addObject(\"Fem::ConstraintDisplacement\",\"%s\")", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.Scale = 1", FeatName.c_str()); //OvG: set initial scale to 1 + doCommand(Doc, "App.activeDocument().%s.addObject(App.activeDocument().%s)", + Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc,"%s",gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts updateActive(); - doCommand(Gui,"Gui.activeDocument().setEdit('%s')",FeatName.c_str()); + doCommand(Gui, "Gui.activeDocument().setEdit('%s')", FeatName.c_str()); } bool CmdFemConstraintDisplacement::isActive(void) @@ -410,7 +410,7 @@ bool CmdFemConstraintDisplacement::isActive(void) DEF_STD_CMD_A(CmdFemConstraintFixed) CmdFemConstraintFixed::CmdFemConstraintFixed() - : Command("FEM_ConstraintFixed") + : Command("FEM_ConstraintFixed") { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); @@ -423,23 +423,23 @@ CmdFemConstraintFixed::CmdFemConstraintFixed() void CmdFemConstraintFixed::activated(int) { - Fem::FemAnalysis *Analysis; + Fem::FemAnalysis* Analysis; - if(getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) return; std::string FeatName = getUniqueObjectName("ConstraintFixed"); openCommand(QT_TRANSLATE_NOOP("Command", "Make FEM constraint fixed geometry")); - doCommand(Doc,"App.activeDocument().addObject(\"Fem::ConstraintFixed\",\"%s\")",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Scale = 1",FeatName.c_str()); //OvG: set initial scale to 1 - doCommand(Doc,"App.activeDocument().%s.addObject(App.activeDocument().%s)",Analysis->getNameInDocument(),FeatName.c_str()); + doCommand(Doc, "App.activeDocument().addObject(\"Fem::ConstraintFixed\",\"%s\")", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.Scale = 1", FeatName.c_str()); //OvG: set initial scale to 1 + doCommand(Doc, "App.activeDocument().%s.addObject(App.activeDocument().%s)", Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc,"%s",gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts updateActive(); - doCommand(Gui,"Gui.activeDocument().setEdit('%s')",FeatName.c_str()); + doCommand(Gui, "Gui.activeDocument().setEdit('%s')", FeatName.c_str()); } bool CmdFemConstraintFixed::isActive(void) @@ -452,7 +452,7 @@ bool CmdFemConstraintFixed::isActive(void) DEF_STD_CMD_A(CmdFemConstraintFluidBoundary) CmdFemConstraintFluidBoundary::CmdFemConstraintFluidBoundary() - : Command("FEM_ConstraintFluidBoundary") + : Command("FEM_ConstraintFluidBoundary") { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); @@ -465,24 +465,24 @@ CmdFemConstraintFluidBoundary::CmdFemConstraintFluidBoundary() void CmdFemConstraintFluidBoundary::activated(int) { - Fem::FemAnalysis *Analysis; + Fem::FemAnalysis* Analysis; - if(getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) return; std::string FeatName = getUniqueObjectName("ConstraintFluidBoundary"); openCommand(QT_TRANSLATE_NOOP("Command", "Create fluid boundary condition")); - doCommand(Doc,"App.activeDocument().addObject(\"Fem::ConstraintFluidBoundary\",\"%s\")",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Scale = 1",FeatName.c_str()); //OvG: set initial scale to 1 + doCommand(Doc, "App.activeDocument().addObject(\"Fem::ConstraintFluidBoundary\",\"%s\")", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.Scale = 1", FeatName.c_str()); //OvG: set initial scale to 1 //BoundaryValue is already the default value, zero is acceptable - doCommand(Doc,"App.activeDocument().%s.addObject(App.activeDocument().%s)", - Analysis->getNameInDocument(),FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.addObject(App.activeDocument().%s)", + Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc,"%s",gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts updateActive(); - doCommand(Gui,"Gui.activeDocument().setEdit('%s')",FeatName.c_str()); + doCommand(Gui, "Gui.activeDocument().setEdit('%s')", FeatName.c_str()); } bool CmdFemConstraintFluidBoundary::isActive(void) @@ -495,7 +495,7 @@ bool CmdFemConstraintFluidBoundary::isActive(void) DEF_STD_CMD_A(CmdFemConstraintForce) CmdFemConstraintForce::CmdFemConstraintForce() - : Command("FEM_ConstraintForce") + : Command("FEM_ConstraintForce") { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); @@ -508,25 +508,25 @@ CmdFemConstraintForce::CmdFemConstraintForce() void CmdFemConstraintForce::activated(int) { - Fem::FemAnalysis *Analysis; + Fem::FemAnalysis* Analysis; - if(getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) return; std::string FeatName = getUniqueObjectName("ConstraintForce"); openCommand(QT_TRANSLATE_NOOP("Command", "Make FEM constraint force on geometry")); - doCommand(Doc,"App.activeDocument().addObject(\"Fem::ConstraintForce\",\"%s\")",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Force = 1.0",FeatName.c_str()); //OvG: set default not equal to 0 - doCommand(Doc,"App.activeDocument().%s.Reversed = False",FeatName.c_str()); //OvG: set default to False - doCommand(Doc,"App.activeDocument().%s.Scale = 1",FeatName.c_str()); //OvG: set initial scale to 1 - doCommand(Doc,"App.activeDocument().%s.addObject(App.activeDocument().%s)",Analysis->getNameInDocument(),FeatName.c_str()); + doCommand(Doc, "App.activeDocument().addObject(\"Fem::ConstraintForce\",\"%s\")", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.Force = 1.0", FeatName.c_str()); //OvG: set default not equal to 0 + doCommand(Doc, "App.activeDocument().%s.Reversed = False", FeatName.c_str()); //OvG: set default to False + doCommand(Doc, "App.activeDocument().%s.Scale = 1", FeatName.c_str()); //OvG: set initial scale to 1 + doCommand(Doc, "App.activeDocument().%s.addObject(App.activeDocument().%s)", Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc,"%s",gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts updateActive(); - doCommand(Gui,"Gui.activeDocument().setEdit('%s')",FeatName.c_str()); + doCommand(Gui, "Gui.activeDocument().setEdit('%s')", FeatName.c_str()); } bool CmdFemConstraintForce::isActive(void) @@ -539,7 +539,7 @@ bool CmdFemConstraintForce::isActive(void) DEF_STD_CMD_A(CmdFemConstraintGear) CmdFemConstraintGear::CmdFemConstraintGear() - : Command("FEM_ConstraintGear") + : Command("FEM_ConstraintGear") { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); @@ -552,22 +552,22 @@ CmdFemConstraintGear::CmdFemConstraintGear() void CmdFemConstraintGear::activated(int) { - Fem::FemAnalysis *Analysis; + Fem::FemAnalysis* Analysis; - if(getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) return; std::string FeatName = getUniqueObjectName("ConstraintGear"); openCommand(QT_TRANSLATE_NOOP("Command", "Make FEM constraint for gear")); - doCommand(Doc,"App.activeDocument().addObject(\"Fem::ConstraintGear\",\"%s\")",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Diameter = 100.0",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.addObject(App.activeDocument().%s)",Analysis->getNameInDocument(),FeatName.c_str()); + doCommand(Doc, "App.activeDocument().addObject(\"Fem::ConstraintGear\",\"%s\")", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.Diameter = 100.0", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.addObject(App.activeDocument().%s)", Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc,"%s",gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts updateActive(); - doCommand(Gui,"Gui.activeDocument().setEdit('%s')",FeatName.c_str()); + doCommand(Gui, "Gui.activeDocument().setEdit('%s')", FeatName.c_str()); } bool CmdFemConstraintGear::isActive(void) @@ -580,7 +580,7 @@ bool CmdFemConstraintGear::isActive(void) DEF_STD_CMD_A(CmdFemConstraintHeatflux) CmdFemConstraintHeatflux::CmdFemConstraintHeatflux() - : Command("FEM_ConstraintHeatflux") + : Command("FEM_ConstraintHeatflux") { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); @@ -593,26 +593,26 @@ CmdFemConstraintHeatflux::CmdFemConstraintHeatflux() void CmdFemConstraintHeatflux::activated(int) { - Fem::FemAnalysis *Analysis; + Fem::FemAnalysis* Analysis; - if(getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) return; std::string FeatName = getUniqueObjectName("ConstraintHeatflux"); openCommand(QT_TRANSLATE_NOOP("Command", "Make FEM constraint heatflux on face")); - doCommand(Doc,"App.activeDocument().addObject(\"Fem::ConstraintHeatflux\",\"%s\")",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.AmbientTemp = 300.0",FeatName.c_str()); //OvG: set default not equal to 0 - doCommand(Doc,"App.activeDocument().%s.FilmCoef = 10.0",FeatName.c_str()); //OvG: set default not equal to 0 - doCommand(Doc,"App.activeDocument().%s.Scale = 1",FeatName.c_str()); //OvG: set initial scale to 1 - doCommand(Doc,"App.activeDocument().%s.addObject(App.activeDocument().%s)", - Analysis->getNameInDocument(),FeatName.c_str()); + doCommand(Doc, "App.activeDocument().addObject(\"Fem::ConstraintHeatflux\",\"%s\")", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.AmbientTemp = 300.0", FeatName.c_str()); //OvG: set default not equal to 0 + doCommand(Doc, "App.activeDocument().%s.FilmCoef = 10.0", FeatName.c_str()); //OvG: set default not equal to 0 + doCommand(Doc, "App.activeDocument().%s.Scale = 1", FeatName.c_str()); //OvG: set initial scale to 1 + doCommand(Doc, "App.activeDocument().%s.addObject(App.activeDocument().%s)", + Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc,"%s",gethideMeshShowPartStr().c_str()); //OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr().c_str()); //OvG: Hide meshes and show parts updateActive(); - doCommand(Gui,"Gui.activeDocument().setEdit('%s')",FeatName.c_str()); + doCommand(Gui, "Gui.activeDocument().setEdit('%s')", FeatName.c_str()); } bool CmdFemConstraintHeatflux::isActive(void) @@ -625,7 +625,7 @@ bool CmdFemConstraintHeatflux::isActive(void) DEF_STD_CMD_A(CmdFemConstraintInitialTemperature) CmdFemConstraintInitialTemperature::CmdFemConstraintInitialTemperature() - : Command("FEM_ConstraintInitialTemperature") + : Command("FEM_ConstraintInitialTemperature") { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); @@ -638,24 +638,24 @@ CmdFemConstraintInitialTemperature::CmdFemConstraintInitialTemperature() void CmdFemConstraintInitialTemperature::activated(int) { - Fem::FemAnalysis *Analysis; + Fem::FemAnalysis* Analysis; - if(getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) return; std::string FeatName = getUniqueObjectName("ConstraintInitialTemperature"); openCommand(QT_TRANSLATE_NOOP("Command", "Make FEM constraint initial temperature on body")); - doCommand(Doc,"App.activeDocument().addObject(\"Fem::ConstraintInitialTemperature\",\"%s\")",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Scale = 1",FeatName.c_str()); //OvG: set initial scale to 1 - doCommand(Doc,"App.activeDocument().%s.addObject(App.activeDocument().%s)", - Analysis->getNameInDocument(),FeatName.c_str()); + doCommand(Doc, "App.activeDocument().addObject(\"Fem::ConstraintInitialTemperature\",\"%s\")", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.Scale = 1", FeatName.c_str()); //OvG: set initial scale to 1 + doCommand(Doc, "App.activeDocument().%s.addObject(App.activeDocument().%s)", + Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc,"%s",gethideMeshShowPartStr().c_str()); //OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr().c_str()); //OvG: Hide meshes and show parts updateActive(); - doCommand(Gui,"Gui.activeDocument().setEdit('%s')",FeatName.c_str()); + doCommand(Gui, "Gui.activeDocument().setEdit('%s')", FeatName.c_str()); } bool CmdFemConstraintInitialTemperature::isActive(void) @@ -668,7 +668,7 @@ bool CmdFemConstraintInitialTemperature::isActive(void) DEF_STD_CMD_A(CmdFemConstraintPlaneRotation) CmdFemConstraintPlaneRotation::CmdFemConstraintPlaneRotation() - : Command("FEM_ConstraintPlaneRotation") + : Command("FEM_ConstraintPlaneRotation") { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); @@ -681,23 +681,23 @@ CmdFemConstraintPlaneRotation::CmdFemConstraintPlaneRotation() void CmdFemConstraintPlaneRotation::activated(int) { - Fem::FemAnalysis *Analysis; + Fem::FemAnalysis* Analysis; - if(getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) return; std::string FeatName = getUniqueObjectName("ConstraintPlaneRotation"); openCommand(QT_TRANSLATE_NOOP("Command", "Make FEM constraint Plane Rotation face")); - doCommand(Doc,"App.activeDocument().addObject(\"Fem::ConstraintPlaneRotation\",\"%s\")",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Scale = 1",FeatName.c_str()); //OvG: set initial scale to 1 - doCommand(Doc,"App.activeDocument().%s.addObject(App.activeDocument().%s)",Analysis->getNameInDocument(),FeatName.c_str()); + doCommand(Doc, "App.activeDocument().addObject(\"Fem::ConstraintPlaneRotation\",\"%s\")", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.Scale = 1", FeatName.c_str()); //OvG: set initial scale to 1 + doCommand(Doc, "App.activeDocument().%s.addObject(App.activeDocument().%s)", Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc,"%s",gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts updateActive(); - doCommand(Gui,"Gui.activeDocument().setEdit('%s')",FeatName.c_str()); + doCommand(Gui, "Gui.activeDocument().setEdit('%s')", FeatName.c_str()); } bool CmdFemConstraintPlaneRotation::isActive(void) @@ -710,7 +710,7 @@ bool CmdFemConstraintPlaneRotation::isActive(void) DEF_STD_CMD_A(CmdFemConstraintPressure) CmdFemConstraintPressure::CmdFemConstraintPressure() - : Command("FEM_ConstraintPressure") + : Command("FEM_ConstraintPressure") { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); @@ -723,26 +723,26 @@ CmdFemConstraintPressure::CmdFemConstraintPressure() void CmdFemConstraintPressure::activated(int) { - Fem::FemAnalysis *Analysis; + Fem::FemAnalysis* Analysis; - if(getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) return; std::string FeatName = getUniqueObjectName("ConstraintPressure"); openCommand(QT_TRANSLATE_NOOP("Command", "Make FEM constraint pressure on face")); - doCommand(Doc,"App.activeDocument().addObject(\"Fem::ConstraintPressure\",\"%s\")",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Pressure = 1000.0",FeatName.c_str()); //OvG: set default not equal to 0 - doCommand(Doc,"App.activeDocument().%s.Reversed = False",FeatName.c_str()); //OvG: set default to False - doCommand(Doc,"App.activeDocument().%s.Scale = 1",FeatName.c_str()); //OvG: set initial scale to 1 - doCommand(Doc,"App.activeDocument().%s.addObject(App.activeDocument().%s)", - Analysis->getNameInDocument(),FeatName.c_str()); + doCommand(Doc, "App.activeDocument().addObject(\"Fem::ConstraintPressure\",\"%s\")", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.Pressure = 1000.0", FeatName.c_str()); //OvG: set default not equal to 0 + doCommand(Doc, "App.activeDocument().%s.Reversed = False", FeatName.c_str()); //OvG: set default to False + doCommand(Doc, "App.activeDocument().%s.Scale = 1", FeatName.c_str()); //OvG: set initial scale to 1 + doCommand(Doc, "App.activeDocument().%s.addObject(App.activeDocument().%s)", + Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc,"%s",gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts updateActive(); - doCommand(Gui,"Gui.activeDocument().setEdit('%s')",FeatName.c_str()); + doCommand(Gui, "Gui.activeDocument().setEdit('%s')", FeatName.c_str()); } bool CmdFemConstraintPressure::isActive(void) @@ -755,7 +755,7 @@ bool CmdFemConstraintPressure::isActive(void) DEF_STD_CMD_A(CmdFemConstraintSpring) CmdFemConstraintSpring::CmdFemConstraintSpring() - : Command("FEM_ConstraintSpring") + : Command("FEM_ConstraintSpring") { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); @@ -768,26 +768,26 @@ CmdFemConstraintSpring::CmdFemConstraintSpring() void CmdFemConstraintSpring::activated(int) { - Fem::FemAnalysis *Analysis; + Fem::FemAnalysis* Analysis; - if(getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) return; std::string FeatName = getUniqueObjectName("ConstraintSpring"); openCommand(QT_TRANSLATE_NOOP("Command", "Make FEM constraint spring on face")); - doCommand(Doc,"App.activeDocument().addObject(\"Fem::ConstraintSpring\",\"%s\")",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.normalStiffness = 1.0",FeatName.c_str()); //OvG: set default not equal to 0 - doCommand(Doc,"App.activeDocument().%s.tangentialStiffness = 0.0",FeatName.c_str()); //OvG: set default to False - doCommand(Doc,"App.activeDocument().%s.Scale = 1",FeatName.c_str()); //OvG: set initial scale to 1 - doCommand(Doc,"App.activeDocument().%s.addObject(App.activeDocument().%s)", - Analysis->getNameInDocument(),FeatName.c_str()); + doCommand(Doc, "App.activeDocument().addObject(\"Fem::ConstraintSpring\",\"%s\")", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.normalStiffness = 1.0", FeatName.c_str()); //OvG: set default not equal to 0 + doCommand(Doc, "App.activeDocument().%s.tangentialStiffness = 0.0", FeatName.c_str()); //OvG: set default to False + doCommand(Doc, "App.activeDocument().%s.Scale = 1", FeatName.c_str()); //OvG: set initial scale to 1 + doCommand(Doc, "App.activeDocument().%s.addObject(App.activeDocument().%s)", + Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc,"%s",gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts updateActive(); - doCommand(Gui,"Gui.activeDocument().setEdit('%s')",FeatName.c_str()); + doCommand(Gui, "Gui.activeDocument().setEdit('%s')", FeatName.c_str()); } bool CmdFemConstraintSpring::isActive(void) @@ -800,7 +800,7 @@ bool CmdFemConstraintSpring::isActive(void) DEF_STD_CMD_A(CmdFemConstraintPulley) CmdFemConstraintPulley::CmdFemConstraintPulley() - : Command("FEM_ConstraintPulley") + : Command("FEM_ConstraintPulley") { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); @@ -813,27 +813,27 @@ CmdFemConstraintPulley::CmdFemConstraintPulley() void CmdFemConstraintPulley::activated(int) { - Fem::FemAnalysis *Analysis; + Fem::FemAnalysis* Analysis; - if(getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) return; std::string FeatName = getUniqueObjectName("ConstraintPulley"); openCommand(QT_TRANSLATE_NOOP("Command", "Make FEM constraint for pulley")); - doCommand(Doc,"App.activeDocument().addObject(\"Fem::ConstraintPulley\",\"%s\")",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Diameter = 300.0",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.OtherDiameter = 100.0",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.CenterDistance = 500.0",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Force = 100.0",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.TensionForce = 100.0",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.addObject(App.activeDocument().%s)",Analysis->getNameInDocument(),FeatName.c_str()); + doCommand(Doc, "App.activeDocument().addObject(\"Fem::ConstraintPulley\",\"%s\")", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.Diameter = 300.0", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.OtherDiameter = 100.0", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.CenterDistance = 500.0", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.Force = 100.0", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.TensionForce = 100.0", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.addObject(App.activeDocument().%s)", Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc,"%s",gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts updateActive(); - doCommand(Gui,"Gui.activeDocument().setEdit('%s')",FeatName.c_str()); + doCommand(Gui, "Gui.activeDocument().setEdit('%s')", FeatName.c_str()); } bool CmdFemConstraintPulley::isActive(void) @@ -846,7 +846,7 @@ bool CmdFemConstraintPulley::isActive(void) DEF_STD_CMD_A(CmdFemConstraintTemperature) CmdFemConstraintTemperature::CmdFemConstraintTemperature() - : Command("FEM_ConstraintTemperature") + : Command("FEM_ConstraintTemperature") { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); @@ -859,24 +859,24 @@ CmdFemConstraintTemperature::CmdFemConstraintTemperature() void CmdFemConstraintTemperature::activated(int) { - Fem::FemAnalysis *Analysis; + Fem::FemAnalysis* Analysis; - if(getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) return; std::string FeatName = getUniqueObjectName("ConstraintTemperature"); openCommand(QT_TRANSLATE_NOOP("Command", "Make FEM constraint temperature on face")); - doCommand(Doc,"App.activeDocument().addObject(\"Fem::ConstraintTemperature\",\"%s\")",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Scale = 1",FeatName.c_str()); //OvG: set initial scale to 1 - doCommand(Doc,"App.activeDocument().%s.addObject(App.activeDocument().%s)", - Analysis->getNameInDocument(),FeatName.c_str()); + doCommand(Doc, "App.activeDocument().addObject(\"Fem::ConstraintTemperature\",\"%s\")", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.Scale = 1", FeatName.c_str()); //OvG: set initial scale to 1 + doCommand(Doc, "App.activeDocument().%s.addObject(App.activeDocument().%s)", + Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc,"%s",gethideMeshShowPartStr().c_str()); //OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr().c_str()); //OvG: Hide meshes and show parts updateActive(); - doCommand(Gui,"Gui.activeDocument().setEdit('%s')",FeatName.c_str()); + doCommand(Gui, "Gui.activeDocument().setEdit('%s')", FeatName.c_str()); } bool CmdFemConstraintTemperature::isActive(void) @@ -889,7 +889,7 @@ bool CmdFemConstraintTemperature::isActive(void) DEF_STD_CMD_A(CmdFemConstraintTransform) CmdFemConstraintTransform::CmdFemConstraintTransform() - : Command("FEM_ConstraintTransform") + : Command("FEM_ConstraintTransform") { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); @@ -902,27 +902,27 @@ CmdFemConstraintTransform::CmdFemConstraintTransform() void CmdFemConstraintTransform::activated(int) { - Fem::FemAnalysis *Analysis; + Fem::FemAnalysis* Analysis; - if(getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) return; std::string FeatName = getUniqueObjectName("ConstraintTransform"); openCommand(QT_TRANSLATE_NOOP("Command", "Make FEM constraint transform on face")); - doCommand(Doc,"App.activeDocument().addObject(\"Fem::ConstraintTransform\",\"%s\")",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.X_rot = 0.0",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Y_rot = 0.0",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Z_rot = 0.0",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Scale = 1",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.addObject(App.activeDocument().%s)", - Analysis->getNameInDocument(),FeatName.c_str()); + doCommand(Doc, "App.activeDocument().addObject(\"Fem::ConstraintTransform\",\"%s\")", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.X_rot = 0.0", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.Y_rot = 0.0", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.Z_rot = 0.0", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.Scale = 1", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.addObject(App.activeDocument().%s)", + Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc,"%s",gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str()); //OvG: Hide meshes and show parts updateActive(); - doCommand(Gui,"Gui.activeDocument().setEdit('%s')",FeatName.c_str()); + doCommand(Gui, "Gui.activeDocument().setEdit('%s')", FeatName.c_str()); } bool CmdFemConstraintTransform::isActive(void) @@ -938,20 +938,20 @@ bool CmdFemConstraintTransform::isActive(void) //================================================================================================ DEF_STD_CMD_A(CmdFemDefineNodesSet) -void DefineNodesCallback(void * ud, SoEventCallback * n) +void DefineNodesCallback(void* ud, SoEventCallback* n) { - Fem::FemAnalysis *Analysis; + Fem::FemAnalysis* Analysis; - if(getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) return; // show the wait cursor because this could take quite some time Gui::WaitCursor wc; // When this callback function is invoked we must in either case leave the edit mode - Gui::View3DInventorViewer* view = reinterpret_cast(n->getUserData()); + Gui::View3DInventorViewer* view = reinterpret_cast(n->getUserData()); view->setEditing(false); - view->removeEventCallback(SoMouseButtonEvent::getClassTypeId(), DefineNodesCallback,ud); + view->removeEventCallback(SoMouseButtonEvent::getClassTypeId(), DefineNodesCallback, ud); n->setHandled(); Gui::SelectionRole role; @@ -966,11 +966,11 @@ void DefineNodesCallback(void * ud, SoEventCallback * n) Gui::ViewVolumeProjection proj(vv); Base::Polygon2d polygon; for (std::vector::const_iterator it = clPoly.begin(); it != clPoly.end(); ++it) - polygon.Add(Base::Vector2d((*it)[0],(*it)[1])); + polygon.Add(Base::Vector2d((*it)[0], (*it)[1])); std::vector docObj = Gui::Selection().getObjectsOfType(Fem::FemMeshObject::getClassTypeId()); - if(docObj.size() !=1) + if (docObj.size() != 1) return; const SMESHDS_Mesh* data = const_cast(static_cast(docObj[0])->FemMesh.getValue().getSMesh())->GetMeshDS(); @@ -981,7 +981,7 @@ void DefineNodesCallback(void * ud, SoEventCallback * n) while (aNodeIter->more()) { const SMDS_MeshNode* aNode = aNodeIter->next(); - Base::Vector3f vec(aNode->X(),aNode->Y(),aNode->Z()); + Base::Vector3f vec(aNode->X(), aNode->Y(), aNode->Z()); pt2d = proj(vec); if (polygon.Contains(Base::Vector2d(pt2d.x, pt2d.y)) == true) IntSet.insert(aNode->GetID()); @@ -990,18 +990,18 @@ void DefineNodesCallback(void * ud, SoEventCallback * n) std::stringstream set; set << "["; - for(std::set::const_iterator it=IntSet.begin();it!=IntSet.end();++it) - if(it==IntSet.begin()) - set << *it ; + for (std::set::const_iterator it = IntSet.begin(); it != IntSet.end(); ++it) + if (it == IntSet.begin()) + set << *it; else - set << "," << *it ; + set << "," << *it; set << "]"; Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Place robot")); - Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.addObject('Fem::FemSetNodesObject','NodeSet')"); - Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.ActiveObject.Nodes = %s",set.str().c_str()); - Gui::Command::doCommand(Gui::Command::Doc,"App.activeDocument().%s.addObject(App.activeDocument().NodeSet)",Analysis->getNameInDocument()); + Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.addObject('Fem::FemSetNodesObject','NodeSet')"); + Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.ActiveObject.Nodes = %s", set.str().c_str()); + Gui::Command::doCommand(Gui::Command::Doc, "App.activeDocument().%s.addObject(App.activeDocument().NodeSet)", Analysis->getNameInDocument()); // Gui::Command::updateActive(); Gui::Command::commitCommand(); @@ -1025,7 +1025,7 @@ void DefineNodesCallback(void * ud, SoEventCallback * n) CmdFemDefineNodesSet::CmdFemDefineNodesSet() - : Command("FEM_DefineNodesSet") + : Command("FEM_DefineNodesSet") { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); @@ -1081,7 +1081,7 @@ bool CmdFemDefineNodesSet::isActive(void) DEF_STD_CMD_A(CmdFemCreateNodesSet) CmdFemCreateNodesSet::CmdFemCreateNodesSet() - : Command("FEM_CreateNodesSet") + : Command("FEM_CreateNodesSet") { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); @@ -1098,19 +1098,19 @@ void CmdFemCreateNodesSet::activated(int) Gui::SelectionFilter FemMeshFilter("SELECT Fem::FemMeshObject COUNT 1"); if (ObjectFilter.match()) { - Fem::FemSetNodesObject *NodesObj = static_cast(ObjectFilter.Result[0][0].getObject()); + Fem::FemSetNodesObject* NodesObj = static_cast(ObjectFilter.Result[0][0].getObject()); openCommand(QT_TRANSLATE_NOOP("Command", "Edit nodes set")); - doCommand(Gui,"Gui.activeDocument().setEdit('%s')",NodesObj->getNameInDocument()); + doCommand(Gui, "Gui.activeDocument().setEdit('%s')", NodesObj->getNameInDocument()); } else if (FemMeshFilter.match()) { - Fem::FemMeshObject *MeshObj = static_cast(FemMeshFilter.Result[0][0].getObject()); + Fem::FemMeshObject* MeshObj = static_cast(FemMeshFilter.Result[0][0].getObject()); std::string FeatName = getUniqueObjectName("NodesSet"); openCommand(QT_TRANSLATE_NOOP("Command", "Create nodes set")); - doCommand(Doc,"App.activeDocument().addObject('Fem::FemSetNodesObject','%s')",FeatName.c_str()); - doCommand(Gui,"App.activeDocument().%s.FemMesh = App.activeDocument().%s",FeatName.c_str(),MeshObj->getNameInDocument()); - doCommand(Gui,"Gui.activeDocument().setEdit('%s')",FeatName.c_str()); + doCommand(Doc, "App.activeDocument().addObject('Fem::FemSetNodesObject','%s')", FeatName.c_str()); + doCommand(Gui, "App.activeDocument().%s.FemMesh = App.activeDocument().%s", FeatName.c_str(), MeshObj->getNameInDocument()); + doCommand(Gui, "Gui.activeDocument().setEdit('%s')", FeatName.c_str()); } else { QMessageBox::warning(Gui::getMainWindow(), @@ -1163,21 +1163,21 @@ void setupFilter(Gui::Command* cmd, std::string Name) { std::string FeatName = cmd->getUniqueObjectName(Name.c_str()); cmd->openCommand(QT_TRANSLATE_NOOP("Command", "Create filter")); - cmd->doCommand(Gui::Command::Doc,"App.activeDocument().addObject('Fem::FemPost%sFilter','%s')", Name.c_str(), FeatName.c_str()); - cmd->doCommand(Gui::Command::Doc,"__list__ = App.ActiveDocument.%s.Filter", pipeline->getNameInDocument()); - cmd->doCommand(Gui::Command::Doc,"__list__.append(App.ActiveDocument.%s)", FeatName.c_str()); - cmd->doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.Filter = __list__", pipeline->getNameInDocument()); - cmd->doCommand(Gui::Command::Doc,"del __list__"); + cmd->doCommand(Gui::Command::Doc, "App.activeDocument().addObject('Fem::FemPost%sFilter','%s')", Name.c_str(), FeatName.c_str()); + cmd->doCommand(Gui::Command::Doc, "__list__ = App.ActiveDocument.%s.Filter", pipeline->getNameInDocument()); + cmd->doCommand(Gui::Command::Doc, "__list__.append(App.ActiveDocument.%s)", FeatName.c_str()); + cmd->doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.Filter = __list__", pipeline->getNameInDocument()); + cmd->doCommand(Gui::Command::Doc, "del __list__"); cmd->updateActive(); - cmd->doCommand(Gui::Command::Gui,"Gui.activeDocument().setEdit('%s')",FeatName.c_str()); + cmd->doCommand(Gui::Command::Gui, "Gui.activeDocument().setEdit('%s')", FeatName.c_str()); } } std::string Plot() { -return "t=t_coords[len(t_coords)-1]\n\ + return "t=t_coords[len(t_coords)-1]\n\ for i in range(len(t_coords)):\n\ dum = t_coords[i]\n\ t_coords[i] = dum - t_coords[len(t_coords)-1]*0.5\n\ @@ -1237,7 +1237,7 @@ plt.show()\n"; DEF_STD_CMD_A(CmdFemPostClipFilter) CmdFemPostClipFilter::CmdFemPostClipFilter() - : Command("FEM_PostFilterClipRegion") + : Command("FEM_PostFilterClipRegion") { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); @@ -1263,7 +1263,7 @@ bool CmdFemPostClipFilter::isActive(void) DEF_STD_CMD_A(CmdFemPostCutFilter) CmdFemPostCutFilter::CmdFemPostCutFilter() - : Command("FEM_PostFilterCutFunction") + : Command("FEM_PostFilterCutFunction") { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); @@ -1289,7 +1289,7 @@ bool CmdFemPostCutFilter::isActive(void) DEF_STD_CMD_A(CmdFemPostDataAlongLineFilter) CmdFemPostDataAlongLineFilter::CmdFemPostDataAlongLineFilter() - : Command("FEM_PostFilterDataAlongLine") + : Command("FEM_PostFilterDataAlongLine") { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); @@ -1315,7 +1315,7 @@ bool CmdFemPostDataAlongLineFilter::isActive(void) DEF_STD_CMD_A(CmdFemPostDataAtPointFilter) CmdFemPostDataAtPointFilter::CmdFemPostDataAtPointFilter() - : Command("FEM_PostFilterDataAtPoint") + : Command("FEM_PostFilterDataAtPoint") { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); @@ -1329,7 +1329,7 @@ CmdFemPostDataAtPointFilter::CmdFemPostDataAtPointFilter() void CmdFemPostDataAtPointFilter::activated(int) { - setupFilter(this, "DataAtPoint"); + setupFilter(this, "DataAtPoint"); } @@ -1343,7 +1343,7 @@ bool CmdFemPostDataAtPointFilter::isActive(void) DEF_STD_CMD_A(CmdFemPostLinearizedStressesFilter) CmdFemPostLinearizedStressesFilter::CmdFemPostLinearizedStressesFilter() - : Command("FEM_PostFilterLinearizedStresses") + : Command("FEM_PostFilterLinearizedStresses") { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); @@ -1362,26 +1362,26 @@ void CmdFemPostLinearizedStressesFilter::activated(int) if (DataAlongLineFilter.match()) { Fem::FemPostDataAlongLineFilter* DataAlongLine = static_cast(DataAlongLineFilter.Result[0][0].getObject()); std::string FieldName = DataAlongLine->PlotData.getValue(); - if ( - (FieldName == "Tresca Stress") - || (FieldName == "von Mises Stress") - || (FieldName == "Major Principal Stress") - || (FieldName == "Intermediate Principal Stress") - || (FieldName == "Minor Principal Stress") - // names need to match with names in FemVTKTools.cpp, this is not failsafe, but ATM there is no better way for test on a stress result in vtk pipeline - ){ - // TODO FIXME only works if the data along the line object has the name DataAlongLine - // we should get the selected data along the line object - doCommand(Gui::Command::Doc,"t_coords = App.ActiveDocument.DataAlongLine.XAxisData"); - doCommand(Gui::Command::Doc,"sValues = App.ActiveDocument.DataAlongLine.YAxisData"); - doCommand(Gui::Command::Doc, Plot().c_str()); - } - else { - QMessageBox::warning(Gui::getMainWindow(), - qApp->translate("CmdFemPostLinearizedStressesFilter", "Wrong selection"), - qApp->translate("CmdFemPostLinearizedStressesFilter", "Select a Clip filter which clips a STRESS field along a line, please.")); + if ( + (FieldName == "Tresca Stress") + || (FieldName == "von Mises Stress") + || (FieldName == "Major Principal Stress") + || (FieldName == "Intermediate Principal Stress") + || (FieldName == "Minor Principal Stress") + // names need to match with names in FemVTKTools.cpp, this is not failsafe, but ATM there is no better way for test on a stress result in vtk pipeline + ) { + // TODO FIXME only works if the data along the line object has the name DataAlongLine + // we should get the selected data along the line object + doCommand(Gui::Command::Doc, "t_coords = App.ActiveDocument.DataAlongLine.XAxisData"); + doCommand(Gui::Command::Doc, "sValues = App.ActiveDocument.DataAlongLine.YAxisData"); + doCommand(Gui::Command::Doc, Plot().c_str()); } -} + else { + QMessageBox::warning(Gui::getMainWindow(), + qApp->translate("CmdFemPostLinearizedStressesFilter", "Wrong selection"), + qApp->translate("CmdFemPostLinearizedStressesFilter", "Select a Clip filter which clips a STRESS field along a line, please.")); + } + } else { QMessageBox::warning(Gui::getMainWindow(), qApp->translate("CmdFemPostLinearizedStressesFilter", "Wrong selection"), @@ -1400,7 +1400,7 @@ bool CmdFemPostLinearizedStressesFilter::isActive(void) DEF_STD_CMD_A(CmdFemPostScalarClipFilter) CmdFemPostScalarClipFilter::CmdFemPostScalarClipFilter() - : Command("FEM_PostFilterClipScalar") + : Command("FEM_PostFilterClipScalar") { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); @@ -1426,7 +1426,7 @@ bool CmdFemPostScalarClipFilter::isActive(void) DEF_STD_CMD_A(CmdFemPostWarpVectorFilter) CmdFemPostWarpVectorFilter::CmdFemPostWarpVectorFilter() - : Command("FEM_PostFilterWarp") + : Command("FEM_PostFilterWarp") { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); @@ -1452,7 +1452,7 @@ bool CmdFemPostWarpVectorFilter::isActive(void) DEF_STD_CMD_ACL(CmdFemPostFunctions) CmdFemPostFunctions::CmdFemPostFunctions() - : Command("FEM_PostCreateFunctions") + : Command("FEM_PostCreateFunctions") { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); @@ -1467,9 +1467,9 @@ void CmdFemPostFunctions::activated(int iMsg) { std::string name; - if (iMsg==0) + if (iMsg == 0) name = "Plane"; - else if (iMsg==1) + else if (iMsg == 1) name = "Sphere"; else return; @@ -1477,16 +1477,16 @@ void CmdFemPostFunctions::activated(int iMsg) //create the object std::vector pipelines = App::GetApplication().getActiveDocument()->getObjectsOfType(); if (!pipelines.empty()) { - Fem::FemPostPipeline *pipeline = pipelines.front(); + Fem::FemPostPipeline* pipeline = pipelines.front(); openCommand(QT_TRANSLATE_NOOP("Command", "Create function")); //check if the pipeline has a filter provider and add one if needed Fem::FemPostFunctionProvider* provider; - if(!pipeline->Functions.getValue() || pipeline->Functions.getValue()->getTypeId() != Fem::FemPostFunctionProvider::getClassTypeId()) { + if (!pipeline->Functions.getValue() || pipeline->Functions.getValue()->getTypeId() != Fem::FemPostFunctionProvider::getClassTypeId()) { std::string FuncName = getUniqueObjectName("Functions"); - doCommand(Doc,"App.ActiveDocument.addObject('Fem::FemPostFunctionProvider','%s')", FuncName.c_str()); - doCommand(Doc,"App.ActiveDocument.%s.Functions = App.ActiveDocument.%s", pipeline->getNameInDocument(), FuncName.c_str()); + doCommand(Doc, "App.ActiveDocument.addObject('Fem::FemPostFunctionProvider','%s')", FuncName.c_str()); + doCommand(Doc, "App.ActiveDocument.%s.Functions = App.ActiveDocument.%s", pipeline->getNameInDocument(), FuncName.c_str()); provider = static_cast(getDocument()->getObject(FuncName.c_str())); } else @@ -1494,11 +1494,11 @@ void CmdFemPostFunctions::activated(int iMsg) //build the object std::string FeatName = getUniqueObjectName(name.c_str()); - doCommand(Doc,"App.activeDocument().addObject('Fem::FemPost%sFunction','%s')", name.c_str(), FeatName.c_str()); - doCommand(Doc,"__list__ = App.ActiveDocument.%s.Functions", provider->getNameInDocument()); - doCommand(Doc,"__list__.append(App.ActiveDocument.%s)", FeatName.c_str()); - doCommand(Doc,"App.ActiveDocument.%s.Functions = __list__", provider->getNameInDocument()); - doCommand(Doc,"del __list__"); + doCommand(Doc, "App.activeDocument().addObject('Fem::FemPost%sFunction','%s')", name.c_str(), FeatName.c_str()); + doCommand(Doc, "__list__ = App.ActiveDocument.%s.Functions", provider->getNameInDocument()); + doCommand(Doc, "__list__.append(App.ActiveDocument.%s)", FeatName.c_str()); + doCommand(Doc, "App.ActiveDocument.%s.Functions = __list__", provider->getNameInDocument()); + doCommand(Doc, "del __list__"); //set the default values, for this get the bounding box vtkBoundingBox box = pipeline->getBoundingBox(); @@ -1506,20 +1506,20 @@ void CmdFemPostFunctions::activated(int iMsg) double center[3]; box.GetCenter(center); - if (iMsg==0) - doCommand(Doc,"App.ActiveDocument.%s.Origin = App.Vector(%f, %f, %f)", FeatName.c_str(), center[0], - center[1], center[2]); - else if (iMsg==1) { - doCommand(Doc,"App.ActiveDocument.%s.Center = App.Vector(%f, %f, %f)", FeatName.c_str(), center[0], - center[1] + box.GetLength(1)/2, center[2] + box.GetLength(2)/2); - doCommand(Doc,"App.ActiveDocument.%s.Radius = %f", FeatName.c_str(), box.GetDiagonalLength()/2); + if (iMsg == 0) + doCommand(Doc, "App.ActiveDocument.%s.Origin = App.Vector(%f, %f, %f)", FeatName.c_str(), center[0], + center[1], center[2]); + else if (iMsg == 1) { + doCommand(Doc, "App.ActiveDocument.%s.Center = App.Vector(%f, %f, %f)", FeatName.c_str(), center[0], + center[1] + box.GetLength(1) / 2, center[2] + box.GetLength(2) / 2); + doCommand(Doc, "App.ActiveDocument.%s.Radius = %f", FeatName.c_str(), box.GetDiagonalLength() / 2); } this->updateActive(); //most of the times functions are added inside of a filter, make sure this still works - if(Gui::Application::Instance->activeDocument()->getInEdit() == nullptr) - doCommand(Gui,"Gui.activeDocument().setEdit('%s')",FeatName.c_str()); + if (Gui::Application::Instance->activeDocument()->getInEdit() == nullptr) + doCommand(Gui, "Gui.activeDocument().setEdit('%s')", FeatName.c_str()); } else { QMessageBox::warning(Gui::getMainWindow(), @@ -1536,7 +1536,7 @@ void CmdFemPostFunctions::activated(int iMsg) pcAction->setIcon(a[iMsg]->icon()); } -Gui::Action * CmdFemPostFunctions::createAction(void) +Gui::Action* CmdFemPostFunctions::createAction(void) { Gui::ActionGroup* pcAction = new Gui::ActionGroup(this, Gui::getMainWindow()); pcAction->setDropDownMenu(true); @@ -1568,13 +1568,13 @@ void CmdFemPostFunctions::languageChange() QList a = pcAction->actions(); QAction* cmd = a[0]; - cmd->setText(QApplication::translate("CmdFemPostFunctions","Plane")); - cmd->setToolTip(QApplication::translate("FEM_PostCreateFunctions","Create a plane function, defined by its origin and normal")); + cmd->setText(QApplication::translate("CmdFemPostFunctions", "Plane")); + cmd->setToolTip(QApplication::translate("FEM_PostCreateFunctions", "Create a plane function, defined by its origin and normal")); cmd->setStatusTip(cmd->toolTip()); cmd = a[1]; - cmd->setText(QApplication::translate("CmdFemPostFunctions","Sphere")); - cmd->setToolTip(QApplication::translate("FEM_PostCreateFunctions","Create a sphere function, defined by its center and radius")); + cmd->setText(QApplication::translate("CmdFemPostFunctions", "Sphere")); + cmd->setToolTip(QApplication::translate("FEM_PostCreateFunctions", "Create a sphere function, defined by its center and radius")); cmd->setStatusTip(cmd->toolTip()); } @@ -1592,7 +1592,7 @@ bool CmdFemPostFunctions::isActive(void) DEF_STD_CMD_AC(CmdFemPostApllyChanges) CmdFemPostApllyChanges::CmdFemPostApllyChanges() - : Command("FEM_PostApplyChanges") + : Command("FEM_PostApplyChanges") { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); @@ -1622,9 +1622,9 @@ bool CmdFemPostApllyChanges::isActive(void) return false; } -Gui::Action * CmdFemPostApllyChanges::createAction(void) +Gui::Action* CmdFemPostApllyChanges::createAction(void) { - Gui::Action *pcAction = Command::createAction(); + Gui::Action* pcAction = Command::createAction(); pcAction->setCheckable(true); ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Fem"); pcAction->setChecked(hGrp->GetBool("PostAutoRecompute", false)); @@ -1637,7 +1637,7 @@ Gui::Action * CmdFemPostApllyChanges::createAction(void) DEF_STD_CMD_A(CmdFemPostPipelineFromResult) CmdFemPostPipelineFromResult::CmdFemPostPipelineFromResult() - : Command("FEM_PostPipelineFromResult") + : Command("FEM_PostPipelineFromResult") { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); @@ -1664,20 +1664,20 @@ void CmdFemPostPipelineFromResult::activated(int) Gui::Document* doc = Gui::Application::Instance->activeDocument(); App::Document* app = doc->getDocument(); const std::vector obj = app->getObjectsOfType - (App::DocumentObject::getClassTypeId()); + (App::DocumentObject::getClassTypeId()); - for (std::vector::const_iterator it=obj.begin();it!=obj.end();++it) { - doCommand(Gui,"Gui.getDocument(\"%s\").getObject(\"%s\").Visibility=False" - , app->getName(), (*it)->getNameInDocument()); + for (std::vector::const_iterator it = obj.begin(); it != obj.end(); ++it) { + doCommand(Gui, "Gui.getDocument(\"%s\").getObject(\"%s\").Visibility=False" + , app->getName(), (*it)->getNameInDocument()); } std::vector results = getSelection().getObjectsOfType(); if (results.size() == 1) { std::string FeatName = getUniqueObjectName("ResultPipeline"); openCommand(QT_TRANSLATE_NOOP("Command", "Create pipeline from result")); - doCommand(Doc,"App.activeDocument().addObject('Fem::FemPostPipeline','%s')",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().ActiveObject.load(" - "App.activeDocument().getObject(\"%s\"))", results[0]->getNameInDocument()); + doCommand(Doc, "App.activeDocument().addObject('Fem::FemPostPipeline','%s')", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().ActiveObject.load(" + "App.activeDocument().getObject(\"%s\"))", results[0]->getNameInDocument()); commitCommand(); this->updateActive(); @@ -1702,7 +1702,7 @@ bool CmdFemPostPipelineFromResult::isActive(void) //================================================================================================ void CreateFemCommands(void) { - Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager(); + Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager(); // part, analysis, solver //rcCmdMgr.addCommand(new CmdFemAddPart()); // not implemented as GUI menu or click icon diff --git a/src/Mod/Fem/Gui/DlgSettingsFemElmerImp.cpp b/src/Mod/Fem/Gui/DlgSettingsFemElmerImp.cpp index 4318902347..be2e8602d9 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemElmerImp.cpp +++ b/src/Mod/Fem/Gui/DlgSettingsFemElmerImp.cpp @@ -30,9 +30,9 @@ using namespace FemGui; -DlgSettingsFemElmerImp::DlgSettingsFemElmerImp( QWidget* parent ) - : PreferencePage( parent ) - , ui(new Ui_DlgSettingsFemElmerImp) +DlgSettingsFemElmerImp::DlgSettingsFemElmerImp(QWidget* parent) + : PreferencePage(parent) + , ui(new Ui_DlgSettingsFemElmerImp) { ui->setupUi(this); } @@ -63,7 +63,7 @@ void DlgSettingsFemElmerImp::loadSettings() /** * Sets the strings of the subwidgets using the current language. */ -void DlgSettingsFemElmerImp::changeEvent(QEvent *e) +void DlgSettingsFemElmerImp::changeEvent(QEvent* e) { if (e->type() == QEvent::LanguageChange) { ui->retranslateUi(this); diff --git a/src/Mod/Fem/Gui/DlgSettingsFemGeneralImp.cpp b/src/Mod/Fem/Gui/DlgSettingsFemGeneralImp.cpp index 2558e74944..960e33dae7 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemGeneralImp.cpp +++ b/src/Mod/Fem/Gui/DlgSettingsFemGeneralImp.cpp @@ -30,9 +30,9 @@ using namespace FemGui; -DlgSettingsFemGeneralImp::DlgSettingsFemGeneralImp( QWidget* parent ) - : PreferencePage( parent ) - , ui(new Ui_DlgSettingsFemGeneralImp) +DlgSettingsFemGeneralImp::DlgSettingsFemGeneralImp(QWidget* parent) + : PreferencePage(parent) + , ui(new Ui_DlgSettingsFemGeneralImp) { ui->setupUi(this); } @@ -75,7 +75,7 @@ void DlgSettingsFemGeneralImp::loadSettings() /** * Sets the strings of the subwidgets using the current language. */ -void DlgSettingsFemGeneralImp::changeEvent(QEvent *e) +void DlgSettingsFemGeneralImp::changeEvent(QEvent* e) { if (e->type() == QEvent::LanguageChange) { ui->retranslateUi(this); diff --git a/src/Mod/Fem/Gui/DlgSettingsFemGmshImp.cpp b/src/Mod/Fem/Gui/DlgSettingsFemGmshImp.cpp index d0e01a7375..986df854d6 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemGmshImp.cpp +++ b/src/Mod/Fem/Gui/DlgSettingsFemGmshImp.cpp @@ -30,9 +30,9 @@ using namespace FemGui; -DlgSettingsFemGmshImp::DlgSettingsFemGmshImp( QWidget* parent ) - : PreferencePage( parent ) - , ui(new Ui_DlgSettingsFemGmshImp) +DlgSettingsFemGmshImp::DlgSettingsFemGmshImp(QWidget* parent) + : PreferencePage(parent) + , ui(new Ui_DlgSettingsFemGmshImp) { ui->setupUi(this); } @@ -57,7 +57,7 @@ void DlgSettingsFemGmshImp::loadSettings() /** * Sets the strings of the subwidgets using the current language. */ -void DlgSettingsFemGmshImp::changeEvent(QEvent *e) +void DlgSettingsFemGmshImp::changeEvent(QEvent* e) { if (e->type() == QEvent::LanguageChange) { ui->retranslateUi(this); diff --git a/src/Mod/Fem/Gui/DlgSettingsFemInOutVtkImp.cpp b/src/Mod/Fem/Gui/DlgSettingsFemInOutVtkImp.cpp index 40ebedb8df..83638ec86f 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemInOutVtkImp.cpp +++ b/src/Mod/Fem/Gui/DlgSettingsFemInOutVtkImp.cpp @@ -32,8 +32,8 @@ using namespace FemGui; -DlgSettingsFemInOutVtkImp::DlgSettingsFemInOutVtkImp( QWidget* parent ) - : PreferencePage( parent ), ui(new Ui_DlgSettingsFemInOutVtk) +DlgSettingsFemInOutVtkImp::DlgSettingsFemInOutVtkImp(QWidget* parent) + : PreferencePage(parent), ui(new Ui_DlgSettingsFemInOutVtk) { ui->setupUi(this); } @@ -49,8 +49,8 @@ DlgSettingsFemInOutVtkImp::~DlgSettingsFemInOutVtkImp() void DlgSettingsFemInOutVtkImp::saveSettings() { - ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath - ("User parameter:BaseApp/Preferences/Mod/Fem/InOutVtk"); + ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath( + "User parameter:BaseApp/Preferences/Mod/Fem/InOutVtk"); hGrp->SetInt("ImportObject", ui->comboBoxVtkImportObject->currentIndex()); ui->comboBoxVtkImportObject->onSave(); @@ -60,9 +60,9 @@ void DlgSettingsFemInOutVtkImp::loadSettings() { ui->comboBoxVtkImportObject->onRestore(); - ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath - ("User parameter:BaseApp/Preferences/Mod/Fem/InOutVtk"); - int index = hGrp->GetInt("ImportObject", 0); + ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath( + "User parameter:BaseApp/Preferences/Mod/Fem/InOutVtk"); + int index = hGrp->GetInt("ImportObject", 0); // 0 is standard on first initialize, 0 .. vtk res obj, 1 .. FEM mesh obj, 2 .. FreeCAD res obj if (index > -1) ui->comboBoxVtkImportObject->setCurrentIndex(index); } @@ -70,7 +70,7 @@ void DlgSettingsFemInOutVtkImp::loadSettings() /** * Sets the strings of the subwidgets using the current language. */ -void DlgSettingsFemInOutVtkImp::changeEvent(QEvent *e) +void DlgSettingsFemInOutVtkImp::changeEvent(QEvent* e) { if (e->type() == QEvent::LanguageChange) { int c_index = ui->comboBoxVtkImportObject->currentIndex(); diff --git a/src/Mod/Fem/Gui/DlgSettingsFemMaterialImp.cpp b/src/Mod/Fem/Gui/DlgSettingsFemMaterialImp.cpp index 1ca5efa6b4..8780ce31a4 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemMaterialImp.cpp +++ b/src/Mod/Fem/Gui/DlgSettingsFemMaterialImp.cpp @@ -30,9 +30,9 @@ using namespace FemGui; -DlgSettingsFemMaterialImp::DlgSettingsFemMaterialImp( QWidget* parent ) - : PreferencePage( parent ) - , ui(new Ui_DlgSettingsFemMaterialImp) +DlgSettingsFemMaterialImp::DlgSettingsFemMaterialImp(QWidget* parent) + : PreferencePage(parent) + , ui(new Ui_DlgSettingsFemMaterialImp) { ui->setupUi(this); } @@ -65,7 +65,7 @@ void DlgSettingsFemMaterialImp::loadSettings() /** * Sets the strings of the subwidgets using the current language. */ -void DlgSettingsFemMaterialImp::changeEvent(QEvent *e) +void DlgSettingsFemMaterialImp::changeEvent(QEvent* e) { if (e->type() == QEvent::LanguageChange) { ui->retranslateUi(this); diff --git a/src/Mod/Fem/Gui/DlgSettingsFemMystranImp.cpp b/src/Mod/Fem/Gui/DlgSettingsFemMystranImp.cpp index 64bd829964..cd86381325 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemMystranImp.cpp +++ b/src/Mod/Fem/Gui/DlgSettingsFemMystranImp.cpp @@ -30,9 +30,9 @@ using namespace FemGui; -DlgSettingsFemMystranImp::DlgSettingsFemMystranImp( QWidget* parent ) - : PreferencePage( parent ) - , ui(new Ui_DlgSettingsFemMystranImp) +DlgSettingsFemMystranImp::DlgSettingsFemMystranImp(QWidget* parent) + : PreferencePage(parent) + , ui(new Ui_DlgSettingsFemMystranImp) { ui->setupUi(this); } @@ -59,7 +59,7 @@ void DlgSettingsFemMystranImp::loadSettings() /** * Sets the strings of the subwidgets using the current language. */ -void DlgSettingsFemMystranImp::changeEvent(QEvent *e) +void DlgSettingsFemMystranImp::changeEvent(QEvent* e) { if (e->type() == QEvent::LanguageChange) { ui->retranslateUi(this); diff --git a/src/Mod/Fem/Gui/DlgSettingsFemZ88Imp.cpp b/src/Mod/Fem/Gui/DlgSettingsFemZ88Imp.cpp index 475545c209..49598505e6 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemZ88Imp.cpp +++ b/src/Mod/Fem/Gui/DlgSettingsFemZ88Imp.cpp @@ -32,9 +32,9 @@ using namespace FemGui; -DlgSettingsFemZ88Imp::DlgSettingsFemZ88Imp( QWidget* parent ) - : PreferencePage( parent ) - , ui(new Ui_DlgSettingsFemZ88Imp) +DlgSettingsFemZ88Imp::DlgSettingsFemZ88Imp(QWidget* parent) + : PreferencePage(parent) + , ui(new Ui_DlgSettingsFemZ88Imp) { ui->setupUi(this); } @@ -77,7 +77,7 @@ void DlgSettingsFemZ88Imp::loadSettings() /** * Sets the strings of the subwidgets using the current language. */ -void DlgSettingsFemZ88Imp::changeEvent(QEvent *e) +void DlgSettingsFemZ88Imp::changeEvent(QEvent* e) { if (e->type() == QEvent::LanguageChange) { ui->retranslateUi(this); diff --git a/src/Mod/Fem/Gui/FemSelectionGate.cpp b/src/Mod/Fem/Gui/FemSelectionGate.cpp index e96c07a876..e1d1781f18 100644 --- a/src/Mod/Fem/Gui/FemSelectionGate.cpp +++ b/src/Mod/Fem/Gui/FemSelectionGate.cpp @@ -35,17 +35,17 @@ bool FemSelectionGate::allow(App::Document* /*pDoc*/, App::DocumentObject* /*pOb if (!sSubName || sSubName[0] == '\0') return false; - if( sSubName[0] == 'E' && + if (sSubName[0] == 'E' && sSubName[1] == 'l' && sSubName[2] == 'e' && sSubName[3] == 'm' && - (Type == Element || Type == NodeElement) ) + (Type == Element || Type == NodeElement)) return true; - if( sSubName[0] == 'N' && + if (sSubName[0] == 'N' && sSubName[1] == 'o' && sSubName[2] == 'd' && sSubName[3] == 'e' && - (Type == Node || Type == NodeElement) ) + (Type == Node || Type == NodeElement)) return true; return false; diff --git a/src/Mod/Fem/Gui/PropertyFemMeshItem.cpp b/src/Mod/Fem/Gui/PropertyFemMeshItem.cpp index 4f22a428b3..6658e0d7fb 100644 --- a/src/Mod/Fem/Gui/PropertyFemMeshItem.cpp +++ b/src/Mod/Fem/Gui/PropertyFemMeshItem.cpp @@ -136,13 +136,13 @@ QWidget* PropertyFemMeshItem::createEditor(QWidget* parent, const QObject* recei return nullptr; } -void PropertyFemMeshItem::setEditorData(QWidget *editor, const QVariant& data) const +void PropertyFemMeshItem::setEditorData(QWidget* editor, const QVariant& data) const { Q_UNUSED(editor); Q_UNUSED(data); } -QVariant PropertyFemMeshItem::editorData(QWidget *editor) const +QVariant PropertyFemMeshItem::editorData(QWidget* editor) const { Q_UNUSED(editor); return QVariant(); diff --git a/src/Mod/Fem/Gui/TaskAnalysisInfo.cpp b/src/Mod/Fem/Gui/TaskAnalysisInfo.cpp index b9fe77bc82..b9c29a973d 100644 --- a/src/Mod/Fem/Gui/TaskAnalysisInfo.cpp +++ b/src/Mod/Fem/Gui/TaskAnalysisInfo.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ - #include "PreCompiled.h" #ifndef _PreComp_ # include @@ -36,16 +35,14 @@ #include - using namespace FemGui; using namespace Gui; - -TaskAnalysisInfo::TaskAnalysisInfo(Fem::FemAnalysis *pcObject,QWidget *parent) +TaskAnalysisInfo::TaskAnalysisInfo(Fem::FemAnalysis* pcObject, QWidget* parent) : TaskBox(Gui::BitmapFactory().pixmap("FEM_Analysis"), - tr("Nodes set"), - true, - parent), + tr("Nodes set"), + true, + parent), pcObject(pcObject) { // we need a separate container widget to add all controls to @@ -56,24 +53,24 @@ TaskAnalysisInfo::TaskAnalysisInfo(Fem::FemAnalysis *pcObject,QWidget *parent) this->groupLayout()->addWidget(proxy); - /* QObject::connect(ui->toolButton_Poly,SIGNAL(clicked()),this,SLOT(Poly())); - QObject::connect(ui->toolButton_Pick,SIGNAL(clicked()),this,SLOT(Pick())); - QObject::connect(ui->comboBox,SIGNAL(activated (int)),this,SLOT(SwitchMethod(int)));*/ + /* QObject::connect(ui->toolButton_Poly,SIGNAL(clicked()),this,SLOT(Poly())); + QObject::connect(ui->toolButton_Pick,SIGNAL(clicked()),this,SLOT(Pick())); + QObject::connect(ui->comboBox,SIGNAL(activated (int)),this,SLOT(SwitchMethod(int)));*/ } void TaskAnalysisInfo::SwitchMethod(int /*Value*/) { - /* if(Value == 1){ - ui->groupBox_AngleSearch->setEnabled(true); - ui->toolButton_Pick->setEnabled(true); - ui->toolButton_Poly->setEnabled(false); - }else{ - ui->groupBox_AngleSearch->setEnabled(false); - ui->toolButton_Pick->setEnabled(false); - ui->toolButton_Poly->setEnabled(true); - }*/ + /* if(Value == 1){ + ui->groupBox_AngleSearch->setEnabled(true); + ui->toolButton_Pick->setEnabled(true); + ui->toolButton_Poly->setEnabled(false); + }else{ + ui->groupBox_AngleSearch->setEnabled(false); + ui->toolButton_Pick->setEnabled(false); + ui->toolButton_Poly->setEnabled(true); + }*/ } @@ -82,5 +79,4 @@ TaskAnalysisInfo::~TaskAnalysisInfo() delete ui; } - #include "moc_TaskAnalysisInfo.cpp" diff --git a/src/Mod/Fem/Gui/TaskCreateNodeSet.cpp b/src/Mod/Fem/Gui/TaskCreateNodeSet.cpp index fce15ff6e9..2119a9584e 100644 --- a/src/Mod/Fem/Gui/TaskCreateNodeSet.cpp +++ b/src/Mod/Fem/Gui/TaskCreateNodeSet.cpp @@ -59,13 +59,13 @@ using namespace FemGui; using namespace Gui; -TaskCreateNodeSet::TaskCreateNodeSet(Fem::FemSetNodesObject *pcObject,QWidget *parent) +TaskCreateNodeSet::TaskCreateNodeSet(Fem::FemSetNodesObject* pcObject, QWidget* parent) : TaskBox(Gui::BitmapFactory().pixmap("FEM_CreateNodesSet"), - tr("Nodes set"), - true, - parent), - pcObject(pcObject), - selectionMode(none) + tr("Nodes set"), + true, + parent), + pcObject(pcObject), + selectionMode(none) { // we need a separate container widget to add all controls to proxy = new QWidget(this); @@ -75,13 +75,13 @@ TaskCreateNodeSet::TaskCreateNodeSet(Fem::FemSetNodesObject *pcObject,QWidget *p this->groupLayout()->addWidget(proxy); - QObject::connect(ui->toolButton_Poly,SIGNAL(clicked()),this,SLOT(Poly())); - QObject::connect(ui->toolButton_Pick,SIGNAL(clicked()),this,SLOT(Pick())); - QObject::connect(ui->comboBox,SIGNAL(activated (int)),this,SLOT(SwitchMethod(int))); + QObject::connect(ui->toolButton_Poly, SIGNAL(clicked()), this, SLOT(Poly())); + QObject::connect(ui->toolButton_Pick, SIGNAL(clicked()), this, SLOT(Pick())); + QObject::connect(ui->comboBox, SIGNAL(activated(int)), this, SLOT(SwitchMethod(int))); // check if the Link to the FemMesh is defined assert(pcObject->FemMesh.getValue()); - MeshViewProvider = dynamic_cast(Gui::Application::Instance->getViewProvider( pcObject->FemMesh.getValue())); + MeshViewProvider = dynamic_cast(Gui::Application::Instance->getViewProvider(pcObject->FemMesh.getValue())); assert(MeshViewProvider); tempSet = pcObject->Nodes.getValues(); @@ -100,13 +100,13 @@ void TaskCreateNodeSet::Poly(void) Gui::View3DInventorViewer* viewer = ((Gui::View3DInventor*)view)->getViewer(); viewer->setEditing(true); viewer->startSelection(Gui::View3DInventorViewer::Clip); - viewer->addEventCallback(SoMouseButtonEvent::getClassTypeId(), DefineNodesCallback,this); + viewer->addEventCallback(SoMouseButtonEvent::getClassTypeId(), DefineNodesCallback, this); } } void TaskCreateNodeSet::Pick(void) { - if (selectionMode == none){ + if (selectionMode == none) { selectionMode = PickElement; Gui::Selection().clearSelection(); Gui::Selection().addSelectionGate(new FemSelectionGate(FemSelectionGate::Element)); @@ -115,11 +115,12 @@ void TaskCreateNodeSet::Pick(void) void TaskCreateNodeSet::SwitchMethod(int Value) { - if(Value == 1){ + if (Value == 1) { ui->groupBox_AngleSearch->setEnabled(true); ui->toolButton_Pick->setEnabled(true); ui->toolButton_Poly->setEnabled(false); - }else{ + } + else { ui->groupBox_AngleSearch->setEnabled(false); ui->toolButton_Pick->setEnabled(false); ui->toolButton_Poly->setEnabled(true); @@ -128,18 +129,18 @@ void TaskCreateNodeSet::SwitchMethod(int Value) -void TaskCreateNodeSet::DefineNodesCallback(void * ud, SoEventCallback * n) +void TaskCreateNodeSet::DefineNodesCallback(void* ud, SoEventCallback* n) { // show the wait cursor because this could take quite some time Gui::WaitCursor wc; - TaskCreateNodeSet *taskBox = static_cast(ud); + TaskCreateNodeSet* taskBox = static_cast(ud); // When this callback function is invoked we must in either case leave the edit mode - Gui::View3DInventorViewer* view = reinterpret_cast(n->getUserData()); + Gui::View3DInventorViewer* view = reinterpret_cast(n->getUserData()); view->setEditing(false); - view->removeEventCallback(SoMouseButtonEvent::getClassTypeId(), DefineNodesCallback,ud); + view->removeEventCallback(SoMouseButtonEvent::getClassTypeId(), DefineNodesCallback, ud); n->setHandled(); Gui::SelectionRole role; @@ -154,24 +155,24 @@ void TaskCreateNodeSet::DefineNodesCallback(void * ud, SoEventCallback * n) Gui::ViewVolumeProjection proj(vv); Base::Polygon2d polygon; for (std::vector::const_iterator it = clPoly.begin(); it != clPoly.end(); ++it) - polygon.Add(Base::Vector2d((*it)[0],(*it)[1])); + polygon.Add(Base::Vector2d((*it)[0], (*it)[1])); - taskBox->DefineNodes(polygon,proj,role == Gui::SelectionRole::Inner ? true : false); + taskBox->DefineNodes(polygon, proj, role == Gui::SelectionRole::Inner ? true : false); } -void TaskCreateNodeSet::DefineNodes(const Base::Polygon2d &polygon,const Gui::ViewVolumeProjection &proj,bool inner) +void TaskCreateNodeSet::DefineNodes(const Base::Polygon2d& polygon, const Gui::ViewVolumeProjection& proj, bool inner) { const SMESHDS_Mesh* data = const_cast(pcObject->FemMesh.getValue()->FemMesh.getValue().getSMesh())->GetMeshDS(); SMDS_NodeIteratorPtr aNodeIter = data->nodesIterator(); Base::Vector3f pt2d; - if(! ui->checkBox_Add->isChecked()) + if (!ui->checkBox_Add->isChecked()) tempSet.clear(); while (aNodeIter->more()) { const SMDS_MeshNode* aNode = aNodeIter->next(); - Base::Vector3f vec(aNode->X(),aNode->Y(),aNode->Z()); + Base::Vector3f vec(aNode->X(), aNode->Y(), aNode->Z()); pt2d = proj(vec); if (polygon.Contains(Base::Vector2d(pt2d.x, pt2d.y)) == inner) tempSet.insert(aNode->GetID()); @@ -187,25 +188,26 @@ void TaskCreateNodeSet::onSelectionChanged(const Gui::SelectionChanges& msg) if (msg.Type == Gui::SelectionChanges::AddSelection) { std::string subName(msg.pSubName); - unsigned int i=0; - for(;icheckBox_Add->isChecked()){ - std::set tmp = pcObject->FemMesh.getValue()->FemMesh.getValue().getSurfaceNodes(elem,face); - tempSet.insert(tmp.begin(),tmp.end()); - }else - tempSet = pcObject->FemMesh.getValue()->FemMesh.getValue().getSurfaceNodes(elem,face); + if (!ui->checkBox_Add->isChecked()) { + std::set tmp = pcObject->FemMesh.getValue()->FemMesh.getValue().getSurfaceNodes(elem, face); + tempSet.insert(tmp.begin(), tmp.end()); + } + else + tempSet = pcObject->FemMesh.getValue()->FemMesh.getValue().getSurfaceNodes(elem, face); selectionMode = none; Gui::Selection().rmvSelectionGate(); @@ -222,5 +224,4 @@ TaskCreateNodeSet::~TaskCreateNodeSet() Gui::Selection().rmvSelectionGate(); } - #include "moc_TaskCreateNodeSet.cpp" diff --git a/src/Mod/Fem/Gui/TaskDlgAnalysis.cpp b/src/Mod/Fem/Gui/TaskDlgAnalysis.cpp index c870773714..cc182acf6a 100644 --- a/src/Mod/Fem/Gui/TaskDlgAnalysis.cpp +++ b/src/Mod/Fem/Gui/TaskDlgAnalysis.cpp @@ -49,8 +49,8 @@ using namespace FemGui; // TaskDialog //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -TaskDlgAnalysis::TaskDlgAnalysis(Fem::FemAnalysis *obj) - : TaskDialog(),FemAnalysis(obj) +TaskDlgAnalysis::TaskDlgAnalysis(Fem::FemAnalysis* obj) + : TaskDialog(), FemAnalysis(obj) { driver = new TaskDriver(obj); info = new TaskAnalysisInfo(obj); @@ -114,5 +114,4 @@ void TaskDlgAnalysis::helpRequested() } - #include "moc_TaskDlgAnalysis.cpp" diff --git a/src/Mod/Fem/Gui/TaskDlgCreateNodeSet.cpp b/src/Mod/Fem/Gui/TaskDlgCreateNodeSet.cpp index 0e481c315b..52b963ef99 100644 --- a/src/Mod/Fem/Gui/TaskDlgCreateNodeSet.cpp +++ b/src/Mod/Fem/Gui/TaskDlgCreateNodeSet.cpp @@ -45,8 +45,8 @@ using namespace FemGui; // TaskDialog //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -TaskDlgCreateNodeSet::TaskDlgCreateNodeSet(Fem::FemSetNodesObject *obj) - : TaskDialog(),FemSetNodesObject(obj) +TaskDlgCreateNodeSet::TaskDlgCreateNodeSet(Fem::FemSetNodesObject* obj) + : TaskDialog(), FemSetNodesObject(obj) { name = new TaskObjectName(obj); param = new TaskCreateNodeSet(obj); @@ -81,7 +81,7 @@ bool TaskDlgCreateNodeSet::accept() // doc->resetEdit(); param->MeshViewProvider->resetHighlightNodes(); FemSetNodesObject->Label.setValue(name->name); - Gui::Command::doCommand(Gui::Command::Gui,"Gui.activeDocument().resetEdit()"); + Gui::Command::doCommand(Gui::Command::Gui, "Gui.activeDocument().resetEdit()"); return true; } @@ -95,12 +95,12 @@ bool TaskDlgCreateNodeSet::accept() bool TaskDlgCreateNodeSet::reject() { FemSetNodesObject->execute(); - //Gui::Document* doc = Gui::Application::Instance->activeDocument(); - //if(doc) - // doc->resetEdit(); + //Gui::Document* doc = Gui::Application::Instance->activeDocument(); + //if(doc) + // doc->resetEdit(); param->MeshViewProvider->resetHighlightNodes(); Gui::Command::abortCommand(); - Gui::Command::doCommand(Gui::Command::Gui,"Gui.activeDocument().resetEdit()"); + Gui::Command::doCommand(Gui::Command::Gui, "Gui.activeDocument().resetEdit()"); return true; } @@ -110,5 +110,4 @@ void TaskDlgCreateNodeSet::helpRequested() } - #include "moc_TaskDlgCreateNodeSet.cpp" diff --git a/src/Mod/Fem/Gui/TaskDlgMeshShapeNetgen.cpp b/src/Mod/Fem/Gui/TaskDlgMeshShapeNetgen.cpp index 7f4d1ad2b1..fb09d6949a 100644 --- a/src/Mod/Fem/Gui/TaskDlgMeshShapeNetgen.cpp +++ b/src/Mod/Fem/Gui/TaskDlgMeshShapeNetgen.cpp @@ -51,12 +51,12 @@ using namespace FemGui; // TaskDialog //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -TaskDlgMeshShapeNetgen::TaskDlgMeshShapeNetgen(FemGui::ViewProviderFemMeshShapeNetgen *obj) +TaskDlgMeshShapeNetgen::TaskDlgMeshShapeNetgen(FemGui::ViewProviderFemMeshShapeNetgen* obj) : TaskDialog(), param(nullptr), ViewProviderFemMeshShapeNetgen(obj) { - FemMeshShapeNetgenObject = dynamic_cast(obj->getObject()); + FemMeshShapeNetgenObject = dynamic_cast(obj->getObject()); if (FemMeshShapeNetgenObject) { - param = new TaskTetParameter(FemMeshShapeNetgenObject); + param = new TaskTetParameter(FemMeshShapeNetgenObject); Content.push_back(param); } } @@ -81,7 +81,7 @@ void TaskDlgMeshShapeNetgen::open() void TaskDlgMeshShapeNetgen::clicked(int button) { try { - if(QDialogButtonBox::Apply == button && param->touched) + if (QDialogButtonBox::Apply == button && param->touched) { Gui::WaitCursor wc; // May throw an exception which we must handle here @@ -98,14 +98,14 @@ void TaskDlgMeshShapeNetgen::clicked(int button) bool TaskDlgMeshShapeNetgen::accept() { try { - if(param->touched) + if (param->touched) { Gui::WaitCursor wc; bool ret = FemMeshShapeNetgenObject->recomputeFeature(); if (!ret) { wc.restoreCursor(); QMessageBox::critical(Gui::getMainWindow(), tr("Meshing failure"), - QString::fromStdString(FemMeshShapeNetgenObject->getStatusString())); + QString::fromStdString(FemMeshShapeNetgenObject->getStatusString())); return true; } } @@ -117,7 +117,7 @@ bool TaskDlgMeshShapeNetgen::accept() } //FemSetNodesObject->Label.setValue(name->name); - Gui::Command::doCommand(Gui::Command::Gui,"Gui.activeDocument().resetEdit()"); + Gui::Command::doCommand(Gui::Command::Gui, "Gui.activeDocument().resetEdit()"); Gui::Command::commitCommand(); return true; @@ -137,7 +137,7 @@ bool TaskDlgMeshShapeNetgen::reject() // // doc->resetEdit(); //param->MeshViewProvider->resetHighlightNodes(); Gui::Command::abortCommand(); - Gui::Command::doCommand(Gui::Command::Gui,"Gui.activeDocument().resetEdit()"); + Gui::Command::doCommand(Gui::Command::Gui, "Gui.activeDocument().resetEdit()"); return true; } @@ -147,5 +147,4 @@ void TaskDlgMeshShapeNetgen::helpRequested() } - #include "moc_TaskDlgMeshShapeNetgen.cpp" diff --git a/src/Mod/Fem/Gui/TaskDriver.cpp b/src/Mod/Fem/Gui/TaskDriver.cpp index e84fc86f6b..37a991eddf 100644 --- a/src/Mod/Fem/Gui/TaskDriver.cpp +++ b/src/Mod/Fem/Gui/TaskDriver.cpp @@ -20,7 +20,6 @@ * * ***************************************************************************/ - #include "PreCompiled.h" #ifndef _PreComp_ # include @@ -29,7 +28,6 @@ # include #endif - #include "ui_TaskDriver.h" #include "TaskDriver.h" #include @@ -43,16 +41,14 @@ #include - using namespace FemGui; using namespace Gui; - -TaskDriver::TaskDriver(Fem::FemAnalysis *pcObject,QWidget *parent) +TaskDriver::TaskDriver(Fem::FemAnalysis* pcObject, QWidget* parent) : TaskBox(Gui::BitmapFactory().pixmap("FEM_CreateNodesSet"), - tr("Nodes set"), - true, - parent), + tr("Nodes set"), + true, + parent), pcObject(pcObject) { // we need a separate container widget to add all controls to @@ -69,8 +65,6 @@ TaskDriver::TaskDriver(Fem::FemAnalysis *pcObject,QWidget *parent) } - - void TaskDriver::SwitchMethod(int /*Value*/) { //if(Value == 1){ @@ -84,14 +78,9 @@ void TaskDriver::SwitchMethod(int /*Value*/) //} } - - - - TaskDriver::~TaskDriver() { delete ui; } - #include "moc_TaskDriver.cpp"