Commit Graph

38 Commits

Author SHA1 Message Date
bofdahof
2e0df80e84 Base: Units: refactor
Refactor Units making it constexpr, immutable, with repetition reduced.
Separate data from code.

Constexpr constructed units allow constructing predefined Quantities
from predefined unit types.
2025-06-03 09:31:38 +02:00
Ladislav Michl
8ba8c04b20 Base: remove explicit namespace-name qualifier from *PyImp.cpp
Explicit Base namespace-name is used randomly across PyImp sources.
Remove it.
2025-04-27 00:05:32 +02:00
Ladislav Michl
3769dfd338 Base: cleanup includes in *PyImp.cpp
Sort includes and implicitely add missing ones. While there
consistently explain where generated files some from.
2025-04-27 00:05:32 +02:00
Ladislav Michl
99f86bd40a Base, Gui: remove lefovers from xml -> pyi conversion 2025-04-25 11:57:24 +02:00
Ladislav Michl
0b3adee2ab Base: Quantity: return std::string 2024-12-23 17:48:42 +01:00
Ladislav Michl
379d7ea9d5 Base: Units: return std::string 2024-12-23 17:48:42 +01:00
Ladislav Michl
539b7d43cf Base: Units: hide internals 2024-12-23 17:48:42 +01:00
Ladislav Michl
3a25a66a05 Base: Do not use else before return 2024-01-21 16:14:12 +01:00
wmayer
276bbcad6e fix readability-*:
* readability-uppercase-literal-suffix
* readability-named-parameter
2023-11-16 01:22:08 +01:00
wmayer
985def3416 Base: apply clang format 2023-11-13 12:01:26 -05:00
wmayer
097d5d6fee Base: C++ core guidelines: init variables 2023-08-24 18:48:52 +02:00
wmayer
59760c723f Base: modernize C++: return braced init list 2023-08-18 00:36:24 +02:00
wmayer
bec323b793 Base: cosmetic changes 2022-05-12 17:49:55 +02:00
wmayer
3945dc0f74 Base: only handle Base::ParserError exceptions for quantity expressions 2022-01-22 01:15:12 +01:00
wmayer
c563198b35 Base: remove some more deprecated Py2 code
and remove deprecated void from function signature and replace 0 or NULL with nullptr
2021-04-26 10:29:48 +02:00
luz paz
59b7e9fdd0 Base: remove Py2 code 2021-04-26 09:23:58 +02:00
luz paz
01b21e0d06 Base: Fix header uniformity, whitespace, and doxygen
[skip ci]
2020-11-22 18:12:16 +01:00
wmayer
4538963192 Python: [skip ci] change order of supported arguments in UnitPy::PyInit 2020-05-27 22:03:05 +02:00
wmayer
147b8404b4 Python: [skip ci] exception handling in PyInit to avoid to close application 2020-05-26 22:55:07 +02:00
luz.paz
ae72e2c762 Trivial code formatting for some {.cpp,.h} files 2020-04-06 12:55:27 +02:00
wmayer
4539bd90b7 handle possible exceptions for FreeCAD.Units.Unit(input string) 2019-11-03 19:01:27 +01:00
wmayer
fb27265934 Expose some standard units and quantities to Python 2019-02-12 15:12:19 +01:00
wmayer
1106404b1e implement true divide handler of the number protocol for Quantity 2018-10-27 15:27:27 +02:00
wmayer
c9f25d75d3 fix typo 2018-03-11 18:34:18 +01:00
Yorik van Havre
d4b7100bb2 py3: Base: files R-Z ported to python3
issue 0000995
2017-05-21 12:35:41 +02:00
wmayer
39e589a4d7 fix -Wextra in FreeCADBase 2016-09-21 15:02:02 +02:00
wmayer
b3c7d8b3b4 improve whitespaces 2016-07-17 12:46:46 +02:00
Sebastian Hoogen
8234d97dd5 bugfix in unit parser
partly revert to 810fadab23
and change python string handling to "et" method
2014-10-05 14:44:04 -03:00
Sebastian Hoogen
59596bb6b0 fixes #1744 Use unicode in Unit system 2014-09-20 08:58:06 +02:00
wmayer
ed4729dac1 + extend number protocol 2014-02-14 13:53:47 +01:00
wmayer
8c354c7635 + extend number protocol 2014-02-14 13:45:56 +01:00
wmayer
438b6d4681 + extend number protocol 2014-02-14 12:46:30 +01:00
jriegel
59fcfa9eb3 Fix another one.... 2013-12-16 00:26:47 +01:00
jriegel
16c6fe2470 Add unti support to Sketcher 2013-12-15 22:47:47 +01:00
jriegel
f265f551c2 Switching Quantity parser to UTF8 2013-12-09 23:50:52 +01:00
jriegel
b16190181b some fixes and comparison interface for Unit and Quantity python objects 2013-12-06 00:06:58 +01:00
jriegel
bf3371a95d implementing Quantity further 2013-09-10 18:27:24 +02:00
jriegel
8d53370ffe Start new Unit and Quantity system 2013-08-11 23:03:34 +02:00