Compress parallel Viewport in 1 dimiension

Dear Rhino developers,

I am trying to find a way to compress viewport in 1 dimension, or “zoom in” 1 dimenion instead of two in parallel view.

  1. Is it possible?

  2. With my limited knowledge and experience in programming I have assumed viewscale maybe the option I am looking for
    ViewportInfo.ViewScale Property

However it requires SizeF as input which as far as I understand stores two values, but in ViewScale description x, y and z are mentioned. If this property could help me achieve my goal, could someone give more light, how to set it up? I will be thankfull for any answer.


Ok code below sets viewscale:

            ViewportInfo viewportInfo = new ViewportInfo(doc.Views.ActiveView.ActiveViewport);
            viewportInfo.ViewScale = new System.Drawing.SizeF((float)0.5, 1);
            RhinoView view = doc.Views.ActiveView;
            view.ActiveViewport.SetViewProjection(viewportInfo, true);
            RhinoApp.WriteLine("Viewscale dimensions are " + viewportInfo.ViewScale.Width.ToString() + " width and " + viewportInfo.ViewScale.Height.ToString() + " height.");

I see its changing viewscale values of current viewport, its changing viewport to parallel, but I do not see any scaling of view, so it apparently is not doing what I expected.

Is there any hope?

Ok I have found that, not ViewScale, but FrustumAspect is what allows to compress view in 1 dimension. Someone in future may find this information useful.

1 Like