Ammending stiffness units

This commit is contained in:
Preslav
2021-08-31 11:23:01 +01:00
committed by Bernd Hahnebach
parent 0327a09879
commit 354987b45d
3 changed files with 32 additions and 0 deletions

View File

@@ -324,6 +324,18 @@ PropertyPressure::PropertyPressure()
setUnit(Base::Unit::Pressure);
}
//**************************************************************************
//**************************************************************************
// PropertyStiffness
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
TYPESYSTEM_SOURCE(App::PropertyStiffness, App::PropertyQuantity)
PropertyStiffness::PropertyStiffness()
{
setUnit(Base::Unit::Stiffness);
}
//**************************************************************************
//**************************************************************************
// PropertyForce

View File

@@ -227,6 +227,18 @@ public:
virtual ~PropertyPressure(){}
};
/** Stiffness property
* This is a property for representing stiffness. It is basically a float
* property. On the Gui it has a quantity like m/s^2.
*/
class AppExport PropertyStiffness: public PropertyQuantity
{
TYPESYSTEM_HEADER();
public:
PropertyStiffness(void);
virtual ~PropertyStiffness(){}
};
/** Force property
* This is a property for representing acceleration. It is basically a float
* property. On the Gui it has a quantity like m/s^2.

View File

@@ -187,6 +187,10 @@ QString UnitsSchemaImperialDecimal::schemaTranslate(const Base::Quantity& quant,
unitString = QString::fromLatin1("psi");
factor = 6.894744825494;
}
else if (unit == Unit::Stiffness) {
unitString = QString::fromLatin1("lbf/in");
factor = 4.448222/0.0254;
}
else if (unit == Unit::Velocity) {
unitString = QString::fromLatin1("in/min");
factor = 25.4 / 60;
@@ -360,6 +364,10 @@ QString UnitsSchemaImperialCivil::schemaTranslate(const Base::Quantity& quant, d
unitString = QString::fromLatin1("psi");
factor = 6.894744825494;
}
else if (unit == Unit::Stiffness) {
unitString = QString::fromLatin1("lbf/in");
factor = 4.448222/0.0254;
}
else if (unit == Unit::Velocity) {
unitString = QString::fromLatin1("mph");
factor = 447.04; //1mm/sec => mph