Commit Graph

24836 Commits

Author SHA1 Message Date
Uwe
d27e69bdc9 [PD] add tooltip for Hole feature
- tooltip makes clear what the depth means for countersinks
- add comment why a calculation cannot be performed
- shorten some long lines
2023-03-10 05:14:24 +01:00
Zheng, Lei
fac0a1740f PartDesign: do not include transform for sub-object in Feature 2023-03-10 02:06:24 +01:00
wandererfan
0adc473d53 [TD]fix error from BSpline.asCircle 2023-03-09 13:40:16 -05:00
wmayer
45e3d0be96 Sketch: export GeoListModel::getGeoListModel to fix linking error with MinGW 2023-03-09 19:38:40 +01:00
Uwe
1bfaa6965b [FEM] improve cylinder function
- set better initial position and size
- add misting triggering of ViewProvider
- some code style improvements (fix too long lines, consistency etc.)
2023-03-09 17:25:46 +01:00
Uwe
bedfd8f743 [MeshPart] fix unwrap feature
- fixes #8741
- in commit d62d41a53b the pybind headers were accidentally removed
2023-03-09 16:57:21 +01:00
Uwe
0d77da1c81 [FEM] [skip ci] fine-tune FEM function filter
- just for consistency use always the form "x.0"
2023-03-09 02:40:32 +01:00
Alexander Golubev
088f51632b PD: Fix Loft's Closed option
Closes: https://github.com/FreeCAD/FreeCAD/issues/6156
2023-03-09 01:48:32 +01:00
Uwe
fe9ebfc4c5 [FEM] [skip ci] CylinderWidget.ui fix
- was reported and automatically fixed by Qt's Designer that the size in the file is incorrect, (the sum of the widget's widths is wider than the main widget's specified size)
2023-03-08 18:02:10 +01:00
Uwe
453b244b55 [FEM] fox compilation of new Cylinder function
- vector must be initialized and vector size requires a const int

- also some sorting
- also some formatting changes to be consistent (either always "x." or "x.0")
2023-03-08 18:02:10 +01:00
marioalexis
b1e8de58ea FEM: Add cylinder filter function 2023-03-08 17:16:41 +01:00
xtemp09
61f1310aa5 [Mesh] Minor code update
Removal of unnecessary comparison.
`QThread::idealThreadCount()` returns the ideal number of threads that the process can run in parallel or 1 if it fails to determine it.
2023-03-08 13:20:45 +01:00
xtemp09
27c4b52688 [FEM] Replacement of hardware_concurrency() with idealThreadCount()
I encountered problems with std::thread::hardware_concurrency() with mingw-w64 < v8.1.

QThread::idealThreadCount() is a better alternative.
2023-03-07 17:41:35 +01:00
Abdullah Tahiri
c604d1741d Console/ILogger: Refactor and extension
=======================================

Refactor:
 - Substitute the use of variadic templates with parameter packs.
 - Use recently incorporated external library "fmt" to handle printf like formating.
 - Extensive cleaning of pragmas and unnecessary forward declarations.
 - Parameter packs and libfmt provide a much stronger type checking now, so
   conversions that are by standard implicit as bool to int need an explicit static_cast
   to avoid compilation warnings.

Extension:
 - Include a notifier field, so that the originator of the message can be provided. E.g. Document#DocumentObject
 - Include a new type of message called CriticalMessage, this message is intended to have
   special behaviour in the future. Namely, it will be used to notify forward compatilibity issues.
   It will be used to substitute the current signal/slot mechanism.
 - Include two new types of messages for user notifications (Notification and TranslatedNotification). This messages
   will be use to convey UI notifications intended for the user (such as non-intrusive message about the usage of a tool). There
   are two versions to mark whether the string provided as a message is already translated or not. When using the console system for
   notifications, these notifications may originate from the App or the Gui. In the former, it is generally the case that the strings
   of messages are not (yet) translated (but they can be marked with QT_TRANSLATE_NOOP). In the latter, often the messages to be provided
   are already translated.

Python support for CriticalMessage, Notification and TranslatedNofification, including shortcuts:

    Crt = FreeCAD.Console.PrintCritical
    Ntf = FreeCAD.Console.PrintNotification
    Tnf = FreeCAD.Console.PrintTranslatedNotification
2023-03-07 16:13:23 +01:00
wmayer
76623ad0a5 Part: set minimum angular deflection to 1 deg
See also forum: https://forum.freecad.org/viewtopic.php?t=76614
2023-03-07 10:41:38 +01:00
edi271
7dbceaffe6 [TD] Solve two issues in CmdHoleShaftFit 2023-03-06 20:02:21 -05:00
wmayer
1a0801a23f Qt6: port template and Cloud module to Qt6 2023-03-06 12:25:55 +01:00
Jonas Bähr
fb6fffa69f PD: Retranslate InvoluteGear's Task Panel on language change
This makes use of the recent additions to `TaskPanelPython` and
`UiLoader`, cf. #8602, to retranslate the UI without having to close and
reopen it again.
Retranslation of the part from the UI file is now handled by FreeCAD
internally, but the tool tips from the property descriptions still need
to be reassigned with the translated versions.
2023-03-06 00:19:04 +01:00
mosfet80
f51b2156f3 fix commit 2023-03-04 17:51:43 -06:00
mosfet80
b0831f994d Revert addonManager 2023-03-04 17:51:43 -06:00
mosfet80
3137dea940 remove Python2 code 2023-03-04 17:51:43 -06:00
xtemp09
323476a9a4 [TechDraw] Improved readability of DrawViewSpreadsheet.cpp
I was stretching my fingers
2023-03-04 09:59:02 -05:00
wmayer
599b14b430 Part: extend command Part_PointsFromMesh to support any geometric type 2023-03-04 14:44:58 +01:00
wmayer
afd59cbe82 FEM: implement interface of ComplexGeoData 2023-03-03 18:17:54 +01:00
Chris Hennes
6e7e94e342 OpenSCAD: Improve shape-checking in group action 2023-03-03 10:11:20 -06:00
luzpaz
617611e1f8 Fix typos [skip ci] 2023-03-03 09:09:26 -06:00
wmayer
94d89e53c2 Sketcher: remove unused private field 'form' 2023-03-02 22:44:04 +01:00
Abdullah Tahiri
41a7b146f5 Sketcher: Remove Edit Controls from the TaskBar 2023-03-02 20:42:48 +01:00
Abdullah Tahiri
74f136bbac Sketcher: TaskSketcherElements - Very Basic Layer Management
============================================================

This class needs quite some rework, as it is mixing model-view model and item model.

Eventually, the whole needs to be moved to a QTreeWidget for layers' implementation.

This commit:
1. Moves back implementation only class item to the cpp file.
2. Adds a contextual submenu to change the selection from one layer to another in the
naive fixed 3 layer implementation.
3. Adds checkboxes to hide geometry.

It is the minimal modification to enable a user work with the 3 layer implementation.
2023-03-02 20:42:48 +01:00
Abdullah Tahiri
a32a49d2de ViewProvider: 3 fixed visual layers implementation
==================================================

Naive 3 layer implementation to enable the removal of current rendering order.

Layers is conceived to be much more powerful, when combining User Layers, which
work at structural level (conceptually grouping of geometry by the user) and visual
layers (which control the representation of parts of User layers).

However, that implementation will take quite some time and effort to get it right.

This commit enables 3 layers:
1. Normal layer (legacy one)
2. Discontinuous layer (experimental layer which discontinuous edges)
3. Hidden layer (a normal layer which is hidden)

One geometry can be added to one and only one visual layer at a given time.

So this enables to hide geometry (by assigning it to the hidden layer), which is
useful for selection when lines are overlapping, acting as a work-around for the
rendering order. It also allows to rework the rendering order (without the user
being affected), which is also necessary for the final visual layers implementation.
2023-03-02 20:42:48 +01:00
Abdullah Tahiri
ddd1ab43d8 Sketcher: Elements Widget - Add Visual Layer metadata 2023-03-02 20:42:48 +01:00
Abdullah Tahiri
0f1e10d0db Utils: setSafeGeomLayerId 2023-03-02 20:42:48 +01:00
Abdullah Tahiri
6e763b678a Utils: getGeoIdsOfEdgesFromNames 2023-03-02 20:42:48 +01:00
Abdullah Tahiri
d01edd53a2 EditCoinManager: Refactor and extend layer support to use VisualLayerList property and ViewProviderSketchGeometryExtension 2023-03-02 20:42:48 +01:00
Abdullah Tahiri
9478870d50 EditCoinManager: Apply Visual Configuration configuration 2023-03-02 20:42:48 +01:00
Abdullah Tahiri
a8ebeaa27d ViewProviderSketch: update geometry layer configuration on visual layer property change 2023-03-02 20:42:48 +01:00
Abdullah Tahiri
2f34f01c10 Sketcher: EditModeCoinManager - support to update layer configuration
=====================================================================

- Refactor scenograph creation to enable local update
- Support to perform a local update
2023-03-02 20:42:48 +01:00
Abdullah Tahiri
c75a7b524b Sketcher: ViewProviderSketch
============================

Adding PropertyVisualLayerList to ViewProviderSketch
2023-03-02 20:42:48 +01:00
Abdullah Tahiri
581327c67d Sketcher: PropertyVisualLayerList
=================================

This is a property (intended for ViewProviderSketch), containing a list of visual layer configurations.

This property enables to define and serialise the configuration of visual layers, as well as reacting to
changes to it.
2023-03-02 20:42:48 +01:00
Abdullah Tahiri
a6588536e1 Sketcher: VisualLayer
=====================

New class allowing to define a VisualLayer:
- whether it is visible or not.
- the line width to be used by coin for this layer.
- the line pattern to be used by coin for this layer.
2023-03-02 20:42:48 +01:00
Abdullah Tahiri
8dba7f1ddb Utils: New Function to retrieve the VisualLayerId 2023-03-02 20:42:48 +01:00
Abdullah Tahiri
49586be475 Sketcher: Extend ViewProviderSketchGeometryExtension to hold the VisualLayerId
==============================================================================

In the Layers implementation there are User Layers, which have no direct impact on visualisation,
and allow to group conceptually related geometry into logical entities, and Visual Layers, which
define how geometries are visualised (or even whether they are visualised or not).

For User Layers, SketchObject is responsible for the definition of the layers, and SketcherGeometryExtension
is responsible for indicating the User Layer to which a geometry belongs (via a LayerId field).

For Visual Layers, ViewProviderSketch is responsible for the definition of the visual layers, and
ViewProviderSketchGeometryExtension is responsible for indicating the visual layer to which a geometry belongs.

With this commit, ViewProviderSketchGeometryExtension:
- takes over the responsibility of carrying a visual layer Id.
- is extended to be persistent and serialise the Id.
- is extended to be accesible from Python.
2023-03-02 20:42:48 +01:00
wmayer
ebe791649a Part: Compute center of gravity for compounds
* If the compound contains solids then other shape types like faces or edges are ignored
* If the compound contains no solids but faces then edges are ignored
* If the compound contains no faces but edges then vertexes are ignored
2023-03-02 19:34:18 +01:00
Chris Hennes
0da14beb27 Addon Manager: Correct typo 2023-03-01 21:21:37 -06:00
wmayer
ea190ce3c2 Test: expected failure of Rotation::setValue() in unit tests 2023-03-01 18:43:15 +01:00
wmayer
d196f8c496 Mod: catch exception raised by Rotation::setValue 2023-03-01 18:43:15 +01:00
wmayer
65a5befe8a Part: fix TopoShapeListTest 2023-03-01 14:51:47 +01:00
wandererfan
20cf02d137 [Part]add test for PropertyTopoShapeList 2023-03-01 14:24:40 +01:00
wandererfan
8cbd69b749 [Part]use sharedptr for Restore 2023-03-01 14:24:40 +01:00
wandererfan
586d482645 [Part]PropertyTopoShapeList changes from review 2023-03-01 14:24:40 +01:00