cadenasgmbh / 3dfindit-freecad-integration

GNU Lesser General Public License v3.0
26 stars 6 forks source link

Compatibility issue with Ondsel due to version number check #16

Open tomaszn opened 6 months ago

tomaszn commented 6 months ago

First of all, thank you for providing and maintaining this useful addon!

The addon currently refuses to start if int(FreeCAD.Version()[1]) < 19. Such a version check causes compatibility issues with the Ondsel distribution of FreeCAD, which uses Calendar Versioning (CalVer). Ondsel is a well-mantained distribution of FreeCAD with numerous improvements.

For the latest Ondsel, FreeCAD.Version() returns:

[
  '2024', '2', '0', '37191 (Git)', 'https://github.com/Ondsel-Development/FreeCAD',
  '2024/05/06 20:55:31', '(HEAD detached at 2024.2.0)', '2ad5fb327d068ae6280cf702d528b3a6e35770a7'
]

As we can see, Version()[1] equals 2, causing the addon to not start even though the required features are present.

Steps to Reproduce:

  1. Install the latest version of Ondsel FreeCAD.
  2. Open the Addon Manager and install this addon.
  3. Observe that the addon refuses to start and displays an error message: "3DfindIT: FreeCAD below version 0.19 is not supported. Please update to a recent version."

Expected Behavior: The addon should start if the required features are present, regardless of the versioning scheme used by the FreeCAD distribution.

Proposed Solution: Modify the version check to verify the existence of the required features rather than relying on the version number. This change would ensure compatibility with any FreeCAD distribution, including those using alternative versioning schemes like Ondsel.

Workaround: It is possible to install the addon by extracting it into to the Mod subdirectory inside the directory pointed to by FreeCAD.ConfigGet("UserAppData") value, and removing the version checks near the end of the file freecad/cadenas3dfindit/init_gui.py.

tsielaff commented 6 months ago

I agree. Will fix with the next update of the plugin.

nenadandric commented 2 months ago

Hello, Addon is also not working in FreeCAD 0.22.0dev (rev. 38555, Kubuntu). It is installed, selected, but after trying to use it from toolbar, FC crashes with following message: Could not find QtWebEngineProcess /tmp/.mount_FreeCA8aVMTT/AppRun: line 41: 326317 Aborted

It works well in 0.21.2 (appimage version)

In FreeCAD rev 38556 (snap edge, Kubuntu 24.04.1) cannot import name 'QtWebEngineWidgets' from 'PySide2' (/snap/freecad/1121/usr/lib/python3/dist-packages/PySide2/__init__.py)