Commit Graph

67 Commits

Author SHA1 Message Date
bofdahof
ba2c2ca5ad Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02: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
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
Ladislav Michl
e62b91ada4 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
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
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
ppphp
8863b9ac4c fix: c++20 deprecate [=] 2024-03-31 10:47:32 +02:00
Florian Foinant-Willig
027ac1b456 Fem: modernize type checking 2023-10-23 18:09:04 +02: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
wmayer
2b3d48176c Mods: modernize C++: redundant void arg 2023-08-05 16:50:31 +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
wmayer
9fa3cf8d8d Fem: fix warning field 'dimension' will be initialized after field 'ui' [-Wreorder-ctor] 2023-03-22 20:37:29 +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
wmayer
712af11a4c FEM: move to new style connect() 2023-01-15 22:23:53 +01:00
wmayer
d4cb3aca0e FEM: move to new style connect() 2023-01-15 19:50:46 +01:00
Uwe
208b017253 [FEM] TaskFemConstrain*: remove unused includes
- also sort includes
2022-10-03 05:20:52 +02:00
berniev
53ba98d636 Mod: use empty 2022-08-06 19:30:13 +02:00
Uwe
5e634c5995 [FEM] remove superfluous nullptr checks 2022-07-18 01:45:19 +02:00
wmayer
bde17e1b9f Fem: modernize C++11
* use nullptr
2022-03-23 19:26:15 +01: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
23fa6ebaa9 [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
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
e92cc10819 [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
ace0d32647 FEM: Fix variable pHeatTransfering -> pHeatTransferring
Found via `codespell`
2021-10-20 06:25:34 +02:00
luz paz
36d9f82671 FEM: remote superfluous double semicolons [skip ci] 2021-02-14 22:13:16 +01:00
luz paz
3830b562d5 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
c0fa72929a FEM: fluid task panel, use log for a log 2020-06-04 00:29:21 +02:00
Bernd Hahnebach
7034467911 FEM: rename icon, Constraint Fluid Boundary 2020-03-06 08:39:11 +01:00
donovaly
10cfdceb7a [FEM] spread the fixes from commit ef370e6d to the other dialogs 2020-03-01 14:37:28 +01:00
wmayer
7558b6e7cc 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
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
8a25be1fba remove doubled code
(is there already a few lines up)
2020-02-23 16:45:35 +01:00
donovaly
9ad52812a0 TaskFemConstraintFluidBoundary.cpp: squash GCC compiler warning 2020-02-23 16:45:35 +01:00
donovaly
ec213a4d98 [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
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
luz.paz
73b8ee91ee 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
0382e2dd75 PCH: Fem Gui 2019-05-16 21:43:08 +02:00
wmayer
56b9d509a1 PVS: V519 Variable is assigned values twice successively 2019-03-13 12:55:31 +01:00
luz.paz
cb4a0adf71 Misc. typos
Found via `codespell`
2019-02-08 11:01:24 -02:00