From f012e92e33c4c92fa6199c63e1ba4d2b9d3216b3 Mon Sep 17 00:00:00 2001
From: FEA-eng <59876896+FEA-eng@users.noreply.github.com>
Date: Fri, 15 Mar 2024 18:54:10 +0100
Subject: [PATCH] Fem: Update properties of ConstraintRigidBody
---
src/Mod/Fem/App/FemConstraintRigidBody.cpp | 6 +--
src/Mod/Fem/App/FemConstraintRigidBody.h | 6 +--
.../Fem/Gui/TaskFemConstraintRigidBody.cpp | 48 +++++++++----------
src/Mod/Fem/Gui/TaskFemConstraintRigidBody.h | 6 +--
src/Mod/Fem/Gui/TaskFemConstraintRigidBody.ui | 46 +++++++++---------
5 files changed, 56 insertions(+), 56 deletions(-)
diff --git a/src/Mod/Fem/App/FemConstraintRigidBody.cpp b/src/Mod/Fem/App/FemConstraintRigidBody.cpp
index 0d55192806..dd7a5bd194 100644
--- a/src/Mod/Fem/App/FemConstraintRigidBody.cpp
+++ b/src/Mod/Fem/App/FemConstraintRigidBody.cpp
@@ -40,9 +40,9 @@ ConstraintRigidBody::ConstraintRigidBody()
ADD_PROPERTY(xRotation, (0.0));
ADD_PROPERTY(yRotation, (0.0));
ADD_PROPERTY(zRotation, (0.0));
- ADD_PROPERTY(xLoad, (0.0));
- ADD_PROPERTY(yLoad, (0.0));
- ADD_PROPERTY(zLoad, (0.0));
+ ADD_PROPERTY(xForce, (0.0));
+ ADD_PROPERTY(yForce, (0.0));
+ ADD_PROPERTY(zForce, (0.0));
ADD_PROPERTY(xMoment, (0.0));
ADD_PROPERTY(yMoment, (0.0));
ADD_PROPERTY(zMoment, (0.0));
diff --git a/src/Mod/Fem/App/FemConstraintRigidBody.h b/src/Mod/Fem/App/FemConstraintRigidBody.h
index 3f3b0a795a..73b15ca90a 100644
--- a/src/Mod/Fem/App/FemConstraintRigidBody.h
+++ b/src/Mod/Fem/App/FemConstraintRigidBody.h
@@ -51,9 +51,9 @@ public:
App::PropertyFloat xRotation;
App::PropertyFloat yRotation;
App::PropertyFloat zRotation;
- App::PropertyFloat xLoad;
- App::PropertyFloat yLoad;
- App::PropertyFloat zLoad;
+ App::PropertyFloat xForce;
+ App::PropertyFloat yForce;
+ App::PropertyFloat zForce;
App::PropertyFloat xMoment;
App::PropertyFloat yMoment;
App::PropertyFloat zMoment;
diff --git a/src/Mod/Fem/Gui/TaskFemConstraintRigidBody.cpp b/src/Mod/Fem/Gui/TaskFemConstraintRigidBody.cpp
index d86b879530..73025f46e6 100644
--- a/src/Mod/Fem/Gui/TaskFemConstraintRigidBody.cpp
+++ b/src/Mod/Fem/Gui/TaskFemConstraintRigidBody.cpp
@@ -86,9 +86,9 @@ TaskFemConstraintRigidBody::TaskFemConstraintRigidBody(
fStates[6] = pcConstraint->xRotation.getValue();
fStates[7] = pcConstraint->yRotation.getValue();
fStates[8] = pcConstraint->zRotation.getValue();
- fStates[9] = pcConstraint->xLoad.getValue();
- fStates[10] = pcConstraint->yLoad.getValue();
- fStates[11] = pcConstraint->zLoad.getValue();
+ fStates[9] = pcConstraint->xForce.getValue();
+ fStates[10] = pcConstraint->yForce.getValue();
+ fStates[11] = pcConstraint->zForce.getValue();
fStates[12] = pcConstraint->xMoment.getValue();
fStates[13] = pcConstraint->yMoment.getValue();
fStates[14] = pcConstraint->zMoment.getValue();
@@ -100,12 +100,12 @@ TaskFemConstraintRigidBody::TaskFemConstraintRigidBody(
ui->if_ref_node_x->setValue(fStates[0]);
ui->if_ref_node_y->setValue(fStates[1]);
ui->if_ref_node_z->setValue(fStates[2]);
- ui->if_ref_load_x->setValue(fStates[9]);
- ui->if_ref_load_y->setValue(fStates[10]);
- ui->if_ref_load_z->setValue(fStates[11]);
- ui->if_rot_load_x->setValue(fStates[12]);
- ui->if_rot_load_y->setValue(fStates[13]);
- ui->if_rot_load_z->setValue(fStates[14]);
+ ui->if_ref_force_x->setValue(fStates[9]);
+ ui->if_ref_force_y->setValue(fStates[10]);
+ ui->if_ref_force_z->setValue(fStates[11]);
+ ui->if_rot_force_x->setValue(fStates[12]);
+ ui->if_rot_force_y->setValue(fStates[13]);
+ ui->if_rot_force_z->setValue(fStates[14]);
ui->lw_references->clear();
for (std::size_t i = 0; i < Objects.size(); i++) {
@@ -296,29 +296,29 @@ double TaskFemConstraintRigidBody::get_zRefNode() const
{
return ui->if_ref_node_z->rawValue();
}
-double TaskFemConstraintRigidBody::get_xLoad() const
+double TaskFemConstraintRigidBody::get_xForce() const
{
- return ui->if_ref_load_x->rawValue();
+ return ui->if_ref_force_x->rawValue();
}
-double TaskFemConstraintRigidBody::get_yLoad() const
+double TaskFemConstraintRigidBody::get_yForce() const
{
- return ui->if_ref_load_y->rawValue();
+ return ui->if_ref_force_y->rawValue();
}
-double TaskFemConstraintRigidBody::get_zLoad() const
+double TaskFemConstraintRigidBody::get_zForce() const
{
- return ui->if_ref_load_z->rawValue();
+ return ui->if_ref_force_z->rawValue();
}
double TaskFemConstraintRigidBody::get_xMoment() const
{
- return ui->if_rot_load_x->rawValue();
+ return ui->if_rot_force_x->rawValue();
}
double TaskFemConstraintRigidBody::get_yMoment() const
{
- return ui->if_rot_load_y->rawValue();
+ return ui->if_rot_force_y->rawValue();
}
double TaskFemConstraintRigidBody::get_zMoment() const
{
- return ui->if_rot_load_z->rawValue();
+ return ui->if_rot_force_z->rawValue();
}
// TODO: This needs to be implemented
bool TaskFemConstraintRigidBody::get_DefineRefNode() const
@@ -394,17 +394,17 @@ bool TaskDlgFemConstraintRigidBody::accept()
name.c_str(),
parameters->get_zRefNode());
Gui::Command::doCommand(Gui::Command::Doc,
- "App.ActiveDocument.%s.xLoad = %f",
+ "App.ActiveDocument.%s.xForce = %f",
name.c_str(),
- parameters->get_xLoad());
+ parameters->get_xForce());
Gui::Command::doCommand(Gui::Command::Doc,
- "App.ActiveDocument.%s.yLoad = %f",
+ "App.ActiveDocument.%s.yForce = %f",
name.c_str(),
- parameters->get_yLoad());
+ parameters->get_yForce());
Gui::Command::doCommand(Gui::Command::Doc,
- "App.ActiveDocument.%s.zLoad = %f",
+ "App.ActiveDocument.%s.zForce = %f",
name.c_str(),
- parameters->get_zLoad());
+ parameters->get_zForce());
Gui::Command::doCommand(Gui::Command::Doc,
"App.ActiveDocument.%s.xMoment = %f",
name.c_str(),
diff --git a/src/Mod/Fem/Gui/TaskFemConstraintRigidBody.h b/src/Mod/Fem/Gui/TaskFemConstraintRigidBody.h
index 1c94bcc11b..24642d2f93 100644
--- a/src/Mod/Fem/Gui/TaskFemConstraintRigidBody.h
+++ b/src/Mod/Fem/Gui/TaskFemConstraintRigidBody.h
@@ -45,9 +45,9 @@ public:
double get_xRefNode() const;
double get_yRefNode() const;
double get_zRefNode() const;
- double get_xLoad() const;
- double get_yLoad() const;
- double get_zLoad() const;
+ double get_xForce() const;
+ double get_yForce() const;
+ double get_zForce() const;
double get_xMoment() const;
double get_yMoment() const;
double get_zMoment() const;
diff --git a/src/Mod/Fem/Gui/TaskFemConstraintRigidBody.ui b/src/Mod/Fem/Gui/TaskFemConstraintRigidBody.ui
index 2ea39976dd..7aa6cec178 100644
--- a/src/Mod/Fem/Gui/TaskFemConstraintRigidBody.ui
+++ b/src/Mod/Fem/Gui/TaskFemConstraintRigidBody.ui
@@ -147,23 +147,23 @@
-
-
+
- Load on Reference Node
+ Force on Reference Node
-
-
+
-
-
+
X:
-
-
+
0 N
@@ -176,14 +176,14 @@
-
-
+
Y:
-
-
+
0 N
@@ -196,14 +196,14 @@
-
-
+
Z:
-
-
+
0 N
@@ -231,28 +231,28 @@
-
-
+
Moment on Rotation Node
-
-
+
-
-
+
X:
-
-
+
- 0 N mm
+ 0 N*m
- N mm
+ N*m
0.000000000000000
@@ -260,19 +260,19 @@
-
-
+
Y:
-
-
+
- 0 N mm
+ 0 N*m
- N mm
+ N*m
0.000000000000000
@@ -280,19 +280,19 @@
-
-
+
Z:
-
-
+
- 0 N mm
+ 0 N*m
- N mm
+ N*m
0.000000000000000