Cube menu

A forum for research and development of the user interface of FreeCAD

Moderator: agryson

chrisb
Posts: 33592
Joined: Tue Mar 17, 2015 9:14 am

Re: Cube menu

Postby chrisb » Tue Apr 06, 2021 6:30 am

Tanuki44 wrote:
Mon Apr 05, 2021 9:47 pm
With the latest dev. versions 0.20, Menu commands : Isometric, Dimetric, Trimetric not working. :(

Just little bad, this addon is very cool ;)
It works here. You can try to reset the configuration with the button in the preferences. Another possibility is to delete your config files or to move them in case you want to restore them.
If the problem persists, create a new topic, because it has nothing to do with the Cube, and add your full FreeCAD info.

Minor point on wording: This is not an addon it is buildin into the core system.

OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.20.24612 (Git)
Build type: Release
Branch: master
Hash: f525904c1be10a0f55aa3502151c2c55e5054259
Python version: 3.9.2
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.1
Locale: C/Default (C)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Syres
Posts: 975
Joined: Thu Aug 09, 2018 11:14 am

Re: Cube menu

Postby Syres » Tue Apr 06, 2021 9:33 am

chrisb wrote:
Tue Apr 06, 2021 6:30 am
Tanuki44 wrote:
Mon Apr 05, 2021 9:47 pm
With the latest dev. versions 0.20, Menu commands : Isometric, Dimetric, Trimetric not working. :(
If the problem persists, create a new topic, because it has nothing to do with the Cube, and add your full FreeCAD info.

Minor point on wording: This is not an addon it is buildin into the core system.
Sorry Chris but you're incorrect, the report is genuine regarding the CubeMenu addon. I'll look into it as @triplus hasn't been too active recently so any fixes will be posted here. I'm in the minority in hating the NavCube just as much as I hate the gizmos in Blender but I'll try and help.
Syres
Posts: 975
Joined: Thu Aug 09, 2018 11:14 am

Re: Cube menu

Postby Syres » Tue Apr 06, 2021 12:07 pm

Tanuki44 wrote:
Mon Apr 05, 2021 9:47 pm
With the latest dev. versions 0.20, Menu commands : Isometric, Dimetric, Trimetric not working. :(
I'm afraid this is beyond my capabilities to determine why these specific commands nolonger work and the others still work as before. I've tried numerous small changes on the C++ side to find the culprit, sorry.
chrisb
Posts: 33592
Joined: Tue Mar 17, 2015 9:14 am

Re: Cube menu

Postby chrisb » Tue Apr 06, 2021 12:31 pm

Syres wrote:
Tue Apr 06, 2021 9:33 am
Sorry Chris but you're incorrect, the report is genuine regarding the CubeMenu addon.
Sorry, my fault.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
zisoft
Posts: 10
Joined: Thu Mar 25, 2021 6:23 pm
Contact:

Re: Cube menu

Postby zisoft » Tue Apr 06, 2021 5:25 pm

Tanuki44 wrote:
Mon Apr 05, 2021 9:47 pm
With the latest dev. versions 0.20, Menu commands : Isometric, Dimetric, Trimetric not working. :(
Yes, that's the reason why I rolled back to 0.20-24511. After that, it's broken.
Tanuki44
Posts: 3
Joined: Mon Apr 05, 2021 9:27 pm

Re: Cube menu

Postby Tanuki44 » Wed Apr 07, 2021 7:32 am

Thank you for having tried anyway ;)
Syres
Posts: 975
Joined: Thu Aug 09, 2018 11:14 am

Re: Cube menu

Postby Syres » Wed Apr 07, 2021 11:56 am

Tanuki44 wrote:
Wed Apr 07, 2021 7:32 am
Thank you for having tried anyway ;)
One thing I have determined is the exact commit that has introduced the issue : git commit f525904
Tanuki44
Posts: 3
Joined: Mon Apr 05, 2021 9:27 pm

Re: Cube menu

Postby Tanuki44 » Thu Apr 08, 2021 7:58 pm

Alas, I do not have the skills to understand that.

One thing I do not understands, in the python console, the commandline (for example):

>>> Gui.activeDocument().activeView().viewDimetric() works correctly

But with the menu that sends the same command (Finally that's what is displayed in the console) :

>>> ### Begin command Std_ViewDimetric
>>> Gui.activeDocument().activeView().viewDimetric()
>>> ### End command Std_ViewDimetric

does not work ...

It seems that sending this commandline : Gui.runCommand('Std_ViewDimetric') works but how to change the menu ? ...
zisoft
Posts: 10
Joined: Thu Mar 25, 2021 6:23 pm
Contact:

Re: Cube menu

Postby zisoft » Sat Apr 10, 2021 1:31 pm

I have made some analysis here. To make a simple test, I added a call to Std_ViewDimetric just when the cube menu pops up:

Code: Select all

def onShow():
    """Populate menu on show."""

    Gui.runCommand('Std_ViewDimetric')

    cpcmd.populateTop()
This works as expected. Immediately when the menu opens, the view is set to isometric. But when the menu closes, the previous view is restored.

That means, no matter what action is called in the cube menu, after any action the previous view is immediately restored.