Commit Graph

32397 Commits

Author SHA1 Message Date
luzpaz
d5a313146f Fix various whitespace issues 2023-03-20 16:38:40 +01:00
Florian Foinant-Willig
27ed6d6349 Fix circles distance constraint for concentrics 2023-03-20 16:02:08 +01:00
Abdullah Tahiri
37eeccf705 NotificationBox/NotificationArea: Restrict rendering area to main frame
========================================================================

The NotificationBox is extended to take the QRect in global coordinates. Then
it will try to dimension the label within this area. If a fixed width is provided, that
is enforced (take precedence).

The NotificationArea passes the QRect of the main window to the NotificationBox.

This is intended to fix:
https://github.com/FreeCAD/FreeCAD/issues/8940
2023-03-20 15:43:42 +01:00
Uwe
431fafc533 [FEM] fine-tune flow examples
- use a more sensible velocity distribution
- change inlet temperature for 2 examples

- also change step size for nonlinear iterations for more convenience for practical usage
2023-03-20 07:17:11 +01:00
Uwe
9007723331 [FEM] rewrite initial velocity constraint
- same as #8963 but for initial velocity

- add an example file that demonstrates the influence of the initial velocity
- some fine-tuning for the existing flow example
2023-03-20 04:58:24 +01:00
Uwe
06061e37dc [FEM] rewrite velocity constraint
- complete revision of the constraint.

This is a breaking change, meaning existing constraints won't work.

This is possible because since 2 days ago the whole flow equation did not work at all. Also the existing constraint implementation if buggy and cannot be used to do the Elmer tutorial. Also, the constraint is only used by Elmer and only be the flow equation.

Since nobody complained about the obvious wrong results, we can assume the flow equation was not yet in practical usage (and for FC 0.20 we known that it does not work at all, first with FC 0.20.1).

It is necessary since it must be possible to either input a velocity or an equation. With an equation, a velocity profile can be specified.

- update the flow examples accordingly:
-- simplify them since an initial and and output velocity is not necessary to specify
-- use a formula as input velocity for the non-turbulent example
2023-03-20 01:57:09 +01:00
Uwe
a2fec51923 [FEM] Elmer: support for variable strings
- Elmer offers the "Variable" calls do define variables via math equations. These are for example used to define as constraint a certain velocity profile
2023-03-20 01:14:34 +01:00
Uwe
09fbf45925 [FEM] output less messages
- the message how to use the feature is not useful since it is triggered by the GUI selection and in the GUI has already the info in form of tooltips how to use
2023-03-20 01:13:46 +01:00
Abdullah Tahiri
f7f78aa44b Missing overrides 2023-03-19 19:14:22 +01:00
Abdullah Tahiri
6ffd22fa9b Refactor of CmdSketcherSnap and SnapSpaceAction to reduce verbose calls to retrieve preference parameters 2023-03-19 19:14:22 +01:00
Abdullah Tahiri
a07630dfb3 Refactor parameter in a single place 2023-03-19 19:14:22 +01:00
Abdullah Tahiri
5ae5d0db87 Prevent unnecessary update of snapAngle, block signals when auto updating 2023-03-19 19:14:22 +01:00
Abdullah Tahiri
8d33a24092 Remove unnecessary ViewProvider retrieving and checking, as it is unused 2023-03-19 19:14:22 +01:00
Abdullah Tahiri
65ec96d12d Rename angleSnapEnabled to angleSnapRequested for consistency with the other snap flags 2023-03-19 19:14:22 +01:00
Abdullah Tahiri
75fd0dbc73 Remov warning -squash group by meaningful groups 2023-03-19 19:14:22 +01:00
Abdullah Tahiri
e763fd3d80 Remove warning - SnapManager initialisation order in constructor different from class declaration 2023-03-19 19:14:22 +01:00
Abdullah Tahiri
41408b411f Encapsulate interface data members 2023-03-19 19:14:22 +01:00
Abdullah Tahiri
50b3662535 Rename preference parameter 2023-03-19 19:14:22 +01:00
Abdullah Tahiri
af0f4b10f6 Remove left-over code 2023-03-19 19:14:22 +01:00
Paddle
de57296576 Sketcher: Snap: Add 'Snap at angle' to Arc of Ellipse DSH. 2023-03-19 19:14:22 +01:00
Paddle
4922a48997 Sketcher: Snap: Add 'Snap at angle' to Ellipse DSH. 2023-03-19 19:14:22 +01:00
Paddle
7b7368b04b Sketcher: Snap: Add 'Snap at angle' to Line DSH. 2023-03-19 19:14:22 +01:00
Paddle
e62d6b854b Sketcher: Snap: Add 'Snap at angle' to Arc DSH. 2023-03-19 19:14:22 +01:00
Paddle
7d97a5d8da Sketcher: Snap: Add 'Snap at angle' support to DrawSketchHandler. 2023-03-19 19:14:22 +01:00
Paddle
0f274c2e07 Sketcher: Snap: initial implementation: - creation of SnapManager class. - Move grid snap to this new class. - Add snap to object. - Add snap at angle. 2023-03-19 19:14:22 +01:00
flachyjoe
21c2eb6014 Sketcher: Add circle to circle distance constraint 2023-03-19 14:05:35 +01:00
wmayer
0e64e76514 Gui: fix some lint warnings 2023-03-19 03:19:49 +00:00
wmayer
c585a9f430 TD: move all XML query handling to a single function 2023-03-18 19:26:01 -04:00
wmayer
3ed781ce1e Gui: solves #8939: timers are moved between non-QThreads
For more details see: https://github.com/FreeCAD/FreeCAD/issues/8939#issuecomment-1474888902
2023-03-18 22:41:48 +01:00
Paddle
13d175e891 Sketcher: Stylesheets: Taskbox buttons revert margin and padding. 2023-03-18 18:22:21 +01:00
Paddle
5090cf3436 Sketcher: Constraint Widget: Change showHideButton from QPushButton to QToolButton to avoid style problems. 2023-03-18 18:22:21 +01:00
Alexander Golubev
57f2f06fe2 Gui: add a tooltip about how to modify shortcuts into DlgKeyboard 2023-03-18 17:59:50 +01:00
Alexander Golubev
992dec2c6b Gui: Prevent UiLoader from loading 3rd-party Qt plugins.
Due to a flaw in the QUiLoader, UiLoader were loading all designer plugins
it can find in QApplication::libraryPaths(). This in general a bad
practice and leads to bugs due to some plugins may perform some unexpected
actions upon load which may interfere with FreeCAD's functionality.

To avoid such problems reset the libraryPaths before creation of a
UiLoader object.

Also move setLanguageChangeEnabled(true) into constructor due to it's
called every time it's being instanced anyway.

See: https://github.com/FreeCAD/FreeCAD/issues/8708
2023-03-18 17:59:50 +01:00
Abdullah Tahiri
64eb85b1ea ElementWidget: remove unnecesary element pointer
================================================

This should fix this (I cannot reproduce it):
https://forum.freecad.org/viewtopic.php?p=667579#p667579

Lately I added the geometry pointer to the item. This has indeed
the potential for an already deleted pointer being accessed.

This PR removes the geometry pointer from the item and relies on the
ViewProvider to indirectly access an updated pointer.
2023-03-18 11:32:22 +01:00
Abdullah Tahiri
522679321c ElementWidget: reorganise implementation class declarations 2023-03-18 11:32:22 +01:00
Abdullah Tahiri
45401e30ce Notifications: Extend translated notification to include caption
===============================================================

For translated notifications now the caption is included in the
message, as the translation is already done, and this improves
the semantics of existing messages.
2023-03-18 09:07:39 +01:00
Abdullah Tahiri
3f19bcbeef Sketcher: Elements Widget - Fix crash when moving external geometry to another layer
====================================================================================

As reported:
https://forum.freecad.org/viewtopic.php?p=667426#p667426

Support for moving external geometry to another layer will come in the future.
2023-03-18 07:45:04 +01:00
Abdullah Tahiri
5242f6d048 ElementsWidget: Move ElementFilterList to implementation
========================================================

Only moving code from header to implementation.
2023-03-18 07:45:04 +01:00
Abdullah Tahiri
7cc3fe480c ElementsWidget: Move Delegate to implementation
===============================================

Only moving code from header to implementation.
2023-03-18 07:45:04 +01:00
Uwe
25031a74ee [App] [skip ci] register PropertyVelocity
- was forgotten once the property was implemented some days ago
2023-03-18 05:45:45 +01:00
Uwe
d23b576c33 [FEM] update a file license
- like in #8933
2023-03-18 01:04:17 +01:00
Uwe
576781363d Merge pull request #8934 from jbaehr/partdesign-ingolutegear-profileshift
PD: Implement Profile Shift for InvoluteGear
2023-03-18 00:48:44 +01:00
Chris Hennes
23182666dc Fem: Fix licensing of Calculix test FCStd files (#8933)
* Fem: Fix licensing of Calculix test FCStd files
2023-03-18 00:47:02 +01:00
wmayer
a1689319ce Gui: add missing include for Qt6 build 2023-03-18 00:08:40 +01:00
wwmayer
560752cd80 Base: fixes #8902: Segfault from Part WB functionality in python scripting (#8927) 2023-03-17 22:50:30 +01:00
Jonas Bähr
9404c032f4 PD: Implement Profile Shift for InvoluteGear
This commit adds the ability to shift the involute profile inside or
outside. Profile shift is implemented as coefficient, i.e. normalized by
the module, so that it the whole profile scales with the module without
chaning shape.
To verify the profile, the tests implement an "over pins measurement"
using formulae found in literature.
Backward compatibility with FreeCAD-v0.20 is garanteed by already
existing tests, not touched by this commit.

This addresses issue #5618.
2023-03-17 22:22:34 +01:00
0penBrain
c4b63bcf17 CI: minor improvements in texts 2023-03-17 19:50:12 +00:00
Uwe
5dabd5dfff [FEM] add an example for a turbulent flow 2023-03-17 17:57:09 +01:00
Uwe
b9398e3fdb [FEM] improve check for fluid material
- it is sufficient if there is a dynamic viscosity defined
2023-03-17 17:56:41 +01:00
Uwe
e5caf77009 [FEM] fix 1D thermomech example
- the heat capacity of water was wrong
- also specify just thermal expansion, this make that water is recognized as material and then all water parameters will be available

(that the analysis fail despite CalculiX reports everything went well s is another issue, I will investigate later)
2023-03-17 17:55:50 +01:00