Euler angles of CPlane

In regular world space, I rotated a Plane using the Gumball to match a planar area of a Top and Side view photo, then saved a CPlane from it. Where can I see its Euler angles?

In Alias, I would select the object, the plane in this case, and read its X, Y, and Z rotations in the Information Window. The What command sadly does not yield such information about an object (position, rotation, scaling, etc.).

there is nothing native to retrieve that info. But it can be obtained with a script if that helps.

import rhinoscriptsyntax as rs
import math

view = rs.CurrentView()
cplane = rs.ViewCPlane(view)

xa, ya, za = cplane.XAxis, cplane.YAxis, cplane.ZAxis

cy = math.sqrt(xa.X**2 + xa.Y**2)   # cos(pitch)
if cy > 1e-8:
    rx = math.atan2(ya.Z, za.Z)
    ry = math.atan2(-xa.Z, cy)
    rz = math.atan2(xa.Y, xa.X)
else:
    # gimbal lock: pitch = +/-90 deg, roll and yaw blend together
    rx = math.atan2(-za.Y, ya.Y)
    ry = math.atan2(-xa.Z, cy)
    rz = 0.0

print("X: {0:.3f}  Y: {1:.3f}  Z: {2:.3f}".format(
    math.degrees(rx), math.degrees(ry), math.degrees(rz)))

just fyi, that rotation order matters.

if you have different order (e.g Z-Y-X) , check the file here for retrieving the angles for different rotation-sequences.

Another way:

#! python 3
import Rhino
import scriptcontext as sc

view = sc.doc.Views.ActiveView
if view:
    plane = view.ActiveViewport.ConstructionPlane()

    # Rotation-only: world axes -> cplane axes
    rotation = Rhino.Geometry.Transform.Rotation(
        Rhino.Geometry.Vector3d.XAxis,
        Rhino.Geometry.Vector3d.YAxis,
        Rhino.Geometry.Vector3d.ZAxis,
        plane.XAxis, plane.YAxis, plane.ZAxis)

    rc, yaw, pitch, roll = rotation.GetYawPitchRoll()
    if rc:
        print("X: {0:.3f}  Y: {1:.3f}  Z: {2:.3f}".format(
            Rhino.RhinoMath.ToDegrees(roll),    # about X
            Rhino.RhinoMath.ToDegrees(pitch),   # about Y
            Rhino.RhinoMath.ToDegrees(yaw)))    # about Z
    else:
        print("Construction plane frame is not a rotation.")

– Dale