Skip to content

[Graphics][Bugfix] Make "Nearest Isometric" follow turntable navigation#1307

Merged
phkahler merged 1 commit intosolvespace:masterfrom
Lunderberg:nearest_isometric_with_turntable
Nov 5, 2022
Merged

[Graphics][Bugfix] Make "Nearest Isometric" follow turntable navigation#1307
phkahler merged 1 commit intosolvespace:masterfrom
Lunderberg:nearest_isometric_with_turntable

Conversation

@Lunderberg
Copy link
Contributor

Prior to this commit, the "Nearest Isometric" GUI command searched all 24 possible isometric views. When using turntable navigation, this could result in the z-axis no longer being oriented vertically. This commit restricts the views being searched while in turntable navigation mode to those that follow this restriction.

Prior to this commit, the "Nearest Isometric" GUI command searched all
24 possible isometric views.  When using turntable navigation, this
could result in the z-axis no longer being oriented vertically.  This
commit restricts the views being searched while in turntable
navigation mode to those that follow this restriction.
@phkahler phkahler merged commit 4fc0141 into solvespace:master Nov 5, 2022
//-----------------------------------------------------------------------------
#include "solvespace.h"

#include <iostream>
Copy link
Member

@ruevs ruevs Nov 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is redundant.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, thank you for the catch! Looks like I left that in after some initial debugging.

@ruevs
Copy link
Member

ruevs commented Nov 5, 2022

@Lunderberg makes perfect sense! Thank you for your first SolveSpace contribution.

FWIW it is still possible to "screw up" turntable navigation with CTRL + middle drag.

@ruevs
Copy link
Member

ruevs commented Nov 5, 2022

An extra observation experimenting with your commit - something I had never noticed before - there are 8 views (all with the Z axis projection on the screen vertical) that are not reachable with F3 - even with normal navigation. I need to think about it.

@Lunderberg Lunderberg deleted the nearest_isometric_with_turntable branch November 6, 2022 01:32
@Lunderberg
Copy link
Contributor Author

FWIW it is still possible to "screw up" turntable navigation with CTRL + middle drag.

Hmm. I'm not sure what the most compatible way to handle that within turntable mode would be, since it would always rotate the z-axis. It looks like the normal middle-click rotation assumes that z is already up, and starts having weirder movement when that assumption is broken, so maybe there's a way to improve it there.

An extra observation experimenting with your commit - something I had never noticed before - there are 8 views (all with the Z axis projection on the screen vertical) that are not reachable with F3 - even with normal navigation. I need to think about it.

Good point. Testing here, there's a similar effect with turntable notification, as it preferentially places the viewer looking down from above, even if the view was previously looking down from above. Even when already aligned along an isometric view, every computed values of d is relatively far from zero.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants