Glass

A forum for research and development of the user interface of FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Glass

Post by Jee-Bee »

it is not a Workbench in the workbench way so it doesn't appear in the list of workbenches.
and yes you need Qt5.
User avatar
dcapeletti
Posts: 504
Joined: Wed Jul 23, 2014 2:27 pm

Re: Glass

Post by dcapeletti »

Good. How do I activate it?
In the python terminal I run:

Code: Select all

>>> from PySide import QtCore
>>> QtCore.qVersion()
'4.8.6'
If I run this on a terminal using python:

Code: Select all

>>> from PyQt5 import QtCore
>>> QtCore.qVersion()
'5.7.1'
But in the python console of freecad I have '4.8.6' so Glass will never load. How can I update it?

Thanks
User avatar
OficineRobotica
Posts: 427
Joined: Thu Feb 21, 2019 8:17 am
Contact:

Re: Glass

Post by OficineRobotica »

Wow...i'vd been waiting for something like this for a long time. Thank you for your work.
I have a problem tough when activating it.



glass.png
glass.png (150.99 KiB) Viewed 3480 times



Also , if i can make a suggestion it would be so useful if we could make an arrangement of the toolboxes something like this:



glass_arrangement.png
glass_arrangement.png (278.37 KiB) Viewed 3480 times



You man, deserve a beer.


OS: Ubuntu 18.10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15860 (Git)
Build type: Release
Branch: master
Hash: 3b708c7f84b0425076b520e1d95627b20fd75fe0
Python version: 2.7.15+
Qt version: 5.11.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Italian/Italy (it_IT)
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Glass

Post by Jee-Bee »

You have to compile FC against Qt5
If you need help you are free to ask in the install/ compile sub forum. I'm quite sure it is ask before also about the ppa is asked before...
User avatar
easyw-fc
Veteran
Posts: 3622
Joined: Thu Jul 09, 2015 9:34 am

Re: Glass

Post by easyw-fc »

or download and use a Conda build Qt5/Py3 (Appimage Conda for Linux)
User avatar
OficineRobotica
Posts: 427
Joined: Thu Feb 21, 2019 8:17 am
Contact:

Re: Glass

Post by OficineRobotica »

Yes ...my bad. I tried the appimage version and it works as intended.
User avatar
dcapeletti
Posts: 504
Joined: Wed Jul 23, 2014 2:27 pm

Re: Glass

Post by dcapeletti »

OficineRobotica wrote: Sun Feb 24, 2019 5:32 pm Yes ...my bad. I tried the appimage version and it works as intended.
It works :)

I wonder, the image conda pyqt5 would be the newest thing to come in freecad. You could explain the difference between the appimage without conda (glibc2).

Thanks
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Glass

Post by NormandC »

The glibc2 AppImage (without Conda) is produced from the PPA repository for Ubuntu, which is still based on Python 2.x but will be updated to Python3 at some point.

Conda is a completely different, cross-platform way of creating packages. The PPA is exclusively for Ubuntu and derivatives (Linux Mint). The advantage of the PPA is that it is a system-installed package, it relies on libraries from the system, so its size is smaller than the AppImage, which comes with all necessary libraries (thus duplicates those already installed on the host system). Also, the PPA's updates are managed by the system's update manager. With the PPA you don't have to check for updates, they come automatically to you. On the other hand, the advantage of AppImage is that they are portable across Linux distros, are self-contained, don't rely on the system's libraries (I think?), which may be outdated/incompatible on some Linux systems.
User avatar
regis
Posts: 725
Joined: Sun Jul 12, 2015 8:17 am
Contact:

Re: Glass

Post by regis »

why don't we just remove the version that works with python 2.7 and qt4 since it's getting most confused?
User avatar
OficineRobotica
Posts: 427
Joined: Thu Feb 21, 2019 8:17 am
Contact:

Re: Glass

Post by OficineRobotica »

Hello @triplus .

I'vd used your module and i must say that it becomes difficult to go back to the old interface. I really wish that Glass evolves to it's full potential. To my humble opinion this finally gives freecad a beautiful modern appearance and most of all, although the overlay docks might occupy the same physical space as classic docks, the perceived user experience is that of a much bigger work space.

That said Glass has becomed a learning experience for me after trying to fidle with the addon. Please help me with some aspects of modifying it.

1-given that the appimage takes a while to start and it doesn't retain the main freecad stylesheet preference i tried reloding the module with this instead of restarting the app

Code: Select all

>>> from importlib import reload
>>> import GlassGui
>>> reload(GlassGui)
<module 'GlassGui' from '/home/.../.FreeCAD/Mod/Glass/GlassGui.py'>

the problem is that the module doesn't refresh on screen and even the Q-1 shortcut stops working so a restart is needed.

2-at least for starters i would like to load the tree view instead of the combo view (that is till more widgets get implemented). I tried changing line 35 of GlassGui.py with:

Code: Select all

dock = mw.findChild(QtGui.QDockWidget, "Tree View")
but Glass stoped working completely. What em i doing wrong?

3-the main reason for me trying to modify the addon was to improve usability until you implement those features in a proper sane and informed way. I'm not a coder , i just saw a awesome adition to freecad and i got excited about the possibilities that it offers. So i tried to modify line 77 of GlassGui.py with:

Code: Select all

widget.setStyleSheet("./Resources/glass.qss")
for styling in an external file but either the pointer to that file is wrong or the formating of the .qss file so glass doesn't pick up the styling anymore after that.
Unfortunately i discovered that styling qt text can't be done directly with a style sheet but it is available trough PySyde QGraphicsEffect . I'm most interested in text outline and background blur. https://srinikom.github.io/pyside-docs/ ... ffect.html
I don't know if a widget with transparent background and and blur applied would pick the pixels underneath it (i know that on desktop that is the compositor work) but even implementing it with transparent background->noise map(as target image)->qtblur would be awesome and could potentially give a result like this
mokup3.png
mokup3.png (397.34 KiB) Viewed 3302 times


or this
mokup.jpg
mokup.jpg (344.01 KiB) Viewed 3302 times
Unfortunately implementing that is simply beyond me. I'm still at the lesson right after HelloWorld.cpp lol , but belive me that i'm trying really hard to find the time to study.
I'm sorry for the long post but i don't want to flood the thread with one thousand posts so i tried to gather it all together.
Thank you for your hard work.


OS: Ubuntu 18.10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15900 (Git) AppImage
Build type: Release
Branch: master
Hash: a73b10203ab1cb31df4a8763b050d64da8e81580
Python version: 3.6.7
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Italian/Italy (it_IT)
Post Reply