Notifications
Clear all
[Closed] Get size of viewport in world units?
Jan 15, 2015 7:17 pm
I’m trying to work out how to get the width of a viewport in world units. Specifically orthographic views like Top, Front, Left.
This seems to get me the closest…
(gw.getVPWorldWidth [0,0,0]) * pi
But can’t work out why I’d need to multiply the value from the function by pi to make it close?
3 Replies
Jan 15, 2015 7:17 pm
how does this work for you
vpsize = getViewSize();
gw.getVPWorldWidth [0,0,0] * vpsize.x/vpsize.y;
Jan 15, 2015 7:17 pm
This might return more accurate values for Portrait viewports, for example #layout_2v.
gw.getCPDisp [0,0,0] [1,0,0] [0,0] (getViewSize())