[skip CI] [FEM] whitespace and comments to keep overview
This commit is contained in:
@@ -34,7 +34,7 @@ using namespace App;
|
||||
|
||||
PROPERTY_SOURCE(Fem::FemPostFunctionProvider, App::DocumentObject)
|
||||
|
||||
FemPostFunctionProvider::FemPostFunctionProvider(void): DocumentObject() {
|
||||
FemPostFunctionProvider::FemPostFunctionProvider(void) : DocumentObject() {
|
||||
|
||||
ADD_PROPERTY(Functions, (nullptr));
|
||||
}
|
||||
@@ -64,12 +64,14 @@ DocumentObjectExecReturn* FemPostFunction::execute(void) {
|
||||
}
|
||||
|
||||
|
||||
// ***************************************************************************
|
||||
// plane function
|
||||
PROPERTY_SOURCE(Fem::FemPostPlaneFunction, Fem::FemPostFunction)
|
||||
|
||||
FemPostPlaneFunction::FemPostPlaneFunction(void): FemPostFunction() {
|
||||
FemPostPlaneFunction::FemPostPlaneFunction(void) : FemPostFunction() {
|
||||
|
||||
ADD_PROPERTY(Origin,(Base::Vector3d(0.0,0.0,0.0)));
|
||||
ADD_PROPERTY(Normal,(Base::Vector3d(0.0,0.0,1.0)));
|
||||
ADD_PROPERTY(Origin, (Base::Vector3d(0.0, 0.0, 0.0)));
|
||||
ADD_PROPERTY(Normal, (Base::Vector3d(0.0, 0.0, 1.0)));
|
||||
|
||||
m_plane = vtkSmartPointer<vtkPlane>::New();
|
||||
m_implicit = m_plane;
|
||||
@@ -84,11 +86,11 @@ FemPostPlaneFunction::~FemPostPlaneFunction() {
|
||||
|
||||
void FemPostPlaneFunction::onChanged(const Property* prop) {
|
||||
|
||||
if(prop == &Origin) {
|
||||
if (prop == &Origin) {
|
||||
const Base::Vector3d& vec = Origin.getValue();
|
||||
m_plane->SetOrigin(vec[0], vec[1], vec[2]);
|
||||
}
|
||||
else if(prop == &Normal) {
|
||||
else if (prop == &Normal) {
|
||||
const Base::Vector3d& vec = Normal.getValue();
|
||||
m_plane->SetNormal(vec[0], vec[1], vec[2]);
|
||||
}
|
||||
@@ -102,14 +104,14 @@ void FemPostPlaneFunction::onDocumentRestored() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// ***************************************************************************
|
||||
// sphere function
|
||||
PROPERTY_SOURCE(Fem::FemPostSphereFunction, Fem::FemPostFunction)
|
||||
|
||||
FemPostSphereFunction::FemPostSphereFunction(void): FemPostFunction() {
|
||||
FemPostSphereFunction::FemPostSphereFunction(void) : FemPostFunction() {
|
||||
|
||||
ADD_PROPERTY(Radius,(5));
|
||||
ADD_PROPERTY(Center,(Base::Vector3d(1.0,0.0,0.0)));
|
||||
ADD_PROPERTY(Radius, (5));
|
||||
ADD_PROPERTY(Center, (Base::Vector3d(1.0, 0.0, 0.0)));
|
||||
|
||||
m_sphere = vtkSmartPointer<vtkSphere>::New();
|
||||
m_implicit = m_sphere;
|
||||
@@ -124,11 +126,11 @@ FemPostSphereFunction::~FemPostSphereFunction() {
|
||||
|
||||
void FemPostSphereFunction::onChanged(const Property* prop) {
|
||||
|
||||
if(prop == &Center) {
|
||||
if (prop == &Center) {
|
||||
const Base::Vector3d& vec = Center.getValue();
|
||||
m_sphere->SetCenter(vec[0], vec[1], vec[2]);
|
||||
}
|
||||
else if(prop == &Radius) {
|
||||
else if (prop == &Radius) {
|
||||
m_sphere->SetRadius(Radius.getValue());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user