Commit Graph

54 Commits

Author SHA1 Message Date
André Kapelrud
39a5fdc315 Base: Add surface charge density unit 2025-01-22 11:17:59 -03:00
Ladislav Michl
2ea8a633ac Base: Quantity: return std::string 2024-12-23 17:48:42 +01:00
David Carter
7e1b1abddd Materials: Change display of Quantity values
The default display type of quantity objects is fixed point resulting
in insufficient accuracy when changing unit systems, or when the values
are small. This fix changes the default format from 'Fixed' to the more
apt 'Default' format. This allows the displayed values to scale as
appropriate.

Fixes #18149
2024-12-20 11:31:43 -05:00
marioalexis
7550d54a01 Base: Add electromagnetic potential unit 2024-12-13 11:49:44 -05:00
wmayer
5771c94523 App: Apply clang format (part 2) 2024-11-21 21:17:42 +01:00
FEA-eng
4c0ae6122f Base: Add moment unit 2024-05-16 12:51:37 -05:00
marioalexis
0b76757b8a App: Add StiffnessDensity property 2024-01-26 13:44:16 -03:00
berniev
de1acd926e simplifying a function
Dramatic simplification of legacy code by separating code and data and applying some later C++.
Function removed from Application.cpp as it was in a anonymous namespace and could not easily be subjected to unit testing.
Added ProgramOptionsUtilities.h
2023-04-07 12:37:05 +02:00
Uwe
33f336ddd9 [App] sort properties
- to keep better the overview
2023-02-26 18:07:41 +01:00
Uwe
2a098b1471 [Core] add missing velocity property
- fixes compilation because declared in header but no code
- also sort the properties to keep the overview
2023-02-26 16:38:02 +01:00
Oliver Oxtoby
9d5ab79a4c [App] [Base] Add missing Property classes for all Units (#6717)
- Add missing Property classes for all Units
- Add missing units to unit calculator, as well as some missing string representations
- also change units used for dynamic viscosity to the customary Pa*s
2023-02-26 15:28:28 +01:00
Uwe
201b95a5b2 [Core] add quantity Magnetization
- needed for FEM and Material
2023-02-08 20:33:58 +01:00
Uwe
82b6e03625 [FEM] add current density constraint
- also add corresponding App::PropertyCurrentDensity

- also fix a typo in test_object.py
2023-02-05 21:10:15 +01:00
berniev
b40de7a509 remove redundant void 2022-07-31 10:27:44 +02:00
Uwe
790bf5363e [App] sort properties
- to quickly get an overview
2022-07-30 17:34:36 +02:00
wmayer
c7c43fcf4b Core: fix minor issues:
+ fix issues found by clang's clazy tool
+ fix cppcoreguidelines-pro-type-member-init
  * Make sure that all class members are initialized in the constructor
2022-06-30 16:31:16 +02:00
Uwe
d286b52b57 [App] add property for electric potentials
- in preparation to fix the electrostatic simulation mess
2022-03-26 01:39:32 +01:00
wmayer
e4435cdcba 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
c7910825a3 [App] Placement and Property: remove unused includes 2022-02-24 01:09:00 +01:00
Preslav
d7ac25e3cf Ammending stiffness units 2021-09-17 11:08:08 +02:00
luz paz
fc6d1292d1 App: remove Py2 code from several src/App .cpp files 2021-04-19 15:27:06 +02:00
wmayer
48b42f8355 App: add convenience methods to get minimum, maximum and step size of property constraints 2021-03-03 08:12:03 +01:00
Bernd Hahnebach
fe93f6027e App: properties, add vacuum permittivity 2020-06-29 17:46:41 +02:00
luz.paz
4f308dc03c src/App: [skip ci] fix header uniformity
This PR fixes header uniformity across all `src/App` files
2019-12-25 11:38:43 +01:00
wmayer
3500451a04 Basic support for Frequency as unit 2019-10-20 18:14:56 +02:00
wmayer
b50b21576e 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
Zheng, Lei
93e60caa35 PropertyExpressionEngine: convert to link type property
PropertyExpressionEngine is changed to derived from a new class
PropertyExpressionContainer, which is in turn derives from
PropertyXLinkContainer. This makes PropertyExpressionEngine a link type
property that is capable of external linking. It now uses the unified
link property APIs for dependency management and tracking of object
life time, re-labeling, etc.

ObjectIdentifier is modified to support sub-object reference, but is
not exposed to end-user, because expression syntax is kept mostly
unchanged, which will be submitted in future PR. There is, however,
one small change in expression syntax (ExpressionParser.y) to introduce
local property reference to avoid ambiguity mentioned in
FreeCAD/FreeCAD#1619

Modified Expression/ExpressionModifier interface to support various link
property API for link modification.
2019-08-17 14:52:09 +02:00
Oliver Oxtoby
de282ad5ce Base: Make units of PropertyQuantity settable from Python code
The previous implementation did not allow the unit to be set after it
is initialised by the default constructor - this fix makes it possible
to set the unit by explicitly assigning a Unit object.
2018-08-11 16:12:17 +02:00
wmayer
51c6ca053a support to assign long to Quantity with Py2 2017-06-28 23:12:00 +02:00
looooo
ca3e58e2f3 py3: App: files D-Z ported to python3
issue 0000995
diff to py3-branch will remain in the following files in src/App:
- ExtensionContainer.cpp
- FeaturePythonPyImp.h +.inl
most likely these files depend on Tools and Base
2017-05-11 19:19:17 +02:00
wmayer
1673ab801e use specialized exception classes 2017-04-28 18:49:11 +02:00
Yorik van Havre
35811f7e3c Added new property type App::PropertyVolume 2016-10-04 16:02:30 -03:00
wmayer
71df967fdf fix -Wextra in FreeCADApp 2016-09-21 16:05:36 +02:00
Yorik van Havre
ab803c7b40 Added App::PropertyArea (same as PropertyLength but uses Area units) 2016-08-29 19:26:11 -03:00
wmayer
e4768c1c75 + fix clang warning: -Woverloaded-virtual 2015-10-02 20:42:16 +02:00
Mateusz Skowroński
43a4a5938c Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
Eivind Kvedalen
ddc22a4101 Added setValue/getValue/canonicalPath/getPaths/verifyPath methods to various Property classes. 2015-09-21 14:51:03 +02:00
wmayer
c9ab183bf4 + set DBL_MAX as maximum for units 2014-11-24 14:30:50 +01:00
wmayer
8fb596221f + fixes #0001794: new defined as a macro sometimes conflicts with boost 2014-10-22 12:39:43 +02:00
wmayer
0a986ddca6 + give more information when assigning wrong type to quantity property 2014-07-07 13:56:23 +02:00
wmayer
30e5321e76 + fix whitespaces and a few minor things 2014-05-12 14:14:23 +02:00
Stefan Tröger
58a781e5c4 add inputfield to property editor for PropertyQuantity and PropertyQuantityConstraint 2014-05-12 09:40:14 +02:00
jriegel
1d5cfbc9cc PropertyUnits takes Unicode python strings 2014-02-16 22:19:58 +01:00
jriegel
0fbe570f9e switch the physical Properties to Quantity and add Pressure and Force 2014-02-16 22:19:56 +01:00
wmayer
5b9f076c53 + remove unneeded methods from PropertyLength 2014-02-13 17:24:03 +01:00
wmayer
893a5d3a86 + PropertyLength inherits PropertyQuantity 2014-02-13 17:03:48 +01:00
wmayer
e9b275c7e6 + support loading projects with old pad features, fix critical bug where the unit gets replaced 2014-02-12 15:14:02 +01:00
jriegel
401cb13035 Switching Quantity parser to UTF8 2013-12-09 23:50:52 +01:00
jriegel
feeb053e18 Objects for Results of FEM analysis 2013-11-27 20:14:58 +01:00
jriegel
44c07da571 integrate Quantities into PropertyView and activate preferences again 2013-09-25 21:59:24 +02:00