I am trying to use @DanielPiker Cage Morph component to morph series of polylines, but the result is off. Is it possible to morph to obtain a valid result?

What I am trying to find is a transformation matrix between two boxes not actual morphing that is possible via grasshopper.

One box is not deformed and the other is transformed using only shear and scale transformations in x,y,z axis. There is no twist, bending or taper , just shear and scale.

Is it at all possible to find both scale and shear transformation matrices for this simple cube case?
I honestly do not know where to start as I am searching for transformation matrix, not geometry output.

For the Mesh Cage Morph, if you scale the geometry being morphed by 0.9999, it works.

Points not strictly inside but lying exactly on faces/edges/vertices of the cage need special treatment.
I thought I’d included checks for all 3 of these cases, but it looks like I must have missed something - I’ll have another look.

I don’t see the connection with getting the transformation matrix though. The cage morph is generally not a transformation in that sense, and it doesn’t calculate any transformation matrices.

Thank you the scaling does the trick, I scaled up the initial reference cage then in the output I scaled the transformed geometry for the same value.

I was thinking if the box was transformed using only shear transformations, is it possible to get that transformation back for the case of simple cube.

I believe that for a sheared cube it should be possible to calculate the affine transformation matrix directly from the 3 non orthogonal basis vectors (ie the vectors of 3 of the edges connected to one corner of your sheared target cube).

Mean value coordinates (what the MeshCageMorph uses) is probably overkill for this.
The component actually always works with triangles internally (quads get a point added in their center and turned into 4 triangles, to avoid causing bias by picking arbitrarily between the 2 diagonals if turning it into only 2 tris).
What’s this for?