Commit Graph

25 Commits

Author SHA1 Message Date
Benjamin Nauck
a6e1b894fe Fem: Add #include <limits> where used 2025-03-31 23:51:06 +02:00
Benjamin Nauck
d0dc4c00ef FEM: Use std::numeric_limits and std::numbers instead of defines 2025-03-29 13:32:38 +01:00
bofdahof
4dd92724b6 FEM: apply std::ranges 2025-03-16 17:16:30 -05:00
tritao
65466d580b Gui: Reorganize the selection files into a top Selection folder. 2025-02-03 17:56:57 +01:00
Ladislav Michl
2ea8a633ac Base: Quantity: return std::string 2024-12-23 17:48:42 +01:00
Kacper Donat
651cefde4d 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
Ladislav Michl
0ee3c9f8e6 Base: Drop QString-std::string conversion functions from Tools
Convenience helpers function Tools::toStdString and Tools::fromStdString
were implemented for Qt4 or older to perform utf8 aware conversion as
QString::toStdString/QString::fromStdString were using toAscii/fromAscii
internally (see https://dreamswork.github.io/qt4/classQString.html).

Since Qt5 QString uses toUtf8/fromUTf8, which makes the helper functions
obsolete (see https://doc.qt.io/qt-5/qstring.html#fromStdString).
2024-12-02 23:30:53 -05:00
marioalexis
d94c65ba3f Fem: Enable expression for the spring constraint task panel 2024-10-10 20:33:54 -05:00
wmayer
88ee1d6df3 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
6c0f3bde92 Fem: Use base class open and reject methods in constraint task panels 2024-06-24 22:03:07 -03:00
marioalexis
0361543cfb Fem: Set Scale in TaskFemConstraint base class 2024-06-24 22:03:07 -03:00
wmayer
b8b94c249e Fem: Apply clang-format 2023-09-25 14:50:43 +02:00
wmayer
d525e0d308 Fem: modernize C++: use equals default 2023-08-21 13:35:54 +02:00
wmayer
009f9f2222 FEM: modernize C++: use range-based for loop 2023-08-15 01:09:53 +02:00
Uwe
dfbc6b168e [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
97103b3bf3 [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
wmayer
a9b9899846 FEM: move to new style connect() 2023-01-15 19:50:46 +01:00
Uwe
1a32e6ad9c [FEM] TaskFemConstrain*: remove unused includes
- also sort includes
2022-10-03 05:20:52 +02:00
berniev
b796a0d376 Mod: use empty 2022-08-06 19:30:13 +02:00
Ajinkya Dahale
300fbc22ea [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
2cb9ddddae [FEM] task dialogs: remove unused includes
- also some code style fixes from MSVC
2022-03-17 23:31:17 +01:00
wmayer
76d1180283 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
1ca7429705 Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +01:00
Ajinkya Dahale
c558fc7195 [FEM] Use modal add/remove for more constraints (8/??)
Use the previously added superclass `TaskConstraintOnBoundary` for more
constraints where it's usable.

Currently done:
TaskFemConstraintDisplacement
TaskFemConstraintForce
TaskFemConstraintSpring
TaskFemConstraintFluidBoundary
TaskFemConstraintHeatflux
TaskFemConstraintFixed
TaskFemConstraintTemperature
TaskFemConstraintPressure

Too different:
TaskFemConstraintTransform (single selection)
TaskFemConstraintContact (single selection, two fields)
TaskFemConstraintPlaneRotation (single selection)
(Other constraint tasks, which do not use `addToSelection`)
2022-01-07 05:33:42 +01:00
Preslav
1ceaa09d17 Added spring boundary condition 2021-09-17 11:08:08 +02:00