Issue rs.PlaneTransform() workinf different than expected

Hi,

I’ve encountered an unexpected result when I use rs.PlaneTransform.

I have a model with 2 blockinstances (77.3 KB); a normal one and a mirrored instance of the same definition.

I use the script below to align a copy of the world xy plane to the transformed instances, and construct an axes helper based on that transformed plane.

I expected to see a normal and a mirrored version of the same axes helper. However, checking with the left-hand rule, the axis helpers (and thus the transformed planes) seem to be rotated around the y-axis instead

#! python3
import rhinoscriptsyntax as rs

def main():
    objs = rs.GetObjects(preselect = True, filter= rs.filter.instance)
    if not objs:
        return

    for instance in objs:
        xform = rs.BlockInstanceXform(instance)
        xy = rs.WorldXYPlane()

        plane = rs.PlaneTransform(xy, xform)

        z_helper = rs.AddLine(plane.Origin, plane.Origin + plane.Normal * 100)
        x_helper = rs.AddLine(plane.Origin, plane.Origin + plane.XAxis * 100)
        y_helper = rs.AddLine(plane.Origin, plane.Origin + plane.YAxis * 100)

        rs.ObjectColor(z_helper, (0, 0, 255))
        rs.ObjectColor(y_helper, (0, 255, 0))
        rs.ObjectColor(x_helper, (255, 0, 0))



if __name__ =='__main__':
    main()




An exact mirror would result in a left-hand coordinate system…

hi @Helvetosaur,

thanks for your response. I don’t really understand what you are saying though. Could you please explain a bit more in depth?
I.m.o. the helpers should appear as exact mirrors, just like the instances. However they are rotated around the y-axis. (If I create the helpers first, and transform those with rs.TransformObjects(), the result is as expected)

Rhino only supports right-hand coordinate systems.

The World XY coordinate system has +X to the “east”, +Y to the “north” and +Z “up”

An exact mirror with +X going “west” instead of east would be a left hand coordinate system, and Rhino does not allow that.

Ah, I get it now. Quite confusing though. To me it would make sense if the rs.PlaneTransform() would raise an exception for this “not allowed” transformation of a plane

Even the BlockManager show an axis system based on this plane transformation