Wish - Non proportional viewport scaling

I would love to have the ability to scale my viewports non proportionally in either the ‘X’ or ‘Y’ (screen space) axis when the viewport is set to parallel.

At the moment I’m using a Pascal-script in Rhino7 but would love to have this integrated into normal Rhino.

I’m also having an issue (in Rhino7) when the viewport is scaled, as I zoom in or out the geometry will disappear for a lot of zoom levels but will re-appear at others. Would be great to have visibility of the geometry at all zoom levels whilst the viewport is scaled.

Many thanks in advance!

Hi Rob - would you want it implemented as a display mode, as in my script? I can see how that could be a good thing, but I am not sure what is expected.
RH-71959 Viewport non-uniform scaling



I’m not sure what you are looking for, but does this help?

1 Like

I’d prefer it as a two button thing -
One button to set the viewport to a normal scaling.
The second button to define a rectangular selection in the viewport that would then scale up to fill the viewport extents.

I often get confused with the script as to how I should click out the rectangle to get the correct scaling (x or y).

Oh! That’s it Bob, thanks!
My only wish now would be to have this in a more accessible place - probably in the display properties panel over on the right hand side so it can be accessed super-quickly - and to only apply to the selected viewport rather than all of them. I like to have one view distorted so I can see the imperfections and then will use the other views to manipulate the control points, it’s just easier to move stuff around without the distortion.

Thanks chaps, this has turned from a feature request to a UI request I think.

In the meantime I think the tools are there, it’s just a little cumbersome to operate.

Hi Rob-
For now, I can add command line input to set an aspect ratio explicitly. Basically the script is setting the numbers that Bob pointed out in a special display mode. What seems to me maybe useful in this hack is that you can set a distortion you like and the display mode will hold it until you change it, so you can set this mode in any parallel vp and get the same scaling.




1 Like


Ah, ok! Maybe if the script could ask for a ‘H’ or ‘V’ value that directly reflects the numbers in the display mode settings that would avoid confusion (mine anyway…).

It would be even better if you could keep fiddling with that number while the script is running, until you get the correct amount of distortion you’re after and then close the script.

It’s just a real shame those numbers are hidden away deep in a menu that takes a fair amount of time to activate and navigate.

Yeah - the fiddling part I’ll work on but this one asks for two numbers - I’ll make the prompts clearer if this basically works.
StretchView_dev.py (4.3 KB)

To use the Python script use RunPythonScript, or a macro:

_-RunPythonScript "Full path to py file inside double-quotes"


1 Like


Yep, that works great for me. Clearer prompts would be brilliant and the fiddling bit would make it perfect! (but it works fine without if it’s too much hassle).

Thanks Pascal!

Thanks to Rob, Pascal and Bob. I learned something today.

If you use the same distortion repeatedly, create a custom display mode for the distorted view.

To create a custom viewport arrangement with a distorted viewports:
Arrange viewports with display modes as desired.
Save a .3dm file with the desired viewport arrangement.

To use the save viewport layout with distorted viewports: ReadViewportsFromFile and select the .3dm file with the desired arrangement.

1 Like

hi Rob,

I’m not sure if this approach will be useful, but I keep two separate viewmodes, wireframe only, one for ‘flattened X’ and one for ‘flattened Y’ distortion. Both set to 1:10 ratio of distortion. I only use them in wireframe to select very long/skinny marque selections that do not select other things. It works like this:


1 Like


Thanks Chaps. That gives me a few more options how to use this feature. I’ll have to have a play around and see which method works best for me.

Below is the issue I get with disappearing geometry while using the scaled viewport (this is Rhino7 by the way).

I remember John Brock talking about view frustums when this happened last time (un-related to current issue).

Viewport set to parallel, rotated around all axis and viewing a geometry of over 100m in length.

It fades and comes back into view as I zoom.

@Rob Can you provide the .3dm file.

Not this particular file unfortunately, I’ll see if I can replicate it with some generic but similar sized geometry.