Fem: Apply clang-format
This commit is contained in:
@@ -30,14 +30,17 @@ using namespace App;
|
||||
|
||||
PROPERTY_SOURCE(Fem::FemPostFunctionProvider, App::DocumentObject)
|
||||
|
||||
FemPostFunctionProvider::FemPostFunctionProvider() : DocumentObject() {
|
||||
FemPostFunctionProvider::FemPostFunctionProvider()
|
||||
: DocumentObject()
|
||||
{
|
||||
|
||||
ADD_PROPERTY(Functions, (nullptr));
|
||||
}
|
||||
|
||||
FemPostFunctionProvider::~FemPostFunctionProvider() = default;
|
||||
|
||||
void FemPostFunctionProvider::onChanged(const Property* prop) {
|
||||
void FemPostFunctionProvider::onChanged(const Property* prop)
|
||||
{
|
||||
App::DocumentObject::onChanged(prop);
|
||||
}
|
||||
|
||||
@@ -48,7 +51,8 @@ FemPostFunction::FemPostFunction() = default;
|
||||
|
||||
FemPostFunction::~FemPostFunction() = default;
|
||||
|
||||
DocumentObjectExecReturn* FemPostFunction::execute() {
|
||||
DocumentObjectExecReturn* FemPostFunction::execute()
|
||||
{
|
||||
|
||||
return DocumentObject::StdReturn;
|
||||
}
|
||||
@@ -80,10 +84,12 @@ void FemPostBoxFunction::onChanged(const Property* prop)
|
||||
float l = Length.getValue();
|
||||
float w = Width.getValue();
|
||||
float h = Height.getValue();
|
||||
m_box->SetBounds(
|
||||
vec[0] - l/2, vec[0] + l/2,
|
||||
vec[1] - w/2, vec[1] + w/2,
|
||||
vec[2] - h/2, vec[2] + h/2);
|
||||
m_box->SetBounds(vec[0] - l / 2,
|
||||
vec[0] + l / 2,
|
||||
vec[1] - w / 2,
|
||||
vec[1] + w / 2,
|
||||
vec[2] - h / 2,
|
||||
vec[2] + h / 2);
|
||||
}
|
||||
|
||||
Fem::FemPostFunction::onChanged(prop);
|
||||
@@ -145,7 +151,9 @@ void FemPostCylinderFunction::onDocumentRestored()
|
||||
// plane function
|
||||
PROPERTY_SOURCE(Fem::FemPostPlaneFunction, Fem::FemPostFunction)
|
||||
|
||||
FemPostPlaneFunction::FemPostPlaneFunction() : FemPostFunction() {
|
||||
FemPostPlaneFunction::FemPostPlaneFunction()
|
||||
: FemPostFunction()
|
||||
{
|
||||
|
||||
ADD_PROPERTY(Origin, (Base::Vector3d(0.0, 0.0, 0.0)));
|
||||
ADD_PROPERTY(Normal, (Base::Vector3d(0.0, 0.0, 1.0)));
|
||||
@@ -159,7 +167,8 @@ FemPostPlaneFunction::FemPostPlaneFunction() : FemPostFunction() {
|
||||
|
||||
FemPostPlaneFunction::~FemPostPlaneFunction() = default;
|
||||
|
||||
void FemPostPlaneFunction::onChanged(const Property* prop) {
|
||||
void FemPostPlaneFunction::onChanged(const Property* prop)
|
||||
{
|
||||
|
||||
if (prop == &Origin) {
|
||||
const Base::Vector3d& vec = Origin.getValue();
|
||||
@@ -173,7 +182,8 @@ void FemPostPlaneFunction::onChanged(const Property* prop) {
|
||||
Fem::FemPostFunction::onChanged(prop);
|
||||
}
|
||||
|
||||
void FemPostPlaneFunction::onDocumentRestored() {
|
||||
void FemPostPlaneFunction::onDocumentRestored()
|
||||
{
|
||||
// This is to notify the view provider that the document has been fully restored
|
||||
Normal.touch();
|
||||
}
|
||||
@@ -183,7 +193,9 @@ void FemPostPlaneFunction::onDocumentRestored() {
|
||||
// sphere function
|
||||
PROPERTY_SOURCE(Fem::FemPostSphereFunction, Fem::FemPostFunction)
|
||||
|
||||
FemPostSphereFunction::FemPostSphereFunction() : FemPostFunction() {
|
||||
FemPostSphereFunction::FemPostSphereFunction()
|
||||
: FemPostFunction()
|
||||
{
|
||||
|
||||
ADD_PROPERTY(Radius, (5.0));
|
||||
ADD_PROPERTY(Center, (Base::Vector3d(1.0, 0.0, 0.0)));
|
||||
@@ -197,7 +209,8 @@ FemPostSphereFunction::FemPostSphereFunction() : FemPostFunction() {
|
||||
|
||||
FemPostSphereFunction::~FemPostSphereFunction() = default;
|
||||
|
||||
void FemPostSphereFunction::onChanged(const Property* prop) {
|
||||
void FemPostSphereFunction::onChanged(const Property* prop)
|
||||
{
|
||||
|
||||
if (prop == &Center) {
|
||||
const Base::Vector3d& vec = Center.getValue();
|
||||
|
||||
Reference in New Issue
Block a user