[FEM] remove unused code
- remove commented-out code that is in Python since years
This commit is contained in:
@@ -167,115 +167,6 @@ bool CmdFemAddPart::isActive(void)
|
||||
}
|
||||
*/
|
||||
|
||||
//================================================================================================
|
||||
// analysis
|
||||
/* done in Python
|
||||
DEF_STD_CMD_A(CmdFemCreateAnalysis)
|
||||
|
||||
CmdFemCreateAnalysis::CmdFemCreateAnalysis()
|
||||
: Command("FEM_CreateAnalysis")
|
||||
{
|
||||
sAppModule = "Fem";
|
||||
sGroup = QT_TR_NOOP("Fem");
|
||||
sMenuText = QT_TR_NOOP("Create a FEM analysis");
|
||||
sToolTipText = QT_TR_NOOP("Create a FEM analysis");
|
||||
sWhatsThis = "FEM_CreateAnalysis";
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "FEM_Analysis";
|
||||
}
|
||||
|
||||
void CmdFemCreateAnalysis::activated(int)
|
||||
{
|
||||
#ifndef FCWithNetgen
|
||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
|
||||
QObject::tr("Your FreeCAD is built without NETGEN support. Meshing will not work...."));
|
||||
return;
|
||||
#endif
|
||||
|
||||
std::vector<Gui::SelectionObject> selection = getSelection().getSelectionEx();
|
||||
|
||||
if (selection.size() != 1) {
|
||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
|
||||
QObject::tr("Select an edge, face, or body. Only one body is allowed."));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!selection[0].isObjectTypeOf(Part::Feature::getClassTypeId())){
|
||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong object type"),
|
||||
QObject::tr("Fillet works only on parts"));
|
||||
return;
|
||||
}
|
||||
|
||||
Part::Feature *base = static_cast<Part::Feature*>(selection[0].getObject());
|
||||
|
||||
std::string AnalysisName = getUniqueObjectName("FemAnalysis");
|
||||
|
||||
std::string MeshName = getUniqueObjectName((std::string(base->getNameInDocument()) +"_Mesh").c_str());
|
||||
|
||||
|
||||
openCommand(QT_TRANSLATE_NOOP("Command", "Create FEM analysis"));
|
||||
doCommand(Doc,"App.activeDocument().addObject('Fem::FemAnalysis','%s')",AnalysisName.c_str());
|
||||
doCommand(Doc,"App.activeDocument().addObject('Fem::FemMeshShapeNetgenObject','%s')",MeshName.c_str());
|
||||
doCommand(Doc,"App.activeDocument().ActiveObject.Shape = App.activeDocument().%s",base->getNameInDocument());
|
||||
doCommand(Doc,"App.activeDocument().%s.addObject(App.activeDocument().%s)",AnalysisName.c_str(),MeshName.c_str());
|
||||
addModule(Gui,"FemGui");
|
||||
doCommand(Gui,"FemGui.setActiveAnalysis(App.activeDocument().%s)",AnalysisName.c_str());
|
||||
commitCommand();
|
||||
|
||||
updateActive();
|
||||
}
|
||||
|
||||
bool CmdFemCreateAnalysis::isActive(void)
|
||||
{
|
||||
return !FemGui::ActiveAnalysisObserver::instance()->hasActiveObject();
|
||||
}
|
||||
*/
|
||||
|
||||
//================================================================================================
|
||||
// solver
|
||||
/* done in Python
|
||||
DEF_STD_CMD_A(CmdFemCreateSolver)
|
||||
|
||||
CmdFemCreateSolver::CmdFemCreateSolver()
|
||||
: Command("FEM_CreateSolver")
|
||||
{
|
||||
sAppModule = "Fem";
|
||||
sGroup = QT_TR_NOOP("Fem");
|
||||
sMenuText = QT_TR_NOOP("Add a solver to the analysis");
|
||||
sToolTipText = QT_TR_NOOP("Add a solver to the Analysis");
|
||||
sWhatsThis = "FEM_CreateSolver";
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "FEM_SolverStandard";
|
||||
}
|
||||
|
||||
void CmdFemCreateSolver::activated(int)
|
||||
{
|
||||
#ifndef FCWithNetgen
|
||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
|
||||
QObject::tr("Your FreeCAD is built without NETGEN support. Meshing will not work...."));
|
||||
return;
|
||||
#endif
|
||||
|
||||
Fem::FemAnalysis *Analysis;
|
||||
|
||||
if(getConstraintPrerequisits(&Analysis))
|
||||
return;
|
||||
|
||||
std::string FeatName = getUniqueObjectName("Solver");
|
||||
|
||||
openCommand(QT_TRANSLATE_NOOP("Command", "Create solver for FEM or CFD analysis"));
|
||||
doCommand(Doc,"App.activeDocument().addObject(\"Fem::FemSolverObject\",\"%s\")",FeatName.c_str());
|
||||
doCommand(Doc,"App.activeDocument().%s.addObject(App.activeDocument().%s)",Analysis->getNameInDocument(),FeatName.c_str());
|
||||
updateActive();
|
||||
|
||||
doCommand(Gui,"Gui.activeDocument().setEdit('%s')",FeatName.c_str());
|
||||
}
|
||||
|
||||
bool CmdFemCreateSolver::isActive(void)
|
||||
{
|
||||
return hasActiveDocument();
|
||||
}
|
||||
*/
|
||||
|
||||
//================================================================================================
|
||||
//================================================================================================
|
||||
|
||||
Reference in New Issue
Block a user