[fixed] [bug 4495] 45° rotation via NaviCube does not work

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: [bug 4495] 45° rotation via NaviCube does not work

Post by uwestoehr »

uwestoehr wrote: Tue Feb 23, 2021 2:01 am So what about this: since edges are new, they always rotate to nearest?
implemented.

---

Now the cube looks better also in large sizes. and I use proper triangles for the corners.
What do you think about the new layout?
User avatar
watsug
Posts: 100
Joined: Sat Sep 26, 2020 10:51 pm

Re: [bug 4495] 45° rotation via NaviCube does not work

Post by watsug »

uwestoehr wrote: Tue Feb 23, 2021 2:01 am Why should it be vertical? I designed it to become always horizontal when rotate to nearest is off.
Sorry if it wasn't clear; I meant like this. If a side-side is chosen it's vertical. If a top/bottom-side it's horizontal. So top is always up. But haven't tried how you made it now, maybe that's better.
EdgeRotate.png
EdgeRotate.png (17.72 KiB) Viewed 1930 times
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: [bug 4495] 45° rotation via NaviCube does not work

Post by uwestoehr »

watsug wrote: Tue Feb 23, 2021 11:30 am Sorry if it wasn't clear; I meant like this. If a side-side is chosen it's vertical. If a top/bottom-side it's horizontal. So top is always up.
But this is what I meant - you cannot rely on this. How would you for example rotate when the cube is in this state and the user presses the Top-Front edge?:
FreeCAD_WEw7O9w1uv.png
FreeCAD_WEw7O9w1uv.png (9.72 KiB) Viewed 1912 times
If you say, always horizontal, I can implement this for the case that "to Nearest" is off.
User avatar
watsug
Posts: 100
Joined: Sat Sep 26, 2020 10:51 pm

Re: [bug 4495] 45° rotation via NaviCube does not work

Post by watsug »

uwestoehr wrote: Tue Feb 23, 2021 1:36 pm
watsug wrote: Tue Feb 23, 2021 11:30 am Sorry if it wasn't clear; I meant like this. If a side-side is chosen it's vertical. If a top/bottom-side it's horizontal. So top is always up.
But this is what I meant - you cannot rely on this. How would you for example rotate when the cube is in this state and the user presses the Top-Front edge?:


If you say, always horizontal, I can implement this for the case that "to Nearest" is off.
I mean only if "to nearest" is off, then the edges next top TOP or BOTTOM faces always result in a horizontal, and the FRONT-RIGHT etc always vertical.
I was thinking it was closer to the behavior of the faces with "to nearest" off. The setting "to nearest" off is basically a more rigid way, where each face/edge/corner has only one "correct" orientation. But how you made it now feels good as well!

I like the new cube! But the top and bottom face is still slightly recessed? The triangle corner stick out a little.
TrianglePoint.png
TrianglePoint.png (20.95 KiB) Viewed 1885 times
Is it possible to know the orientation of the cube?
Idea is this: Click on a face to rotate to nearest. Click face again and cube is reoriented to the standard view. This would be useful for a quick way to reset the orientation.
NaviCube2ClickReset.png
NaviCube2ClickReset.png (31.46 KiB) Viewed 1885 times
Other thing that's in other apps and depending on orientation: If viewing a face straight on there are arrows to rotate to the other not currently visible faces. What do you think?
NaviCubeOtherFaceArrow.png
NaviCubeOtherFaceArrow.png (11.55 KiB) Viewed 1885 times
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: [bug 4495] 45° rotation via NaviCube does not work

Post by uwestoehr »

watsug wrote: Tue Feb 23, 2021 6:56 pm I mean only if "to nearest" is off, then the edges next top TOP or BOTTOM faces always result in a horizontal, and the FRONT-RIGHT etc always vertical.
OK, I will implement this that way. Many thanks for your valuable feedback!
I like the new cube! But the top and bottom face is still slightly recessed? The triangle corner stick out a little.
TrianglePoint.png
Yes, the triangle was too large, this is now fixed:
FreeCAD_d_LRIAbexw5Q.png
FreeCAD_d_LRIAbexw5Q.png (11.76 KiB) Viewed 1860 times

What I don't like are the small gaps between the faces and that there is no contrast visualizing the edges of the faces. I will work on this.
Is it possible to know the orientation of the cube?
Idea is this: Click on a face to rotate to nearest. Click face again and cube is reoriented to the standard view. This would be useful for a quick way to reset the orientation.
This is possible but is this really desired? I mean when you choose the "to Nearest" option you explicitely don't want to have extra turns. Otherwise you could bee "to nearest" off.
Other thing that's in other apps and depending on orientation: If viewing a face straight on there are arrows to rotate to the other not currently visible faces. What do you think?
This is a very good idea. I will implement this.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: [bug 4495] 45° rotation via NaviCube does not work

Post by uwestoehr »

uwestoehr wrote: Wed Feb 24, 2021 12:26 am
watsug wrote: Tue Feb 23, 2021 6:56 pm Other thing that's in other apps and depending on orientation: If viewing a face straight on there are arrows to rotate to the other not currently visible faces. What do you think?
This is a very good idea. I will implement this.
I have done this via a new button in form of a dot. This is its behavior (just rotates 180 degrees):
N71h4HNp5j.gif
N71h4HNp5j.gif (76.27 KiB) Viewed 1818 times

I also changed the edge rotation when the Nearest option is off as you requested - edges to Top and Bottom end up horizontally, the others vertically.

I am now the first time happy with how the cube looks.

I also added a new preferences dialog option to change the cube size.

Can you please give it a try?

(The corners are not yet working - will be next tomorrow)
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: [bug 4495] 45° rotation via NaviCube does not work

Post by mario52 »

hi

is it possible to change the text by an icon ? option text or icon on choice

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
User avatar
watsug
Posts: 100
Joined: Sat Sep 26, 2020 10:51 pm

Re: [bug 4495] 45° rotation via NaviCube does not work

Post by watsug »

The cube looks geometrically great and visible! Is the color themeable with stylesheet?
uwestoehr wrote: Thu Feb 25, 2021 3:45 am
uwestoehr wrote: Wed Feb 24, 2021 12:26 am
watsug wrote: Tue Feb 23, 2021 6:56 pm Other thing that's in other apps and depending on orientation: If viewing a face straight on there are arrows to rotate to the other not currently visible faces. What do you think?
This is a very good idea. I will implement this.
I have done this via a new button in form of a dot. This is its behavior (just rotates 180 degrees):
N71h4HNp5j.gif
This wasn't how I meant, I meant to rotate only 90* and only to next face when looking straight at a face. So the arrows aren't visible if user isn't looking straight at a face. See user behavior at 0:06 (faked with numpad keys)
phpBB [video]


Also in the video:
0:15 Rotate in 45 degree increments around the cube, without moving the mouse. Replaces the current side buttons for my use-cases. Could there be a settings to disable the arrows around the cube?
uwestoehr wrote: Wed Feb 24, 2021 12:26 am
Is it possible to know the orientation of the cube?
Idea is this: Click on a face to rotate to nearest. Click face again and cube is reoriented to the standard view. This would be useful for a quick way to reset the orientation.
This is possible but is this really desired? I mean when you choose the "to Nearest" option you explicitely don't want to have extra turns. Otherwise you could bee "to nearest" off.
0:23 in video is showing how "Click facing face to orient default orientation" could be convenient. I'm imaging I'd want to use "to nearest" on. But it's still convenient to sometimes get to the default views quickly.

Again, thanks for the great work on the cube and listening to my suggestions :)
UR_
Veteran
Posts: 1354
Joined: Tue Jan 03, 2017 8:42 pm

Re: [bug 4495] 45° rotation via NaviCube does not work

Post by UR_ »

ATM, most funny part of source NaviCube.cpp is text display of cs axes


4k display:
Screenshot 003.png
Screenshot 003.png (14.74 KiB) Viewed 1766 times

Code: Select all

static GLubyte xbmp[] = { 0x11,0x11,0x0a,0x04,0x0a,0x11,0x11 };
...
glBitmap(8, 7, 0, 0, 0, 0, xbmp);

static GLubyte ybmp[] = { 0x04,0x04,0x04,0x04,0x0a,0x11,0x11 };
...
glBitmap(8, 7, 0, 0, 0, 0, ybmp);

static GLubyte zbmp[] = { 0x1f,0x10,0x08,0x04,0x02,0x01,0x1f };
...
glBitmap(8, 7, 0, 0, 0, 0, zbmp);
:man_facepalming:

How should this be scaled to fit HiDPI displays?
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: [bug 4495] 45° rotation via NaviCube does not work

Post by uwestoehr »

watsug wrote: Thu Feb 25, 2021 11:03 am The cube looks geometrically great and visible! Is the color themeable with stylesheet?
In principle yes. But the existing style sheets don't use yet the parameters that define the colors.

watsug wrote: Thu Feb 25, 2021 11:03 am
uwestoehr wrote: Thu Feb 25, 2021 3:45 am I have done this via a new button in form of a dot. This is its behavior (just rotates 180 degrees):
N71h4HNp5j.gif
This wasn't how I meant, I meant to rotate only 90* and only to next face when looking straight at a face.
But for this we have the triangle buttons. Why won't you use them?

However, I have to keep the pull request simple. There is much room for improvements and since FC 0.19 is now ready we have plenty of time to make several PRs. My first PR will now only be to fix the missing 45° faces + that you can now change 2 parameters via the preferences dialog.

watsug wrote: Thu Feb 25, 2021 11:03 am Is it possible to know the orientation of the cube?
Idea is this: Click on a face to rotate to nearest. Click face again and cube is reoriented to the standard view. This would be useful for a quick way to reset the orientation.
This is possible, but this contradicts the idea of rotating to nearest. I mean also with the Nearest option turned on, you can alreadsy get what yu want via the orientation toolbar buttons.
However, I'll think about this.

Many thanks for you valuable feedback.
Post Reply