FEM: VTK post processing, changes:

- vtk result file reading
- some changes in vtk post processing pipe line
This commit is contained in:
qingfengxia
2017-02-16 07:54:16 +01:00
committed by Bernd Hahnebach
parent 99fa203f32
commit 1c18867d1e
5 changed files with 332 additions and 275 deletions

View File

@@ -116,11 +116,12 @@ DocumentObjectExecReturn* FemPostPipeline::execute(void) {
bool FemPostPipeline::canRead(Base::FileInfo File) {
if (File.hasExtension("vtk") ||
// from FemResult only unstructural mesh is supported in femvtktoools.cpp
File.hasExtension("vtp") ||
File.hasExtension("vts") ||
File.hasExtension("vtr") ||
File.hasExtension("vtu") ||
File.hasExtension("vti"))
File.hasExtension("vti") ||
File.hasExtension("vtu"))
return true;
return false;
@@ -244,9 +245,10 @@ bool FemPostPipeline::holdsPostObject(FemPostObject* obj) {
}
void FemPostPipeline::load(FemResultObject* res) {
if(!res->Mesh.getValue() || !res->Mesh.getValue()->isDerivedFrom(Fem::FemMeshObject::getClassTypeId()))
if(!res->Mesh.getValue() || !res->Mesh.getValue()->isDerivedFrom(Fem::FemMeshObject::getClassTypeId())) {
Base::Console().Warning("Mesh of result object is empty or not derived from Fem::FemMeshObject\n");
return;
}
//first copy the mesh over
//########################
@@ -256,7 +258,7 @@ void FemPostPipeline::load(FemResultObject* res) {
//Now copy the point data over
//############################
if(res->getPropertyByName("Velocity")){
if(res->getPropertyByName("Velocity")){ // consider better way to detect result type, res->Type == "CfdResult"
FemVTKTools::exportFluidicResult(res, grid);
}
else{