It seems that Transform.ChangeOfBasis(Pane fromPlane, Plane toPlane) ignores the origin of the planes. The other overload takes basis vector parameters, but no origin params. It would be great if this was added, as I have reached for this function many times:
Got it, I guess Iām confused because the constructor of Plane dictates that its x and y vectors dont have to be orthogonal, or unit. This makes if feel like PlaneToPlane should be an affine transformation. Instead it seems to be some sort of orient function.
Anyway, It still seems that the functionality that I provided above is missing from the rhino sdk. I just want to be able to create an affine transformation from one Frame to another (like a change of basis but moving the origin too).
I guess I miss spoke. Of course its affine as because all reasonable Rhino.Geometry.Transformās are affine. What I meant is non-linear.
Anyway, It feels like were getting away from my original goal which was to point out a common function that seems to be missing. Its commonly known as a change of frame. It is like a change of basis but with a change of origin too.
PlaneToPlane is not what Iām looking for. I want to be able to remap all 3 basis vectors and the origin. There is no plane constructor with a third basis vector.
@Nick_Drian - when you sign back on, if you want more help then please some details as to what you are trying to do and why. Often, picture or .3dm files can be helpful.
This sounds like you are interested to use shear transformation.
Otherwise to define a plane, a coordinate system, an origin point and 2 vectors are plenty and the 3rd vector is useless, or better, would possibly over-define the plane, creating an impossible situation.
Hi Dale, That Transform.Rotation function states that āThe frames should be right hand orthogonalā. Which is not what Iām looking for, I want to be able to remap the basis vectors however. Here is a working implementation of the function that I was looking for:
This function returns a transform that: first uses the inverted āfromā matrix to get the model into the world coordinate system. then uses the ātoā matrix to get the model into the desired coordinate system.
It would be a lot more legible if Transform had a constructor that takes a System.Numerics.Matrix4x4