FEM Post: FreeCADify the vtk post processing

- Data property for saving/loading vtk data
- Use FreeCAD recompute system instead of vtk pipeline
This commit is contained in:
Stefan Tröger
2016-01-01 14:12:23 +01:00
committed by wmayer
parent 427ded23d5
commit c2df92cd76
15 changed files with 265 additions and 356 deletions

View File

@@ -930,14 +930,14 @@ void CmdFemPostFunctions::activated(int iMsg)
//check if the pipeline has a filter provider and add one if needed
Fem::FemPostFunctionProvider* provider;
if(!pipeline->Function.getValue() || pipeline->Function.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.Function = App.ActiveDocument.%s", pipeline->getNameInDocument(), FuncName.c_str());
doCommand(Doc,"App.ActiveDocument.%s.Functions = App.ActiveDocument.%s", pipeline->getNameInDocument(), FuncName.c_str());
provider = static_cast<Fem::FemPostFunctionProvider*>(getDocument()->getObject(FuncName.c_str()));
}
else
provider = static_cast<Fem::FemPostFunctionProvider*>(pipeline->Function.getValue());
provider = static_cast<Fem::FemPostFunctionProvider*>(pipeline->Functions.getValue());
//build the object
std::string FeatName = getUniqueObjectName(name.c_str());