Commit Graph

72 Commits

Author SHA1 Message Date
0penBrain
caa4784550 Base: fix quantity construction when unit as string is empty 2022-04-02 18:09:35 +02:00
Chris Hennes
b5c72abee4 Base: PR6497 move return statement to new line 2022-03-29 12:34:34 -05:00
wmayer
4a343ab31e Base/App: fix warnings from code analysers:
* convert old-style-casts to explicit C++ casts where possible
* make some implicit conversions explicit
2022-03-06 23:49:30 +01:00
Uwe
686a025416 [Base] Quantity, Rotation, Stream: remove unused includes 2022-03-01 11:27:54 +01:00
wmayer
cad0d01883 Base: modernize C++11
* remove redundant void-arg
* use nullptr
* replace deprecated headers
2022-01-25 20:21:30 +01:00
wmayer
3945dc0f74 Base: only handle Base::ParserError exceptions for quantity expressions 2022-01-22 01:15:12 +01:00
0penBrain
66c513c698 [Core] Fix Quantity construction with value as double + unit as string 2022-01-21 14:56:11 +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
wmayer
e4f98b4512 Base: add convenience functions to create a QString from quantity or double 2021-04-20 14:07:20 +02: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
David Carter
6c57cebc9b Base: fixes #0004586: Conversion error for PoundForce (lbf) 2021-03-03 12:39:49 +01:00
luz paz
01b21e0d06 Base: Fix header uniformity, whitespace, and doxygen
[skip ci]
2020-11-22 18:12:16 +01:00
Cyril Waechter
b926149363 Fix comment in Quantity.cpp 2020-07-11 19:37:47 +02:00
luz.paz
ae72e2c762 Trivial code formatting for some {.cpp,.h} files 2020-04-06 12:55:27 +02:00
donovaly
d1b354fc6b add units Gauss, Weber and Oersted 2020-01-07 07:36:22 -03:00
donovaly
317c153494 Quantity.cpp: fix spacing 2020-01-05 15:00:46 +01: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
wmayer
2484cd56ef Units: extend parser to accept mph, sqft and cft. Fix a bug in imperial civil schema 2019-12-23 19:55:21 +01:00
donovaly
a6a043a6f2 also add unit THz as requested 2019-12-23 16:49:45 +01:00
donovaly
edd97de6a2 add units Mpsi, cal and kcal
- also ass missing parts from commit 0021efbf
2019-12-23 16:49:45 +01:00
wmayer
e1b7ef10c7 add posibility to use a unit schema other then the system schema to represent a quantity 2019-12-21 13:35:14 +01:00
donovaly
26196ae612 add mJ and kW
- also some fixes
- add conversions for forces
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
Zheng, Lei
1efadc928e Base: improve base python object number protocol 2019-09-28 15:30:23 +02:00
wmayer
9fa56345cf core system
force strict ISO C++ (-Wpedantic)
TODO: still a lot of variadic macros are not valid ISO C++
2019-09-18 01:01:14 +02:00
wmayer
5c9d30b25a use NaN for invalid quantities instead of DOUBLE_MIN 2019-09-16 18:00:24 +02:00
Yorik van Havre
b5a3d28fee Doxygen tweaks 2019-07-17 18:01:56 -03:00
wmayer
5ae635ac64 fix various flaws detected by PVS 2019-03-01 22:52:41 +01:00
wandererfan
fefe83ecbb Add ImperialCivil Units Schema
- units for civil engineering - ft, ft2, ft3, mph,
  and angles as degrees/minutes/seconds
2018-12-06 08:57:17 -03:00
wmayer
9e8be1aa23 extend QuantityFormat to set denominator independent of user settings 2018-09-17 12:38:46 +02:00
hokieengr
f8dcd64fa2 Added support for fractional inch user setting. 2018-09-17 10:32:04 +02:00
wmayer
0260370b65 + add option to switch off precompiled header 2018-07-25 20:17:11 +02:00
wmayer
8e0a6cb832 fix conversion factors for psi and ksi 2018-03-31 15:43:16 +02:00
luz.paz
327957110a Misc. comment typos 2018-01-14 12:11:35 -02:00
wmayer
13b3abef35 direct support of Volt in units framework 2017-09-04 12:08:29 +02:00
wmayer
fb7094bf31 use specialized exception classes 2017-04-28 18:49:11 +02:00
wmayer
a7539e2c97 fix various warnings 2017-02-02 20:42:56 +01:00
wmayer
e0a89c17d2 fix & suppress warnings of generated code 2016-12-30 13:31:31 +01:00
wmayer
47b41a7883 fixes #0002460: Use keyword 'explicit' for Quantity constructor 2016-11-05 23:21:42 +01: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
Eivind Kvedalen
d62f9425fb Quantity: Added -= and += operators. 2016-04-02 12:01:04 +02:00
Eivind Kvedalen
337bd00de0 Added Quantity::operator>(...). 2015-02-13 21:53:58 +01:00
jriegel
eb8c06aaa3 clean up number scanner in Units 2014-08-03 17:24:42 +02:00
wmayer
d422b146b0 + fixes #0001619: Python script generating 3D model works in V0.13, error in V0.14 2014-07-27 14:08:31 +02:00
wmayer
cc016c9365 + fixes #0001409: implement FreeCAD.Units.Quantity().__float__() 2014-02-14 14:50:01 +01:00
jriegel
8da9922f18 fix user preferred 2013-12-10 23:32:25 +01:00