Release of 0.18

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
wmayer
Site Admin
Posts: 13366
Joined: Thu Feb 19, 2009 10:32 am

Re: Release of 0.18

Postby wmayer » Thu Dec 06, 2018 12:42 pm

yorik wrote:
Thu Dec 06, 2018 12:12 pm
Ok so it seems really dependent on Qt version, for some it works, for some not. In any case indeed the thumbnail generation is more a cosmetic thing. Tools -> Save image is more important, though, it's a real feature.
wmayer wrote:
Thu Dec 06, 2018 9:24 am
my native Linux system is too old to have a Qt5 version there
Now you got me curious :) Slackware?
No, it's also an Ubuntu but 14.04. It already has Qt5 packages but only 5.2 and it's probably pointless to try to use this ancient version. Also PySide2 is not available for it.
wmayer
Site Admin
Posts: 13366
Joined: Thu Feb 19, 2009 10:32 am

Re: Release of 0.18

Postby wmayer » Thu Dec 06, 2018 12:42 pm

NormandC wrote:
Thu Dec 06, 2018 12:38 pm
Are we taking bets? :D I say Ubuntu 14.04.
LOL. You won!
User avatar
NormandC
Posts: 17221
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Release of 0.18

Postby NormandC » Thu Dec 06, 2018 3:12 pm

I must admit I cheated a bit. You mentioned it a few times on the forum, and I have a good memory. :D
triplus
Posts: 7609
Joined: Mon Dec 12, 2011 4:45 pm

Re: Release of 0.18

Postby triplus » Sat Dec 08, 2018 10:33 am

wmayer wrote:
Fri Nov 30, 2018 11:40 am
Yes, the runtime option makes most sense and gives the user full control of what he prefers. git commit 426bc0118 adds this parameter and its default value is handled by the cmake option so that users don't have to change anything.
Nice!

Enable native file dialog/manager on Linux:

Code: Select all

p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Dialog")
p.SetBool("DontUseNativeDialog", False)
Disable native file dialog/manager on Linux (default):

Code: Select all

p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Dialog")
p.RemBool("DontUseNativeDialog")
Or:

Code: Select all

p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Dialog")
p.SetBool("DontUseNativeDialog", True)
abdullah wrote:
Tue Dec 04, 2018 6:01 pm
It is December... something missing? ;)
As for the Py3/Qt5 issues. Like screenshot/thumbnail support. In my opinion this are great features, used by a lot of end users, and hopefully eventually will work reliably on all platforms. From FreeCAD 0.18 release point of view, they are likely not blocking issues. FreeCAD 0.19 development cycle is where focus will shift to Py3/Qt5 and therefore if such issues will get resolved for FreeCAD 0.19. That would be great.
abdullah
Posts: 2662
Joined: Sun May 04, 2014 3:16 pm

Re: Release of 0.18

Postby abdullah » Sat Dec 08, 2018 2:40 pm

Sorry guys, but I have been offline for a while.

At least for the next week I won't be able to fix bugs.

Regarding the QT5/Thumbnail issue. In my Ubuntu 18.04 box with metacity it does not work without the "patch". Because it seems to be really segmented (window-manager, theme, version,...), I do not think we will be able to find a useful solution. Maybe when we switch the PPA to py3/QT5 we start to have clearer picture.

I see Normand's feedback:
https://forum.freecadweb.org/memberlist ... file&u=202

Are these the only remaining issues?

I can try to take a look in two weeks...
abdullah
Posts: 2662
Joined: Sun May 04, 2014 3:16 pm

Re: Release of 0.18

Postby abdullah » Sun Dec 09, 2018 10:44 am

OS: Ubuntu 18.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15363 (Git)
Build type: Debug
Branch: thumb_fixes
Hash: 9be3e633328335f1172456f5857219b7a08c70a5
Python version: 2.7.15rc1
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0

I had some time to build the latest FreeCAD. Personally I am not attached to python2, so python2 issues won't affect me personally. I am building it with py2/qt5 just for checking potential issues.

Again I confirm the problem of the thumb with metacity. I am thinking of putting a checkbox in the preferences "Fix Qt5 thumbnail generation" and dynamically selecting between the alpha/non-alpha versions. I might be able to do a PR this evening.

I still have problems with this py2/qt5 build to load the Draft WB. The first error seems to indicate that I need the Python-pyside package, which I do not think I need, as with qt5 I should be using the pyside2 one, but which nevertheless I have installed. Maybe it is just me, but if it is not just me and we are thinking of providing py2/qt5 releases this may be an issue.

Code: Select all

Error: Python-pyside package must be installed on your system to use the Draft module.name 'QtGui' is not defined
Error: Initializing one or more of the Draft modules failed, Draft will not work as expected.
Loading Draft module...done
CommandManager::addTo() try to add an unknown command (Draft_Line) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Wire) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Circle) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Arc) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Ellipse) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Polygon) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Rectangle) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Text) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Dimension) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_BSpline) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Point) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_ShapeString) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Facebinder) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_BezCurve) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Label) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Move) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Rotate) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Offset) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Trimex) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Upgrade) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Downgrade) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Scale) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Edit) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_WireToBSpline) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_AddPoint) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_DelPoint) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Shape2DView) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Draft2Sketch) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Array) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_PathArray) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_PointArray) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Clone) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Drawing) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Mirror) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Stretch) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Line) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Wire) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Circle) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Arc) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Ellipse) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Polygon) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Rectangle) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Text) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Dimension) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_BSpline) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Point) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_ShapeString) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Facebinder) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_BezCurve) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Label) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Move) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Rotate) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Offset) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Trimex) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Upgrade) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Downgrade) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Scale) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Edit) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_WireToBSpline) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_AddPoint) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_DelPoint) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Shape2DView) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Draft2Sketch) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Array) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_PathArray) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_PointArray) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Clone) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Drawing) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Mirror) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Stretch) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_VisGroup) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Heal) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_FlipDimension) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_ToggleConstructionMode) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_ToggleContinueMode) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Edit) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Slope) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_SetWorkingPlaneProxy) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_AddConstruction) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_ApplyStyle) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_ToggleDisplayMode) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_AddToGroup) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_SelectGroup) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_SelectPlane) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_ShowSnapBar) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_ToggleGrid) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_AutoGroup) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_UndoLine) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_FinishLine) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_CloseLine) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_Lock) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_Midpoint) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_Perpendicular) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_Grid) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_Intersection) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_Parallel) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_Endpoint) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_Angle) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_Center) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_Extension) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_Near) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_Ortho) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_Special) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_Dimensions) to a widget!
CommandManager::addTo() try to add an unknown command (Draft_Snap_WorkingPlane) to a widget!
Draft workbench activated
I do have the python-pyside package installed:

Code: Select all

ii  libpyside-dev                          1.2.2+source1-3          amd64                    Python bindings for Qt 4 (development files)
ii  libpyside-py3-1.2:amd64                1.2.2+source1-3          amd64                    Python3 bindings for Qt 4 (base files)
ii  libpyside1.2:amd64                     1.2.2+source1-3          amd64                    Python bindings for Qt 4 (base files)
ii  libpyside2-5.11                        5.11.2-0ppa2~ubuntu18.04 amd64                    Python 2 bindings for Qt5 (base files)
ii  libpyside2-dev                         5.11.2-0ppa2~ubuntu18.04 amd64                    Python bindings for Qt5 (development files)
ii  libpyside2-py3-5.11                    5.11.2-0ppa2~ubuntu18.04 amd64                    Python 3 bindings for Qt5 (base files)
ii  pyside-tools                           0.2.15-1build1           amd64                    development tools for PySide (uic, rcc, lupdate)
ii  pyside2-tools                          5.11.2-0ppa2~ubuntu18.04 amd64                    development tools for PySide2 (uic, rcc, lupdate)
ii  python-pyside                          1.2.2+source1-3          all                      Python bindings for Qt4 (big metapackage)
ii  python-pyside.phonon                   1.2.2+source1-3          amd64                    Qt 4 Phonon module - Python bindings
ii  python-pyside.qtcore                   1.2.2+source1-3          amd64                    Qt 4 core module - Python bindings
ii  python-pyside.qtdeclarative            1.2.2+source1-3          amd64                    Qt 4 Declarative module - Python bindings
ii  python-pyside.qtgui                    1.2.2+source1-3          amd64                    Qt 4 GUI module - Python bindings
ii  python-pyside.qthelp                   1.2.2+source1-3          amd64                    Qt 4 help module - Python bindings
ii  python-pyside.qtnetwork                1.2.2+source1-3          amd64                    Qt 4 network module - Python bindings
ii  python-pyside.qtopengl                 1.2.2+source1-3          amd64                    Qt 4 OpenGL module - Python bindings
ii  python-pyside.qtscript                 1.2.2+source1-3          amd64                    Qt 4 script module - Python bindings
ii  python-pyside.qtsql                    1.2.2+source1-3          amd64                    Qt 4 SQL module - Python bindings
ii  python-pyside.qtsvg                    1.2.2+source1-3          amd64                    Qt 4 SVG module - Python bindings
ii  python-pyside.qttest                   1.2.2+source1-3          amd64                    Qt 4 test module - Python bindings
ii  python-pyside.qtuitools                1.2.2+source1-3          amd64                    Qt 4 UI tools module - Python bindings
ii  python-pyside.qtwebkit                 1.2.2+source1-3          amd64                    Qt 4 WebKit module - Python bindings
ii  python-pyside.qtxml                    1.2.2+source1-3          amd64                    Qt 4 XML module - Python bindings
ii  python-pyside2.qtcore                  5.11.2-0ppa2~ubuntu18.04 amd64                    Python bindings for Qt5 core module (Python 2)
ii  python-pyside2.qtgui                   5.11.2-0ppa2~ubuntu18.04 amd64                    Python bindings for Qt5 Gui module (Python 2)
ii  python-pyside2.qtopengl                5.11.2-0ppa2~ubuntu18.04 amd64                    Python bindings for Qt5 OpenGL module (Python 2)
ii  python-pyside2.qtwidgets               5.11.2-0ppa2~ubuntu18.04 amd64                    Python bindings for Qt5 Widgets module (Python 2)
ii  python-pyside2uic                      5.11.2-0ppa2~ubuntu18.04 all                      User Interface Compiler for PySide2 (Python 2)
ii  python3-pyside                         1.2.2+source1-3          all                      Python3 bindings for Qt4 (big metapackage)
ii  python3-pyside.phonon:amd64            1.2.2+source1-3          amd64                    Qt 4 Phonon module - Python3 bindings
ii  python3-pyside.qtcore                  1.2.2+source1-3          amd64                    Qt 4 core module - Python3 bindings
ii  python3-pyside.qtdeclarative:amd64     1.2.2+source1-3          amd64                    Qt 4 Declarative module - Python3 bindings
ii  python3-pyside.qtgui:amd64             1.2.2+source1-3          amd64                    Qt 4 GUI module - Python3 bindings
ii  python3-pyside.qthelp:amd64            1.2.2+source1-3          amd64                    Qt 4 help module - Python3 bindings
ii  python3-pyside.qtnetwork:amd64         1.2.2+source1-3          amd64                    Qt 4 network module - Python3 bindings
ii  python3-pyside.qtopengl:amd64          1.2.2+source1-3          amd64                    Qt 4 OpenGL module - Python3 bindings
ii  python3-pyside.qtscript:amd64          1.2.2+source1-3          amd64                    Qt 4 script module - Python3 bindings
ii  python3-pyside.qtsql:amd64             1.2.2+source1-3          amd64                    Qt 4 SQL module - Python3 bindings
ii  python3-pyside.qtsvg:amd64             1.2.2+source1-3          amd64                    Qt 4 SVG module - Python3 bindings
ii  python3-pyside.qttest:amd64            1.2.2+source1-3          amd64                    Qt 4 test module - Python3 bindings
ii  python3-pyside.qtuitools:amd64         1.2.2+source1-3          amd64                    Qt 4 UI tools module - Python3 bindings
ii  python3-pyside.qtwebkit:amd64          1.2.2+source1-3          amd64                    Qt 4 WebKit module - Python3 bindings
ii  python3-pyside.qtxml:amd64             1.2.2+source1-3          amd64                    Qt 4 XML module - Python3 bindings
In fact, I have no problems at all in the same computer to load the daily build from the PPA (py2/qt4). Here Draft works as expected:

OS: Ubuntu 18.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15353 (Git)
Build type: Release
Branch: master
Hash: 20fe774784bd013c74c1edaed8985e851bb1370b
Python version: 2.7.15rc1
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
abdullah
Posts: 2662
Joined: Sun May 04, 2014 3:16 pm

Re: Release of 0.18

Postby abdullah » Sun Dec 09, 2018 11:22 am

PR for dynamically fixing thumbnail generation:
https://github.com/FreeCAD/FreeCAD/pull/1827
looo
Posts: 2126
Joined: Mon Nov 11, 2013 5:29 pm

Re: Release of 0.18

Postby looo » Sun Dec 09, 2018 12:29 pm

abdullah wrote:
Sun Dec 09, 2018 10:44 am
I still have problems with this py2/qt5 build to load the Draft WB. The first error seems to indicate that I need the Python-pyside package, which I do not think I need, as with qt5 I should be using the pyside2 one
In FreeCAD we still use the old PySide API. So "from PySide import QtCore" imports QtCore from PySide2. If you have both version of pyside installed it depends on where the PySide->PySide2 abstraction layer is placed in sys.path.

can you try the following:

Code: Select all

import PySide
import PySide2
print(PySide.__file__, PySide2.__file__)
In my case this gives:

Code: Select all

/home/lo/conda/envs/dakota/Ext/PySide/__init__.py /home/lo/conda/envs/dakota/lib/python3.6/site-packages/PySide2/__init__.py
the first is the abstraction layer and the second is the PySide2 module.
abdullah
Posts: 2662
Joined: Sun May 04, 2014 3:16 pm

Re: Release of 0.18

Postby abdullah » Sun Dec 09, 2018 12:45 pm

looo wrote:
Sun Dec 09, 2018 12:29 pm
abdullah wrote:
Sun Dec 09, 2018 10:44 am
I still have problems with this py2/qt5 build to load the Draft WB. The first error seems to indicate that I need the Python-pyside package, which I do not think I need, as with qt5 I should be using the pyside2 one
In FreeCAD we still use the old PySide API. So "from PySide import QtCore" imports QtCore from PySide2. If you have both version of pyside installed it depends on where the PySide->PySide2 abstraction layer is placed in sys.path.

can you try the following:

Code: Select all

import PySide
import PySide2
print(PySide.__file__, PySide2.__file__)
In my case this gives:

Code: Select all

/home/lo/conda/envs/dakota/Ext/PySide/__init__.py /home/lo/conda/envs/dakota/lib/python3.6/site-packages/PySide2/__init__.py
the first is the abstraction layer and the second is the PySide2 module.
Thanks for replying!!

I am going to pretend I fully understood the part of the abstraction layer in sys.path and provide you with the output of the code ;) :

('/home/abdullah/github/freecad-build/Ext/PySide/__init__.pyc', '/usr/lib/python2.7/dist-packages/PySide2/__init__.pyc')
looo
Posts: 2126
Joined: Mon Nov 11, 2013 5:29 pm

Re: Release of 0.18

Postby looo » Sun Dec 09, 2018 1:50 pm

abdullah wrote:
Sun Dec 09, 2018 12:45 pm
('/home/abdullah/github/freecad-build/Ext/PySide/__init__.pyc', '/usr/lib/python2.7/dist-packages/PySide2/__init__.pyc')
Looks good. So there must be another problem. The error-message seems to hide the real issue.