Commit Graph

69 Commits

Author SHA1 Message Date
Max Wilfinger
dd702da1bc FEM: Update UI strings for consistency 2025-06-30 10:35:42 -05:00
Ralf Habacker
719ee20ba4 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
bofdahof
998f4e4d45 Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
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
Benjamin Bræstrup Sayoc
e1b39ad1f6 Fem: Use QStringLiteral 2025-02-10 18:32:45 +01:00
tritao
65466d580b Gui: Reorganize the selection files into a top Selection folder. 2025-02-03 17:56:57 +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
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
Max Wilfinger
7d21d9edb8 Fix source string typos mentioned on Crowdin (#15261) 2024-07-08 17:18:31 -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
ppphp
da7ee06d67 fix: c++20 deprecate [=] 2024-03-31 10:47:32 +02:00
Florian Foinant-Willig
41080dec5b Fem: modernize type checking 2023-10-23 18:09:04 +02:00
wmayer
b8b94c249e Fem: Apply clang-format 2023-09-25 14:50:43 +02:00
kaktus Jacek
41fb0d45a3 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
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
wmayer
39e53e5eb0 Mods: modernize C++: redundant void arg 2023-08-05 16:50:31 +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
wmayer
b0e9c455a6 Fem: fix warning field 'dimension' will be initialized after field 'ui' [-Wreorder-ctor] 2023-03-22 20:37:29 +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
32bbdb0ab2 FEM: move to new style connect() 2023-01-15 22:23:53 +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
Uwe
fc548a4b34 [FEM] remove superfluous nullptr checks 2022-07-18 01:45:19 +02:00
wmayer
7ae9fc0d67 Fem: modernize C++11
* use nullptr
2022-03-23 19:26:15 +01: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
2e084ed18a [FEM] remove some unused includes for some dialogs
- also some style fixes made by MSVC
2022-03-17 19:53:12 +01:00
Uwe
dead2fc8f1 [FEM] Bearing and FluidBoundary: code improvements
- get rid of UI-coded limits
- fix layout issues
- code simplifications
- remove unused headers
2022-03-17 03:45:38 +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
luz paz
3b310cfdf2 FEM: Fix variable pHeatTransfering -> pHeatTransferring
Found via `codespell`
2021-10-20 06:25:34 +02:00
luz paz
cfebd3f1e6 FEM: remote superfluous double semicolons [skip ci] 2021-02-14 22:13:16 +01:00
luz paz
be07e9a7ed FEM: Issue #0004473: Expose openCommand() to translation
Continuing the work to expose the undo/redo functionality to translation. This commit does so for the FEM Wb.  
Ticket: https://tracker.freecadweb.org/view.php?id=4473
2020-12-01 14:53:35 +01:00
Bernd Hahnebach
b2ddb576c9 FEM: fluid task panel, use log for a log 2020-06-04 00:29:21 +02:00
Bernd Hahnebach
9b88c46061 FEM: rename icon, Constraint Fluid Boundary 2020-03-06 08:39:11 +01:00
donovaly
27395bbba2 [FEM] spread the fixes from commit a5be62b8 to the other dialogs 2020-03-01 14:37:28 +01:00
wmayer
a5be62b86a Fem: [skip ci] fix several coding flaws:
* improve implementation of TaskFemConstraintForce::onButtonDirection
* use QSignalBlocker to tmp. suppress signals instead of dis- and re-connecting
* directly access object from SelectionObject
* don't do type checks by class name but by typeid
2020-02-26 14:15:12 +01:00
donovaly
d19d5b5fce FEM: constraint dialogs: sort out commonly used function
additionally remove double code from TaskFemConstraintForce.cpp
2020-02-24 20:12:10 +01:00
donovaly
6ffef47ee8 remove doubled code
(is there already a few lines up)
2020-02-23 16:45:35 +01:00
donovaly
af7941a559 TaskFemConstraintFluidBoundary.cpp: squash GCC compiler warning 2020-02-23 16:45:35 +01:00
donovaly
d6f3c794cd [FEM] make the Fluid Boundary dialog behave like the other dialogs
- allows highlighting and multiple selection
2020-02-23 16:45:35 +01:00
donovaly
97de09ad6f [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
luz.paz
1baf5da3cf FEM: [skip ci] fix header uniformity
This PR fixes header uniformity across all FEM WB files
2019-12-21 20:00:14 +01:00
Abdullah Tahiri
241c370f5f PCH: Fem Gui 2019-05-16 21:43:08 +02:00