Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from FreeCAD:main #1726

Open
wants to merge 4,261 commits into
base: main
Choose a base branch
from
Open

[pull] main from FreeCAD:main #1726

wants to merge 4,261 commits into from

Conversation

pull[bot]
Copy link

@pull pull bot commented Jan 5, 2024

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

chennes and others added 21 commits December 6, 2024 12:10
…ck-should-not-change-PickRadius

Gui: Remove rogue preferences from PreferencePacks (Light theme should not change PickRadius)
Core datums : Card2 : Core implementation
Description of Defects in migrationScript2 and migrationScript4:

Several additional issues have been identified in the Assembly
functions migrationScript4 and migrationScript2, beyond those fixed in
patch 71f0104.

One common problem is that the Joint property Reference1 or Reference2
can be set to an invalid format. For example, user can manually cause
this issue by assigning an incorrect reference (e.g., the Z-axis) to
these properties via the FreeCAD GUI.  When this happens, internal
errors (exceptions and their corresponding Python call stack) are
reported in the Report View.  However, such information is not helpful
for the user to fix their 3D model.

Issues with the Current Implementation (Using migrationScript4 as
Reference):

- Lack of Type Validation for Reference1 and Reference2:

  The script does not check whether joint.Reference1[1] or
  joint.Reference2[1] is a sequence. If this condition is not met,
  statements like:

    sub1 = joint.Reference1[1][0]

  will throw an exception, printing the Python call stack.

- Lack of Length Validation for Sequences:

  The script does not ensure that the sequence length is sufficient
  for indexing. For example, joint.Reference1 and joint.Reference2
  must each have at least two elements to allow:

    joint.Reference1[1][1]
    joint.Reference2[1][1]

  Without validation, such calls can result in exceptions, printing the
  Python call stack.

- No Feedback on Problematic Joint:

  The user is not informed about which Assembly joint in the object
  hierarchy has an invalid Reference1 or Reference2. Depending on the
  size of the 3D model, identifying the defect can be time-consuming
  and frustrating without proper feedback.

This patch is focused on:

- Reporting Problematic Joint Path:

  A new function has been added to retrieve the full path to the
  Assembly joint. The return value (a string) is used to report the
  issue.

- Improved Exception Handling:

  Instead of adding more conditional checks (see above), exception
  handling is implemented. AttributeError, IndexError, and TypeError
  exceptions are caught. The exception message (excluding the call
  stack) is displayed at the end of a user-friendly warning.

- User-Friendly Warnings in the Report View:

  A single-line warning is now shown in the Report View, containing
  the following details:

    - Source of Warning:              'Assembly joint'
    - Location in the 3D Model: e.g., 'Assembly_XY.object_XY.joint_XY'
    - Problematic Attribute: e.g.,    'ReferenceXY'
    - Exception Message: e.g.,        'list index out of range'

- Refactoring and Optimization:

  The functions were refactored and optimized at the end of the
  conversion process.

Advantages:

- Cleaner Report View:
  Internal errors (e.g., Python call stacks) are no longer logged in
  the Report View, as they are not useful for end users. Only the
  exception message is displayed.

- Improved User Feedback:
  Users can now identify the problematic Assembly joint in the object
  hierarchy, saving significant time and effort.

- Robust and Concise Code:
  The solution simplifies the code while increasing its robustness.
* Initial UI mockup for notification area settings

* First iteration of adapting the code to the Notification area settings UI reorg

* Remove redundant code to enable/disable widgets

* Reorganize notification area settings UI, improve settings and tooltips text

* Auto-wrap tooltips, add tooltips for each group

* Remove trailing space

* Fix merge error

* Further fixes from merge error

---------

Co-authored-by: WandererFan <[email protected]>
Obtaining specific kind of document object is very common task. This
commit introduces handy helper which makes that a lot easier.
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.
Gui: Add getObject<T>() helpers to various classes
…d filters (#18328)

* FEM: Update resulttools.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* FEM: Update resulttools.py

* FEM: Update commands.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* FEM: Update resulttools.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Update and rename stale_issues.yml to auto-close_stale_issues_and_pull-requests.yml
Set ascending: true
The syntax of type hints in Python is 'argument name: argument type'.
For more details see: https://docs.python.org/3/library/typing.html
3x380V and others added 30 commits December 23, 2024 17:48
Silences compiler warning about missing expected macro argument (MSVC warning C4003).
* Addon Manager: Refactor utilities tests to remove filesystem use

* Addon Manager: Move process_date_string_to_python_datetime to utilities

Also add unit tests and modify the exception type

* Addon Manager: Add tests for other date separators

* Addon Manager: Refactor to reduce duplication

* Addon Manager: add explanation of why the function exists

* Addon Manager: use exception chaining

* Addon Manager: Remove unused test files
Fem: Add preference entry to set Netgen (new implementation) log verbosity and number of threads for meshing
* [TD]fix SectionLine colour (fix 17831 part 1)

* [TD]fix wrong rotation in Section task (fix 17831 part 2)
In older versions it was possible to copy elements with drag and drop by holding the CTRL key. Since v0.20 or v0.21 this wasn't possible any
more so that elements are always moved.

Note: Copying is only allowed for elements that have a parent object.
Deprecated in clang-tidy 16 and removed in clang-tidy 18.
Ensure that this part of the Addon Manager can be tested outside
FreeCAD by falling back to explicit PySide imports.
The current structure of the CI system explicitly lists the tests to run, and several recently-added test executables were not included in the list.
* [Meas]Changes for TD dimension refs for links

* [TD]App changes for dim refs to links

* [TD]Gui changes for dim refs to links

* [TD]fix 2 lint messages

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
(found while searching for the build error on armhf/armel on Debian
buildds, once resolved will make an additional PR for that.)

$grep -r GL_MULTISAMPLE src/
yields:

 src/Mod/Sandbox/Gui/Overlay.cpp: #ifndef GL_MULTISAMPLE
 src/Mod/Sandbox/Gui/Overlay.cpp: #define GL_MULTISAMPLE  0x809D
 src/Mod/Sandbox/Gui/GLGraphicsView.cpp:#ifndef GL_MULTISAMPLE
 src/Mod/Sandbox/Gui/GLGraphicsView.cpp:#define GL_MULTISAMPLE  0x809D

-> The defines are defined, but never used in the compilation unit
(Background is issue #18622)

CMake errors out when the Kuka files are removed with:

```
CMake Error at cMake/FreeCadMacros.cmake:79 (ADD_CUSTOM_COMMAND):
  ADD_CUSTOM_COMMAND called with wrong number of arguments.
Call Stack (most recent call first):
  src/Mod/Robot/CMakeLists.txt:47 (fc_target_copy_resource)
```

The problem is that while the CMake code checks whether /src/Mod/Robot/Lib/Kuka is there befor setting Robot_Resources, but then later still uses the variable, even if it hasn't been set.

The patch just guards the failing fc_target_copy_resource with another if that checks whether the variable has been defined.

CMake install would also fail when Lib is empty, so another guard is required for the `INSTALL( DIRECTORY Lib` … section.
Stairs can do without Base.  Base validity is tested in code.

EnsureBase() is remarked out.
The related functions were introduced in V0.19. They should not be also available under CamelCase names.
…Case-names

Draft: Remove unnecessary CamelCase names
Fixes #18315.

In the issue discussion the more obvious solution (change the MakeFace property of the Draft_Wires) was missed.
…ests-independent-of-fillmode

Draft: Make test_modification tests independent of fillmode
…or-Draft-tests

Draft: Introduce base classes for Draft tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.