FreeCAD / FreeCAD-addons

A convenient gathering of useful and well-developed FreeCAD plugins made by the community.
769 stars 253 forks source link

added Bill of Materials workbench to .gitmodules #288

Closed APEbbers closed 9 months ago

APEbbers commented 9 months ago

This is a workbench to create Bill of Materials with support for different types of assemblies. Currently this workbench works with:

I'm still working on this workbench, but i believe it is now in a state that it can be usefull already. The support for the following assemblies, workbenches and futures are planned for the future:

chennes commented 9 months ago

Hello @APEbbers, thanks for the new WB. I see that your package.xml asserts a dependence on PySide6 and shiboken6, but your actual code depends on PySide2 and shiboken2. Neither of these things is desirable: to fix it you should first remove the stated dependencies in your package.xml file. FreeCAD will provide the required versions of PySide and Shiboken, you don't need to list them there. Second, in your Addon you should not import directly from any version of PySide (e.g. don't use PySide2 or PySide6, but rather simply use PySide -- FreeCAD provides wrappers that will select the correct version. So for example, from PySide import QtCore. Then, make sure you don't use any Qt5-only features, such as QRegExp.

APEbbers commented 9 months ago

Hello @chennes ,

I've modfied the files. I've changed PySide2/6 into PySide. I've done this also for the UI files generated by QtDesigner. But am I correct that this means that I have manually change the files that are created by QtDesigner when I update or change the interface?

Kind regards,

Paul

chennes commented 9 months ago

Yes: Qt doesn't have the notion of supporting both Qt5 and Qt6 with the same code.