Added stiffness units to FreeCAD [mN/m, N/m, kN/m, MN/m]

This commit is contained in:
Preslav
2021-08-11 21:18:10 +01:00
committed by Preslav Aleksandrov
parent 09d9caf438
commit 4ab37fc0ca
14 changed files with 454 additions and 342 deletions

View File

@@ -169,6 +169,25 @@ QString UnitsSchemaMKS::schemaTranslate(const Quantity &quant, double &factor, Q
factor = 0.001;
}
}
else if ((unit == Unit::Stiffness)) {
if (UnitValue < 1){// mN/m is the smallest
unitString = QString::fromLatin1("mN/m");
factor = 1e-3;
}
if (UnitValue < 1e3) {
unitString = QString::fromLatin1("N/m");
factor = 1.0;
}
else if (UnitValue < 1e6) {
unitString = QString::fromLatin1("kN/m");
factor = 1e3;
}
else {
unitString = QString::fromLatin1("MN/m");
factor = 1e6;
}
}
else if (unit == Unit::ThermalConductivity) {
if (UnitValue > 1000000) {
unitString = QString::fromLatin1("W/mm/K");