Commit Graph

50 Commits

Author SHA1 Message Date
Oliver Oxtoby
9e388ab0a8 Base: Remove extraneous bracket from string representation of kinematic viscosity units in MKS schema 2022-05-11 08:09:46 +02:00
Stefan Brüns
4d63de1fe7 Base: Fix wrong character encoding for micro-siemens
Contrary to any other Unit with micro prefix (e.g. ug, uH, uF) the
string was created with a Latin1 encoding instead of UTF-8.

The problem can be verified with these python statements:
```
FreeCAD.Units.schemaTranslate(FreeCAD.Units.MicroSiemens, 0)
FreeCAD.Units.schemaTranslate(FreeCAD.Units.MicroGram, 0)
```
2022-03-06 11:20:09 -05:00
Uwe
4d0a5c045c [Base] Units and Uui: remove unused includes 2022-02-24 11:08:56 +01:00
Preslav
5030d8bb6d Added stiffness units to FreeCAD [mN/m, N/m, kN/m, MN/m] 2021-08-16 12:27:41 +01:00
donovaly
6c67300d62 [Base] add electrical conductivity
- this is necessary to perform electrodynamics simulations. Since the typical values are in the range of 1e6 S/m, we need the new units kS and MS

- since this is for simulations, also add electrical conductivity to the FEM material cards
2021-03-25 17:13:52 +01:00
wmayer
94dbcc83ce PVS: V517 The use of 'if (A) {...} else if (A) {...}' pattern was detected. 2020-07-18 10:59:27 +02:00
qingfengxia
c6364c823a Base: add VolExpansionCoeff and complete KinematicViscosity unit 2020-05-23 00:03:09 +02:00
wmayer
e14e5b845e [skip ci] use QLocale class consistently to make it possible to change it application-wide 2020-03-26 16:37:45 +01:00
donovaly
d1b354fc6b add units Gauss, Weber and Oersted 2020-01-07 07:36:22 -03:00
donovaly
68ea38cc8d add the units Ohm and Siemens 2020-01-05 15:00:46 +01:00
luz.paz
011e5aedfa src/Base: [skip ci] fix header uniformity
This PR fixes header uniformity across all `src/Base` files
2019-12-25 11:38:58 +01:00
donovaly
b255475d7c missing parts from from commit 33b8054228
- also add keV and MeV since these are the units used in practice
2019-12-24 13:31:00 +01:00
donovaly
a6a043a6f2 also add unit THz as requested 2019-12-23 16:49:45 +01:00
wmayer
a81e7ff747 Base: [skip ci] handle acceleration and force m/s^2 2019-12-20 16:53:26 +01:00
donovaly
26196ae612 add mJ and kW
- also some fixes
- add conversions for forces
2019-12-19 13:31:12 +01:00
donovaly
23ec305c4b correct Unit::Work conversions
- also add conversions for Unit::Mass and Unit::Power
2019-12-19 13:31:12 +01:00
donovaly
53b34a3dc0 take care of the UnitsCalculator
- also fix uF and uH
- add conversion routine for C and T
2019-12-19 13:31:12 +01:00
donovaly
4b99ee28ce generate QuantityLexer.c
- also set proper unit conversions
- fix MilliWatt and MilliMole
2019-12-19 13:31:12 +01:00
donovaly
94bae36cee add the following units:
- mmol
- ml
- bar
- mbar
- kJ
- kWh
- eV
- C
- T
- F (p, n, u, m)
- H (n, u, m)
2019-12-19 13:31:12 +01:00
wmayer
617a8d7598 Support for Frequency in quantity parser 2019-10-21 11:49:55 +02:00
luz.paz
c7785267a7 Misc. typos and whitespace
Found via `codespell -q 3 --skip="*.po,*.ts,./.git,./src/3rdParty,./src/CXX,./src/zipios++,./src/Mod/Assembly/App/opendcm,./ChangeLog.txt" -I ../fc-word-whitelist.txt` and `grep`. Excess whitespace auto-removed by Atom editor.
2018-11-03 16:13:06 -03:00
wmayer
b1bfb62583 add derived unit electric potential 2017-10-16 21:56:13 +02:00
Harald Geyer
f50a19df2f Fix rendering of Unit::ThermalConductivity
The old behaviour was:
>>> Quantity('0.9 W/m/K').UserString
u'0.00 W/mm/K'
>>> Quantity('1.1 W/m/K').UserString
u'1.10 W/m/K'
>>> Quantity('1100 W/m/K').UserString
u'1100.00 W/m/K'

The new behaviour is:
>>> Quantity('0.9 W/m/K').UserString
u'0.90 W/m/K'
>>> Quantity('1.1 W/m/K').UserString
u'1.10 W/m/K'
>>> Quantity('1100 W/m/K').UserString
u'1.10 W/mm/K'
2017-10-10 20:35:33 +02:00
Oliver Oxtoby
890a7bf814 Base: Fixes in MKS units schema
- Change default unit for Length, if out of range of scaling, to m
- Add density scaling as in Internal schema (avoids density always displaying in kg/mm^3)
- Change velocity to m/s rather than mm/s
2017-08-20 16:50:26 +02:00
Oliver Oxtoby
f93bdfb927 Base: Add DynamicViscosity and SpecificEnergy units 2017-08-20 16:50:11 +02:00
wmayer
6ae540b053 fixes #0003137: Unit UserString wrong 2017-07-24 16:52:03 +02:00
wmayer
c8084ac5c5 quantities must be expressed in units m,g,s for MKS and internal scheme 2017-06-18 23:43:42 +02:00
Itai Nahshon
a42391fa3b Add Units schemaTranslate for Unit::Velocity.
Independent of scale, use only mm/min or in/min because it is compatible
with GCODE feed rate units.
(My use case is definition os feed-rates in PathLoadTool.py).
2017-06-18 17:11:49 +02:00
vdwalts
59ac40a584 Base: Units for FEM, new heat and heat flux functions 2016-12-21 11:27:41 -02:00
wmayer
61b62ee314 add class QuantityFormat to control user string of Quantity
do some code refactoration to reduce duplicate code
2016-08-06 19:06:29 +02:00
wmayer
f8dc307820 fix bug in factor for Pa in units system 2016-08-05 13:57:27 +02:00
wmayer
1e6981b089 use the unicode symbol for mu 2016-08-05 10:38:33 +02:00
wmayer
787cfc660d use const reference in schemaTranslate to avoid tmp. copy 2016-08-05 10:33:41 +02:00
wmayer
1783528282 improve whitespaces, fix typos 2016-08-05 10:00:12 +02:00
vdwalts
a42fd4b1fb Base: Units: add units for thermomechanical analysis 2016-08-04 17:45:04 +02:00
WandererFan
de7b7e50ab Use Units Decimals pref in Quantity::getUserString 2016-07-21 12:55:39 -04:00
Przemo Firszt
dc0ab6f20e Base: Handle Unit::Stress tha same way as Unit::Pressure in UnitsSchema
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-05-18 16:43:45 +01:00
Przemo Firszt
8f8ed63119 Base: Fix GPa/MPa units in UnitsSchemaMKS.cpp
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-05-18 16:37:09 +01:00
Yorik van Havre
677ee978e4 Added a couple of missing units in MKS schema 2014-08-04 19:16:10 -03:00
jriegel
bb8fcd2bf3 Using Locale delimiter 2014-02-10 21:25:53 +01:00
jriegel
b7ae0dddff More choices in Sketcher grid and later switching to um 2013-12-21 19:15:28 +01:00
jriegel
0470ad002b Try to fix std::abs() error... 2013-12-16 00:20:47 +01:00
jriegel
491643ab60 fix negative value cascading in unti schemas 2013-12-16 00:02:58 +01:00
jriegel
16c6fe2470 Add unti support to Sketcher 2013-12-15 22:47:47 +01:00
jriegel
21c517eff0 Some fixes in unit system 2013-12-08 19:48:13 +01:00
jriegel
69a4bbc46a Implement the three major unit system schemas 2013-12-05 18:16:31 +01:00
jriegel
6ff12d9a4b new userString methode 2013-12-03 19:03:12 +01:00
jriegel
87c8d5b022 Switching the UnitsApi to the new Quantity system 2013-12-03 19:03:08 +01:00
jriegel
c8cc4a179a integrate Quantities into PropertyView and activate preferences again 2013-09-25 21:59:24 +02:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00