Commit Graph

43 Commits

Author SHA1 Message Date
Kacper Donat
13fbab9e42 Base: Move App::Color to Base
Every basic data type is stored in Base module, color is standing out as
one that does not. Moving it to Base opens possibilities to integrate it
better with the rest of FreeCAD.
2025-02-17 21:10:26 +01:00
Kacper Donat
954b729b56 Gui: Use getObject<T>() helpers in classes
This commit is generated using regex based find and replace:

```
s/[\w:]+_cast\s*<([^>]+)\*>\s*\(\s*getObject\(\s*\)\)/getObject<$1>/
s/[\w:]+_cast\s*<([^>]+)\*>\s*\(\s*([^)]*)\s*->\s*getObject\(\s*\)\)/$2->getObject<$1>()/
```

To regenerate if needed.
2024-12-06 18:29:39 +01:00
marioalexis
0cee0e9f50 Fem: Save and restore custom colors of elements in mesh - fixes #6131 2024-05-06 17:53:39 +02:00
Ladislav Michl
d95b56137b Base: Implement TimeElapsed
Some instances of TimeInfo serve the sole purpose of measuring time
duration. Using system time is unfortunate as it returns wall clock,
which is not guaranteed to be monotonic. Replace such a usage with
the new TimeElapsed class based on steady clock.
2024-03-05 12:29:24 +01:00
wmayer
3863cff6c0 Fem: Apply clang-format 2023-09-25 14:50:43 +02:00
wmayer
9383d2d0aa Fem: modernize C++: return braced init list 2023-08-19 11:35:41 +02:00
wmayer
89b9a7ae0f FEM: modernize C++: use range-based for loop 2023-08-15 01:09:53 +02:00
Uwe
6757d1e853 [FEM] ViewProviderFem*: remove unused includes
- also sort includes
2022-10-03 15:01:37 +02:00
berniev
f4ffd15864 Mod: redundant void 2 2022-08-08 10:27:50 +02:00
wmayer
6e80ffaec3 Fem: remove some superfluous const_cast 2022-06-24 19:43:33 +02:00
wmayer
f5235a8057 cppcoreguidelines-pro-type-union-access
According to https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md using union for type-punning is undefined behaviour.
 Replace it with std::memcpy
2022-06-24 14:29:50 +02:00
wmayer
bde17e1b9f Fem: modernize C++11
* use nullptr
2022-03-23 19:26:15 +01:00
Uwe
ebff4fddcc [FEM] remove unused headers from WBs main files
- also some code style fixes by MSVC
2022-03-17 20:33:33 +01:00
wmayer
1f12dca2b4 Py: replace BaseExceptionFreeCADError with more suitable exception types 2022-03-17 13:54:23 +01:00
Bernd Hahnebach
11400c91e7 FEM: mesh view provider, expose some C++ methods to Python 2020-01-06 01:07:47 +01:00
Abdullah Tahiri
0382e2dd75 PCH: Fem Gui 2019-05-16 21:43:08 +02:00
wmayer
1fb55d8d0a fixes 0003618: FEM, GUI, mesh view provider, highlighted node show wrong node number on selection 2018-09-26 19:59:32 +02:00
Bernd Hahnebach
a6da52323e FEM: set mesh color, use proper return values for python API 2017-08-02 12:45:15 +02:00
Kunda
f4b84e8963 FEM: source code typos, issue 0002914 2017-02-28 17:35:26 +01:00
looooo
1464152b56 py3: FEM, PyMods, preprocessor conditions, Py::Long vs Py::Int 2017-02-19 14:21:34 +01:00
wmayer
fcdaf5405c fix Coverity issues 2016-08-20 15:41:33 +02:00
Bernd Hahnebach
bf03c91781 FEM: code formating, replace tabulator with spaces 2016-08-15 21:39:01 +02:00
Bernd Hahnebach
3091fd5973 FEM: remove trailing whitespaces 2016-04-24 19:10:33 +02:00
wmayer
7150b168dc + fix crash in ViewProviderFemMesh::setHighlightNodes when values out of range 2015-07-12 10:47:57 +02:00
Przemo Firszt
53df1e1471 FEM: All FEM results are stored in a single object
Functionality previously provided by setNodeColorByResult is now
in setNodeColorByScalars. FemResult* object is no longer required,
the function accepts list of elements and a list of values.

Functionality previously provided by setNodeDisplacementByResult is now
in setNodeDisplacementByVectors. FemResult* object is no longer required,
the function accepts list of elements and a list of vectors.

A side effect: FemResultValues and FemResultVector are no longer used
and have bee removed.

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-06-24 17:44:02 +02:00
Przemo Firszt
6f472719e0 FEM: Rename animateNodes to applyDisplacementToNodes
Also animateNodes is now applyDisplacementToNodes.
The funcions are not doing animation, but are responsible
for deforming mesh.

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-06-02 11:35:34 +01:00
Sebastian Hoogen
af50cbf964 fixes #0001422: Subclass Exception
inherit Base.FreeCADError form RuntimeError
inherit Part.OCCError from Base.FreeCADError
inherit OCCDomainError from Part.OCCError
inherit OCCRangeError from Part.OCCError
inherit OCCConstructionError from OCCDomainError
inherit OCCDimensionError from OCCDomainError
Added PY_CATCH_OCC macro
replace PyExc_Exception
use FreeCADError in makeWireString
catch exception in BSplineCurve.increasedegree
2014-09-17 11:15:56 +02:00
wmayer
a50743041b + fix -Wnull-conversion, -Woverloaded-virtual, -Wlogical-not-parentheses, -Wsometimes-uninitialized 2014-08-26 19:14:13 +02:00
jriegel
17f1409d52 fix FEM result dialog 2014-04-14 03:17:37 +02:00
jriegel
ec79f534b6 Fix in color calculation 2014-04-13 18:03:04 +02:00
jriegel
7a71038d71 some fixes in Fem 2014-04-13 16:42:41 +02:00
jriegel
131e4c2568 Finish get nodes by surface 2014-02-09 17:55:35 +01:00
jriegel
506ef4f619 Increase Performance Postprocessing 2014-01-11 14:50:22 +01:00
jriegel
0bb6181049 Improving Post-Processeing performance 2014-01-11 14:50:08 +01:00
jriegel
fd62480958 Postprocessing: Color per Element at FemMesh 2013-12-31 13:52:13 +01:00
jriegel
7aef3c1aff fix in get visible faces 2013-12-02 20:35:12 +01:00
jriegel
8e1fe50100 Finish Displacement and animation of it. 2013-11-28 23:30:21 +01:00
jriegel
43951a0be0 Starting Displacement post-processing to the FemMesh ViewProvider 2013-11-28 19:52:58 +01:00
jriegel
327d8e7b53 Add Attribute to FemMeshViewProvider python class to get all visible FemMesh faces. 2013-11-17 13:08:45 +01:00
jriegel
f6830287e9 Fem Postprocessing set color on nodes 2013-09-11 20:00:51 +02:00
jriegel
48e10c4d48 Fix visual glich in Mesh and start proprocessing 2013-09-02 20:53:53 +02:00
jriegel
5fbd27db11 Nicer more informative Isostatic dialog 2013-08-15 22:50:09 +02:00
jriegel
3ac863200a Add python object for the FemMesh ViewProvider for later postprecessing capabilities 2013-08-04 20:39:08 +02:00