[skip CI] [FEM] remove an unused header
- also some code styles improvements
This commit is contained in:
@@ -20,18 +20,15 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
#endif
|
||||
|
||||
#include "FemAnalysis.h"
|
||||
#include <App/DocumentObjectPy.h>
|
||||
#include <App/FeaturePythonPyImp.h>
|
||||
#include <Base/Placement.h>
|
||||
#include <Base/Uuid.h>
|
||||
|
||||
#include "FemAnalysis.h"
|
||||
|
||||
|
||||
using namespace Fem;
|
||||
using namespace App;
|
||||
|
||||
@@ -41,16 +38,16 @@ PROPERTY_SOURCE(Fem::FemAnalysis, App::DocumentObjectGroup)
|
||||
FemAnalysis::FemAnalysis()
|
||||
{
|
||||
Base::Uuid id;
|
||||
ADD_PROPERTY_TYPE(Uid,(id),0,App::Prop_None,"UUID of the Analysis");
|
||||
ADD_PROPERTY_TYPE(Uid, (id), 0, App::Prop_None, "UUID of the Analysis");
|
||||
}
|
||||
|
||||
FemAnalysis::~FemAnalysis()
|
||||
{
|
||||
}
|
||||
|
||||
void FemAnalysis::handleChangedPropertyName(Base::XMLReader &reader,
|
||||
const char * TypeName,
|
||||
const char *PropName)
|
||||
void FemAnalysis::handleChangedPropertyName(Base::XMLReader& reader,
|
||||
const char* TypeName,
|
||||
const char* PropName)
|
||||
{
|
||||
Base::Type type = Base::Type::fromName(TypeName);
|
||||
if (Group.getClassTypeId() == type && strcmp(PropName, "Member") == 0) {
|
||||
@@ -101,7 +98,7 @@ template<> const char* Fem::FeaturePython::getViewProviderName(void) const {
|
||||
template<> PyObject* Fem::FeaturePython::getPyObject(void) {
|
||||
if (PythonObject.is(Py::_None())) {
|
||||
// ref counter is set to 1
|
||||
PythonObject = Py::Object(new App::FeaturePythonPyT<App::DocumentObjectPy>(this),true);
|
||||
PythonObject = Py::Object(new App::FeaturePythonPyT<App::DocumentObjectPy>(this), true);
|
||||
}
|
||||
return Py::new_reference_to(PythonObject);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#include "Gui/Command.h"
|
||||
#include <Gui/Command.h>
|
||||
|
||||
#include "ViewProviderResult.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user