Nested Transforms

I’ve got a group inside of a component inside of a group. Each one has a transform associated with it.

I’m sure I’ve done this before but for the life of me I can’t remember what to do, maybe it’s because I’ve been up all night. I’m trying to obtain all three transforms or just a single transform that combines all of them.

You should be able to multiply the transforms. If M1, M2, and M3 represent your group, component, and group transformations, the innermost group geometry should be able to be transformed with M = M1 * M2 * M3.

1 Like

I’m using the PickHelper methods:

ph = view.pick_helper
ph.do_pick(x, y)
# Iterate all pick-routes:
pickhelper.count.times { |pick_path_index|
  puts pickhelper.transformation_at(pick_path_index)

Based on the documentation this should give me the total transformation of all the groups Mtotal = M1 * M2 * M3

I haven’t previously worked much with nested transformations so still trying to wrap my head around it.

To combine transformations you can multiply them:

M = M1 * M2

However is M1 * M2 the same as M2 * M1?


See Wikipedia: Matrix Multiplication > General Properties > Non-Commutativity


Duh, its matrix multiplication, I should have realized this after noting that the transformation is a 16 element matrix (4x4).

I love the math involved with this stuff. Its kind of cool to see some of the math I had to take back in my college days actually being used in the real world.