Rotate around CPlane axes

I know this has been talked about before, but I’m throwing it in again. I would LOVE to see under Options -> View -> Rotate an option for rotating the view around CPlane axes for that odd, upside down, strangely aligned part.


@dale can probably help with this stuff

@SamPage, the TestRotateViewCPlane command enables or disables this type of view rotation. Give it a try and let me know what you think.

– Dale

1 Like

Fantastic! It’s immediately going in Run these commands every time Rhino starts :smile: Thanks so much for this.


@SamPage, can I assume this works for you?

In my quick testing, it has been lovely, yes. The only thing I’m running into, which is probably my own fault, is scripts that I use to level / straighten the camera are still rotating it to world up:

-_RunScript ( Rhino.ViewCameraUp , Array(0,0,1) )

so I probably have to grab the current cplane first and XFormCplaneToWorld first.

But so far it is great. Thanks again,

1 Like

After using this for a bit, I have noticed two issues, both should be able to be seen in this example (2.0 MB). Try panning using Ctrl + Alt + RMB (keeping camera point static, moving target point), the pan seems to be happening relative to world coordinates (in this file, right / left mouse movement yields an up / down pan).

The second is a script based question, and perhaps I should break that out into a second question, but as it might be related to testRotateViewCPlane, I’ll include it here. As I said earlier, I have a script to take any roll out of the camera:

Option Explicit
Sub CameraUp()

Dim arrPlane, arrCamUp
arrCamUp = array(0, 0, 1)
arrPlane = Rhino.ViewCPlane
arrCamUp = Rhino.XformCplaneToWorld(arrCamUp, arrPlane)
Rhino.ViewCameraUp , arrCamUp

End Sub

It the attached file, it results in the camera being upside down, in other files the camera ends up in unexpected orientations as well. What have I done wrong with this?


Hi Sam - try:

	    Rhino.ViewCameraUp , Rhino.ViewCPlane()(3)

does that do what you need? No idea if that is the goal - true up the view to the CPlane normal?


1 Like

Thanks Pascal, that is it exactly!

Also just wanted to make sure you guys saw the issue with Ctrl + Alt + RMB pan acting oddly when using TestRotateViewCPlane in a non-world CPlane was seen as well.

Thanks again,

Hi Sam - Right! thanks - got that - bug item amended…