[skip CI] [FEM] remove an unused header

- also some code styles improvements
This commit is contained in:
Uwe
2022-03-26 04:32:17 +01:00
parent 30928c0710
commit 3bbbae84d7
3 changed files with 17 additions and 21 deletions

View File

@@ -20,7 +20,6 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#include "ViewProviderFemPostPipeline.h"
#include "ViewProviderFemPostFunction.h"
@@ -47,7 +46,7 @@ std::vector< App::DocumentObject* > ViewProviderFemPostPipeline::claimChildren(v
Fem::FemPostPipeline* pipeline = static_cast<Fem::FemPostPipeline*>(getObject());
std::vector<App::DocumentObject*> children;
if(pipeline->Functions.getValue())
if (pipeline->Functions.getValue())
children.push_back(pipeline->Functions.getValue());
children.insert(children.end(), pipeline->Filter.getValues().begin(), pipeline->Filter.getValues().end());
@@ -62,7 +61,7 @@ std::vector< App::DocumentObject* > ViewProviderFemPostPipeline::claimChildren3D
void ViewProviderFemPostPipeline::updateData(const App::Property* prop) {
FemGui::ViewProviderFemPostObject::updateData(prop);
if(strcmp(prop->getName(), "Function") == 0) {
if (strcmp(prop->getName(), "Function") == 0) {
updateFunctionSize();
}
@@ -73,18 +72,18 @@ void ViewProviderFemPostPipeline::updateFunctionSize() {
//we need to get the bounding box and set the function provider size
Fem::FemPostPipeline* obj = static_cast<Fem::FemPostPipeline*>(getObject());
if(!obj->Functions.getValue() || !obj->Functions.getValue()->isDerivedFrom(Fem::FemPostFunctionProvider::getClassTypeId()))
if (!obj->Functions.getValue() || !obj->Functions.getValue()->isDerivedFrom(Fem::FemPostFunctionProvider::getClassTypeId()))
return;
//get the function provider
FemGui::ViewProviderFemPostFunctionProvider* vp = static_cast<FemGui::ViewProviderFemPostFunctionProvider*>(
Gui::Application::Instance->getViewProvider(obj->Functions.getValue()));
Gui::Application::Instance->getViewProvider(obj->Functions.getValue()));
if(obj->Data.getValue() && obj->Data.getValue()->IsA("vtkDataSet")) {
if (obj->Data.getValue() && obj->Data.getValue()->IsA("vtkDataSet")) {
vtkBoundingBox box = obj->getBoundingBox();
vp->SizeX.setValue(box.GetLength(0)*1.2);
vp->SizeY.setValue(box.GetLength(1)*1.2);
vp->SizeZ.setValue(box.GetLength(2)*1.2);
vp->SizeX.setValue(box.GetLength(0) * 1.2);
vp->SizeY.setValue(box.GetLength(1) * 1.2);
vp->SizeZ.setValue(box.GetLength(2) * 1.2);
}
}