Q: NewFloatingViewport for rendering with a fixed and locked size and a locked camera?



I want to render something in a fixed Rhino window (64 pixel width x 64 pixel height). When I create a normal window with -_NewViewport and my main Rhino window changes in size, also this viewport changes its size of course.

I thought about a -_NewFloatingViewport, but I can’t define the size and I can’t lock the size.
Also I would like to look the camera of a viewport.

Any ideas, or are these stupid questions? :slight_smile:




(Pascal Golay) #2

Hi Michael-

_-ViewportProperties (dash version) will let you set viewport size. If you make the view active and hit F6, it will show the camera in the other views. You can also show the camera ‘widget’ for named views (saved via NamedView)

Does that help at all?



Hi Pascal,

thank you very much, -_ViewportProperties helped me much. Yes, handling the camera (with F6) by hand is not so handy in my case. :wink:

Now I try to scale the camera to the maximum of my object in an ortho viewport, which costs me some nerves. :slight_smile: An automatic zoom which zooms 100% of my object to the viewport would be nice, now there is always a border around my object. Hm?

Thanks again anyway and have a nice evening


(Pascal Golay) #4

Hi Michael- you can use SetZoomExtentsBorder for this. New one for you, right?? =)



Hi Pascal,

very good, thank you for SetZoomExtentsBorder. Yes, perhaps I should read the command list again, but if that helps? :wink: