Plane2Plane Transform causes unwanted rotation about "eigenaxis" (Done)

rhinocommon
unhandled

#1

I successfully managed to rotate from one Plane to another Plane without the destructive “flippin” of any axes involved (entryplane --> new_plane). But, then I want to apply this rotation also on other geometry, so I create a Transform from the two planes (or, based on their normals).

Problem: The resulting Transform gives the correct attitue to any geometry it’s applied to, but it unfortunately also rotates the geometry about the new_planes Normal vector (about it’s “eigenaxis” so to speak).

This rotation does not occur in my Plane2Plane rotation but seems to stem from RhinoCommon’s Transform.Rotation(vec0, vec1, point) function (see “Make Transform” below);

            // Evaluate point
            var new_plane = PlaneByLookAtPoint(entryplane, focus_pt);

            // Make Transform
            trx = Transform.Rotation(entryplane.Normal, new_plane.Normal, new_plane.Origin);

Is there any other way in which I can create a Transform based on the two Planes, a Transform which preserves the “eigenaxis” rotation from my Plane2Plane rotation above?

// Rolf


#2

I found

Transform.PlaneToPlane 

But, there seems to still be a unwanted rotation at the starting position, sigh. Back to the Lab.

// Rolf


(David Rutten) #3

If you create planes based only on normals, then you’ll always get unwanted rotation around the normal. You have to make sure that your input planes for the transformation are already correct.