Is there a possibility to merge all those matrices into one?
In grasshopper I used compound component to merge several matrices.
But using rhinocommon I tried to multiply matrices and it does not produce same result, for instance in this example I did not include translation, but still not producing what gh does with compound:
Well the order matters, the last transformation in Multyply () is performed first if I recall correctly. Do you get more favorable solutions if you change the order around?
Why does multiplying the transforms VS using the compound transform component (which uses GH_Transform, GH_Transform.ComoundTransforms, and ITransform result in a different final transform result even with the same order?
It seems the multiplication way needs the scale to be plugged first, then move. The compound component needs move first, then scale. Then the results are the same. Which one is the correct logic?
To me the compound component seems correct. First you move up 10, then you scale by the origin at .5 (so the box is now half the size and positioned at 5 units height. because it scaled at .5 towards the origin).
If you plug the multiplication way as move then scale like the compound way then the box goes up 10 units but then scales toward the origin, but maintains its height of 10 units.
Really not sure whats the correct logic. Both kind of make sense in some way.
Mathematically, RhinoCommon matrices multiply in the correct way. Intuitively, Grasshopper transforms multiply in the correct way. If you want to first move, then scale, the order for a compound transform is (1) move (2) scale. To achieve the same with RhinoCommon transforms you need scale * move.