Test request: quarter based viewer

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

Re: Test request: quarter based viewer

Postby wmayer » Thu Oct 23, 2014 9:17 am

Looks like there is a face-sorting issue.. or whatever is responsible for z-ordering - I don't know the internals.
Here is a default cone from part wb. When it's opaque - it's perfect. But if I make it transparent - it looks like some side faces are rendered after the bottom face.
Might be the same thing as reported here: viewtopic.php?f=3&t=8131
Do you also get this with the old viewer or only with Quarter?
wmayer
Site Admin
Posts: 14644
Joined: Thu Feb 19, 2009 10:32 am

Re: Test request: quarter based viewer

Postby wmayer » Thu Oct 23, 2014 9:24 am

nahshon wrote:Selection is not consistent when having multiple views and an editor is active. I do not know if it's related to quarter.
Right. That's something shoogen reported a week ago. There is a problem with the focus of the views which must be related to the change to Quarter.
And a bug (this happens also in single view).
Yes, that shouldn't be possible.
User avatar
DeepSOIC
Posts: 6873
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Test request: quarter based viewer

Postby DeepSOIC » Thu Oct 23, 2014 9:38 am

wmayer wrote:Do you also get this with the old viewer or only with Quarter?
Yes, it was there before Quarter, as I have discovered shortly after reporting. See EDIT2 part of my original post. So it's not related with a move to Quarter.
wmayer
Site Admin
Posts: 14644
Joined: Thu Feb 19, 2009 10:32 am

Re: Test request: quarter based viewer

Postby wmayer » Thu Oct 23, 2014 10:33 am

DeepSOIC wrote:
wmayer wrote:Do you also get this with the old viewer or only with Quarter?
Yes, it was there before Quarter, as I have discovered shortly after reporting. See EDIT2 part of my original post. So it's not related with a move to Quarter.
You talked only about the transparency issue (which I can confirm with 0.14 too) but you said nothing whether the cone issue is also there with the old viewer. That's why I asked.
User avatar
DeepSOIC
Posts: 6873
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Test request: quarter based viewer

Postby DeepSOIC » Thu Oct 23, 2014 4:58 pm

Yep, in 0.14 the issue is present in the cone case. Note that it is also a transparency issue.
transparent cone problem.FCStd
(2.49 KiB) Downloaded 22 times
OS: Windows 7 (bullshit! it's Windows 8.1)
Word size: 64-bit
Version: 0.14.3700 (Git)
Branch: releases/FreeCAD-0-14
Hash: 32f5aae0a64333ec8d5d160dbc46e690510c8fe1
Python version: 2.7.6
Qt version: 4.8.5
Coin version: 4.0.0a
SoQt version: 1.6.0a
OCC version: 6.6.0
wmayer
Site Admin
Posts: 14644
Joined: Thu Feb 19, 2009 10:32 am

Re: Test request: quarter based viewer

Postby wmayer » Sat Oct 25, 2014 12:54 pm

shoogen wrote:It seems that the change of focus of the mdi windows gets lost, and subsequently clicking the docked window does not trigger a focus changed event. when i change to the start window and back to the docked 3d view, the (docked/undocked)-status is reported correctly by the radio buttons.
https://www.youtube.com/watch?v=V7O8xT6TaAM
This behaviour is NOT related to Quarter because I could reproduce it with the old viewer, too. The important point is how a view is activated.

Example:
* Create a document
* Create a second document (or a second view of the first document. It doesn't make a difference.)
* Press "U"
* Click with the mouse on the main window to activate it
* Press "U"
=> No reaction.

Now do it this way:
* Create a document
* Create a second document (or a second view of the first document. It doesn't make a difference.)
* Press "U"
* Press ALT+TAB to activate the main window
* Press "U"
=> Second view is undocked.

So, this means that if the main window is activated by mouse-click the docked view doesn't become active.
looo
Posts: 2749
Joined: Mon Nov 11, 2013 5:29 pm

Re: Test request: quarter based viewer

Postby looo » Wed Nov 05, 2014 3:25 pm

I would like to try out the new possibilities of the quarter viewer. Is it allready possibly to draw pyside widgets over the scene? And if yes is it possible to draw another viewer-widget in the viewer? This would be awsome :D
ickby
Posts: 2914
Joined: Wed Oct 05, 2011 7:36 am

Re: Test request: quarter based viewer

Postby ickby » Wed Nov 05, 2014 3:39 pm

The intended easy to access and se infrastructure is still in the making, but in theory you can already use it. The View3DInventorViewer is now derived from QGraphicsView. I'm just not sure if you can cast it somehow to the python QGraphicsView class to access its methods... But if you manage to do that you can use the QGraphicsView api to get the GraphicsScene and add widgets to it.

As it is not intended to be used right now with widgets you will have a few mouse event issues. I already added a rough implementation to make that work but more needed fine tuning is only available in a personal branch.

And also note that I may decide one day to dissallow direct access to the scene, so everything you write right now may be obsolete one day.
looo
Posts: 2749
Joined: Mon Nov 11, 2013 5:29 pm

Re: Test request: quarter based viewer

Postby looo » Wed Nov 05, 2014 4:51 pm

I have tried already... but I fear my python skills are not good enought to get that done. I can't access the GraphicsView methodes of the viewer.

Why would you want to disable direct access to the scene?
wmayer
Site Admin
Posts: 14644
Joined: Thu Feb 19, 2009 10:32 am

Re: Test request: quarter based viewer

Postby wmayer » Thu Nov 06, 2014 10:20 am

Code: Select all

from PySide import QtGui
mw=FreeCADGui.getMainWindow()
view=mw.findChild(QtGui.QGraphicsView)
scene=view.scene()
item=scene.addWidget(QtGui.QCalendarWidget())