Fem: Update properties of ConstraintRigidBody
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -147,23 +147,23 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_ref_load">
|
||||
<widget class="QLabel" name="lbl_ref_force">
|
||||
<property name="text">
|
||||
<string>Load on Reference Node</string>
|
||||
<string>Force on Reference Node</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="f_layout_ref_load">
|
||||
<layout class="QFormLayout" name="f_layout_ref_force">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_ref_load_x">
|
||||
<widget class="QLabel" name="lbl_ref_force_x">
|
||||
<property name="text">
|
||||
<string>X:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="Gui::InputField" name="if_ref_load_x">
|
||||
<widget class="Gui::InputField" name="if_ref_force_x">
|
||||
<property name="text">
|
||||
<string>0 N</string>
|
||||
</property>
|
||||
@@ -176,14 +176,14 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lbl_ref_load_y">
|
||||
<widget class="QLabel" name="lbl_ref_force_y">
|
||||
<property name="text">
|
||||
<string>Y:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="Gui::InputField" name="if_ref_load_y">
|
||||
<widget class="Gui::InputField" name="if_ref_force_y">
|
||||
<property name="text">
|
||||
<string>0 N</string>
|
||||
</property>
|
||||
@@ -196,14 +196,14 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lbl_ref_load_z">
|
||||
<widget class="QLabel" name="lbl_ref_force_z">
|
||||
<property name="text">
|
||||
<string>Z:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="Gui::InputField" name="if_ref_load_z">
|
||||
<widget class="Gui::InputField" name="if_ref_force_z">
|
||||
<property name="text">
|
||||
<string>0 N</string>
|
||||
</property>
|
||||
@@ -231,28 +231,28 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_rot_load">
|
||||
<widget class="QLabel" name="lbl_rot_force">
|
||||
<property name="text">
|
||||
<string>Moment on Rotation Node</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="f_layout_rot_load">
|
||||
<layout class="QFormLayout" name="f_layout_rot_force">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_rot_load_x">
|
||||
<widget class="QLabel" name="lbl_rot_force_x">
|
||||
<property name="text">
|
||||
<string>X:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="Gui::InputField" name="if_rot_load_x">
|
||||
<widget class="Gui::InputField" name="if_rot_force_x">
|
||||
<property name="text">
|
||||
<string>0 N mm</string>
|
||||
<string>0 N*m</string>
|
||||
</property>
|
||||
<property name="unit" stdset="0">
|
||||
<string notr="true">N mm</string>
|
||||
<string notr="true">N*m</string>
|
||||
</property>
|
||||
<property name="quantity" stdset="0">
|
||||
<double>0.000000000000000</double>
|
||||
@@ -260,19 +260,19 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lbl_rot_load_y">
|
||||
<widget class="QLabel" name="lbl_rot_force_y">
|
||||
<property name="text">
|
||||
<string>Y:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="Gui::InputField" name="if_rot_load_y">
|
||||
<widget class="Gui::InputField" name="if_rot_force_y">
|
||||
<property name="text">
|
||||
<string>0 N mm</string>
|
||||
<string>0 N*m</string>
|
||||
</property>
|
||||
<property name="unit" stdset="0">
|
||||
<string notr="true">N mm</string>
|
||||
<string notr="true">N*m</string>
|
||||
</property>
|
||||
<property name="quantity" stdset="0">
|
||||
<double>0.000000000000000</double>
|
||||
@@ -280,19 +280,19 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lbl_rot_load_z">
|
||||
<widget class="QLabel" name="lbl_rot_force_z">
|
||||
<property name="text">
|
||||
<string>Z:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="Gui::InputField" name="if_rot_load_z">
|
||||
<widget class="Gui::InputField" name="if_rot_force_z">
|
||||
<property name="text">
|
||||
<string>0 N mm</string>
|
||||
<string>0 N*m</string>
|
||||
</property>
|
||||
<property name="unit" stdset="0">
|
||||
<string notr="true">N mm</string>
|
||||
<string notr="true">N*m</string>
|
||||
</property>
|
||||
<property name="quantity" stdset="0">
|
||||
<double>0.000000000000000</double>
|
||||
|
||||
Reference in New Issue
Block a user