Commit Graph

52 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
9fe130cd73 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
Krzysztof
988083d3f7 FEM: Restore and harmonize FEM Task selection hints (#23678)
* FEM: Add hint about selectable geometry types in 'Geometry reference selector'

* FEM: Harmonize selection hint in FEM Task dialogs

[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

FEM: Add translation support, correct selectable geometry

FEM: Harmonize selection hint in FEM Task dialogs

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-29 10:43:23 -05:00
Markus Reitböck
4baa3a5ee7 Fem: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
 should be considered an optimization, not a requirement. In particular, do not explicitly include a
 precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
 generated precompile header on the compiler command line instead. This is more portable across
 the major compilers and is likely to be easier to maintain. It will also avoid warnings being
 generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-23 00:51:00 +02:00
marioalexis
1ee44a3a38 Fem: Do not allow selection of external objects for analysis objects - fixes #23834 2025-09-22 10:38:01 -05:00
Ralf Habacker
5900b21fda Partial homogenization of FEM dialogs for constraints (#21538)
* FEM: Add context menu entry for clearing the reference list in constraints

See #6085

* FEM: Add 'Remove' button to python based dialogs for adding geometry references

See #6085
2025-06-09 10:51:36 -05:00
Benjamin Nauck
7c6db638c8 Fem: Add #include <limits> where used 2025-03-31 23:51:06 +02:00
Benjamin Nauck
e2da3bce46 FEM: Use std::numeric_limits and std::numbers instead of defines 2025-03-29 13:32:38 +01:00
bofdahof
1c4ecf576b FEM: apply std::ranges 2025-03-16 17:16:30 -05:00
Benjamin Bræstrup Sayoc
4ed902e07f Fem: Use QStringLiteral 2025-02-10 18:32:45 +01:00
tritao
551c2e48fb Gui: Reorganize the selection files into a top Selection folder. 2025-02-03 17:56:57 +01:00
Ladislav Michl
0b3adee2ab Base: Quantity: return std::string 2024-12-23 17:48:42 +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
wmayer
be34f251cd FEM: Fix convoluted event handling of constraint task boxes
and make Delete key working on macOS
2024-07-23 23:19:51 -05:00
marioalexis
fc5d57035f Fem: Remove redundant *Fix properties in constraint displacement - fixes #14556 2024-07-22 10:50:15 -05:00
Max Wilfinger
8ff5a1f688 Fix source string typos mentioned on Crowdin (#15261) 2024-07-08 17:18:31 -05:00
marioalexis
6002a73fd7 Fem: Use base class open and reject methods in constraint task panels 2024-06-24 22:03:07 -03:00
marioalexis
5548ba1c59 Fem: Set Scale in TaskFemConstraint base class 2024-06-24 22:03:07 -03:00
wmayer
3863cff6c0 Fem: Apply clang-format 2023-09-25 14:50:43 +02:00
kaktus Jacek
1adfa88aee Fem: Removing "constraint" from the names
Removing "constraint" from the names of most FEM workbench features.

https://github.com/FreeCAD/FreeCAD/discussions/10217
2023-09-03 22:29:35 -05:00
wmayer
2bcec7717d Fem: modernize C++: use equals default 2023-08-21 13:35:54 +02:00
wmayer
89b9a7ae0f FEM: modernize C++: use range-based for loop 2023-08-15 01:09:53 +02:00
luzpaz
6bd40b5dcd Fem: fix trailing whitespace 2023-04-01 08:39:05 +02:00
Uwe
4c9afb4546 [FEM] activate spring constraint
- the spring constraint is currently unused but it can be used for Elmer mechanical analyses
This PR does so and also overhaul the dialog UI.
- use the spring constraint also in an example file
2023-03-23 15:14:50 +01:00
Uwe
45743d4fbd [FEM] improve displacement constraint
- use a Distance and Angle property to get the unit handling right
2023-03-23 00:50:40 +01:00
Uwe
9d45d40ec5 [FEM] use std::unique_ptr for all dialog objects
- also fix too long line
- also further clang automatic code style changes
2023-03-22 20:08:13 +01:00
luzpaz
f1bbcd9e13 Fix typos and whitespace 2023-03-22 17:10:38 +01:00
Uwe
c9cb01531f [FEM] extend displacement constraint
- add fields to specify a formula for the displacement, this is necessary to make transient deformation analyses with Elmer
- add option to set displacement from result of flow equation
- this way also a major overhaul -> simpler dialog logic etc.
2023-03-22 15:23:32 +01:00
wmayer
d4cb3aca0e FEM: move to new style connect() 2023-01-15 19:50:46 +01:00
berniev
53ba98d636 Mod: use empty 2022-08-06 19:30:13 +02:00
Ajinkya Dahale
e0f96afb35 [FEM] Refactor TaskFemConstraintOnBoundary (#6615)
* Now the behavior is consistent with behavior of PD fillets, for example.
See https://forum.freecadweb.org/viewtopic.php?f=18&t=67135#p580192. In the
future it may be possible to reuse some code from there.

* When the last selected item is removed we need to reset the existing
highlighting separately.

* Use `Gui::ButtonGroup` in `TaskFemConstraintOnBoundary`
2022-03-21 01:02:10 +01:00
Uwe
4f0fd30371 [FEM] remove some unused includes for some dialogs
- also some style fixes made by MSVC
2022-03-17 19:53:12 +01:00
Uwe
dd0d2686b9 [FEM] Contact and Displacement: remove unused headers 2022-03-17 03:46:41 +01:00
Uwe
35e90db035 [FEM] fixes for displacement dialog
- add missing global dialog layout (reported by Qt Designer)
- get rid of arbitrary spinbox limits
- uniform UI element names
- simplify code
2022-03-16 01:29:46 +01:00
wmayer
d419b325fb Fem: Fix several coverity issues:
* make SelectionChangeModes an enum class
* CID 350596: Uninitialized scalar field
* CID 350572: Uncaught exception
* CID 350647: Uncaught exception
2022-03-13 14:09:04 +01:00
wmayer
8f786ea6ef Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +01:00
Ajinkya Dahale
744e57a963 [FEM] Add modal add/remove for dispacement constraint
With this, add/remove buttons for displacement constraint will put the user in a
selection mode if pressed when nothing is selected.

Superclass `TaskFemConstraintOnBoundary` Allows code reuse for other
constraints. We do not need this in `TaskFemConstraints` because it is only used
in a subset of constraints, particularly that applies on only some of the
boundary entities.

TODO: Confirm Undo/Redo works appropriately.
TODO: Optimize `onSelectionChanged()`.
2022-01-07 05:33:42 +01:00
luz paz
36d9f82671 FEM: remote superfluous double semicolons [skip ci] 2021-02-14 22:13:16 +01:00
wmayer
9e2dc54094 PVS: V560 A part of conditional expression is always true 2020-07-18 10:59:27 +02:00
Bernd Hahnebach
fb3a3f6a33 FEM: rename icon, Constraint Displacement 2020-03-06 08:38:59 +01:00
donovaly
10cfdceb7a [FEM] spread the fixes from commit ef370e6d to the other dialogs 2020-03-01 14:37:28 +01:00
donovaly
d813e5abf1 FEM: constraint dialogs: sort out commonly used function
additionally remove double code from TaskFemConstraintForce.cpp
2020-02-24 20:12:10 +01:00
donovaly
f60ca91e83 [FEM] fix special Dlg issue with deletion
- if an existing constraint has only one item, the item could under some circumstances not be deleted by pressing Del
2020-02-21 18:00:58 +01:00
donovaly
4c368c7c21 FEM: change behavior of Force dialog to the one of all other constraint dialogs 2020-02-20 18:07:52 +01:00
donovaly
d71cdc061c [FEM] add shortcut to delete constraints from list in dialog
see https://forum.freecadweb.org/viewtopic.php?f=18&t=43402
2020-02-19 10:15:10 +01:00
sL1pKn07
6674467254 [For v018] Fix build with Qt5 beta
Seems need add some headers for build with incoming Qt 5.11 (Tested with 5.11.0beta2)
2018-04-10 12:59:41 +02:00
wmayer
2845e319a3 fix -Wextra in Fem 2016-09-24 02:17:15 +02:00
wmayer
6aefdea417 + prepare string for translation 2016-02-29 13:22:49 +01:00
vginkeo
8ec2665c1c FEM: C++98 compatible fix to constraint displacement reference deletion, update vertice, edge, face selection 2016-02-29 13:06:16 +01:00
vginkeo
70f3ebbd15 FEM: remove some trailing whitespaces 2016-02-29 13:06:14 +01:00
Yorik van Havre
17522b7b2f Revert "FEM: Updated fix to constraint displacement reference deletion, update hide show, remove custom input writer, update vertice, edge, face selection."
This reverts commit ac4d466443.
2016-02-19 00:05:55 -02:00