PR #1469 Qt5 compatible NaviCube
Re: PR #1469 Qt5 compatible NaviCube
Hello, I found something weird, not a function issue, just erroneous terminology in the code.
/src/Gui/NaviCube.cpp#L1266
/src/Gui/NaviCube.cpp#L1288
Dimetric is *not* synonymous with orthographic. Trimetric is *not* synonymous with perspective. Both dimetric and trimetric are types of axonometric projections. The current Std_ViewAxo command (View --> Standard views --> Axonometric) is specifically an isometric projection.
https://en.wikipedia.org/wiki/Axonometr ... hree_types
Since it would be nice at some point to get both Dimetric and Trimetric as additional views in the View --> Standard views menu (Axonometric may need to be renamed Isometric), may I suggest these commands be reworded?
Thanks.
/src/Gui/NaviCube.cpp#L1266
Code: Select all
DEF_3DV_CMD(ViewOrthographicCmd)
ViewOrthographicCmd::ViewOrthographicCmd()
: Command("ViewDimetric")
{
sGroup = QT_TR_NOOP("");
sMenuText = QT_TR_NOOP("Orthographic");
sToolTipText = QT_TR_NOOP("Set View to Orthographic mode");
sWhatsThis = "";
sStatusTip = sToolTipText;
sPixmap = "";
sAccel = "";
eType = Alter3DView;
Code: Select all
ViewPerspectiveCmd::ViewPerspectiveCmd()
: Command("ViewTrimetric")
{
sGroup = QT_TR_NOOP("");
sMenuText = QT_TR_NOOP("Perspective");
sToolTipText = QT_TR_NOOP("Set View to Perspective mode");
sWhatsThis = "";
sStatusTip = sToolTipText;
sPixmap = "";
sAccel = "";
eType = Alter3DView;
}
https://en.wikipedia.org/wiki/Axonometr ... hree_types
Since it would be nice at some point to get both Dimetric and Trimetric as additional views in the View --> Standard views menu (Axonometric may need to be renamed Isometric), may I suggest these commands be reworded?
Thanks.
Re: PR #1469 Qt5 compatible NaviCube
In git commit 896aaf57 I fixed the incorrect usage of dimetric and trimetric.NormandC wrote: ↑Tue Oct 09, 2018 5:26 am Hello, I found something weird, not a function issue, just erroneous terminology in the code.
...
Since it would be nice at some point to get both Dimetric and Trimetric as additional views in the View --> Standard views menu (Axonometric may need to be renamed Isometric), may I suggest these commands be reworded?
Thanks.
Now you want to suggest to relabel what at the moment we call Axonometric to be Isometric. But according to the WP article our axonometric view is not isometric because it only fulfills the 1st criterion that the factor is the same for all axes, but the 2nd criterion that the angle is 120 deg between them is not true.
Now I wonder how your CAD package labels this function. Does it also call it Axonometric or does it call it Isometric?
And does your CAD package have the functions Dimetric and Trimetric? If yes you can you show an example how it looks there?
Re: PR #1469 Qt5 compatible NaviCube
Thanks for looking into this.wmayer wrote: ↑Wed Jan 09, 2019 2:40 pm In git commit 896aaf57 I fixed the incorrect usage of dimetric and trimetric.
How are you coming to this conclusion? FreeCAD's axonometric view actually does fulfill both criteria. Please do the following: create a default Part Box with three equal lengths (10x10x10), set the display style to wireframe, then set the view to axonometric. This is what you will see (sorry for the large size of the screenshots, I made them quickly during my lunch break at work):wmayer wrote: ↑Wed Jan 09, 2019 2:40 pm Now you want to suggest to relabel what at the moment we call Axonometric to be Isometric. But according to the WP article our axonometric view is not isometric because it only fulfills the 1st criterion that the factor is the same for all axes, but the 2nd criterion that the angle is 120 deg between them is not true.
You can see that all edges of the cube converge in the exact centre. The only way this can happen is if all 3 edges joined by a vertex in the middle (foreground or background) are 120 degrees apart, when projected flat. This is the definition of an isometric view, just like in this image: https://en.wikipedia.org/wiki/Axonometr ... arison.png
FreeCAD is the only CAD program I know of that uses the term "axonometric" in its GUI. In all the other programs, it's always labelled as "isometric".
Here's an isometric view of a cube in Solid Edge (the proprietary CAD I use at work), which looks exactly like FreeCAD's axonometric view:
So my reasoning is, since FreeCAD's axonometric view is clearly an isometric view, we might as well label it as such.
Solid Edge does have these views, and so does Solidworks through a view toolbar: http://help.solidworks.com/2016/English ... 621387#Pg0
Dimetric and trimetric views orientation can vary, the Wikipedia page shows these types of views in Solidworks: https://en.wikipedia.org/wiki/Axonometr ... ctions.png
Below is how they appear in Solid Edge.
Dimetric:
Trimetric:
A few months ago, there was a discussion started by freedman about adding more view modes in FreeCAD and TheMarkster made some code for it, including giving the end user the possibility of customizing a view. I'll try to find the topic and post the link.
Re: PR #1469 Qt5 compatible NaviCube
Look at the axis cross. The angle between the projected Z and Y or X and Y is only 60 deg instead of 120 deg. The angles between Z or X and -Y would be the requested 120 deg. That's why I was not sure if this can be considered a valid isometric.How are you coming to this conclusion?
So, thanks for clarification.
In the menu we can keep the menu item Axonometric and there add the sub-menu with Isometric, Dimetric, Trimetric.
The reason is because OCCT uses this term in its code samples.FreeCAD is the only CAD program I know of that uses the term "axonometric" in its GUI. In all the other programs, it's always labelled as "isometric".
There is still a pending PR which I want to integrate. However, there are some implementation details that I don't like and that I have to rework a bit.A few months ago, there was a discussion started by freedman about adding more view modes in FreeCAD and TheMarkster made some code for it, including giving the end user the possibility of customizing a view. I'll try to find the topic and post the link.
Re: PR #1469 Qt5 compatible NaviCube
Some test code to verify isometric view:
Code: Select all
from math import sqrt, degrees, asin
p1=App.Rotation(App.Vector(1,0,0),90)
p2=App.Rotation(App.Vector(0,0,1),45)
p3=App.Rotation(App.Vector(1,1,0),degrees(asin(-sqrt(1.0/3.0))))
p4=p3.multiply(p2).multiply(p1)
from pivy import coin
c=Gui.ActiveDocument.ActiveView.getCameraNode()
c.orientation.setValue(*p4.Q)
Code: Select all
from pivy import coin
c=Gui.ActiveDocument.ActiveView.getCameraNode()
vo=App.Vector(c.getViewVolume().getMatrix().multVecMatrix(coin.SbVec3f(0,0,0)).getValue())
vx=App.Vector(c.getViewVolume().getMatrix().multVecMatrix(coin.SbVec3f(10,0,0)).getValue())
vy=App.Vector(c.getViewVolume().getMatrix().multVecMatrix(coin.SbVec3f(0,10,0)).getValue())
vz=App.Vector(c.getViewVolume().getMatrix().multVecMatrix(coin.SbVec3f(0,0,10)).getValue())
(vx-vo).Length
(vy-vo).Length
(vz-vo).Length
# Projection
vo.z=0
vx.z=0
vy.z=0
vz.z=0
(vx-vo).Length
(vy-vo).Length
(vz-vo).Length
Re: PR #1469 Qt5 compatible NaviCube
Cool! Thanks! I already assigned keyboard shortcuts to them.
Now Yorik needs to make another round of Crowdin upload.
Now Yorik needs to make another round of Crowdin upload.
Re: PR #1469 Qt5 compatible NaviCube
Said and done!