@unknownuser said:
I try to reason how this works but it doesn't come easy to me.
It isn't easy. there are a few bugs to get your head around.
Perhaps it's helpful to understand that the dynamic part is a ruby script add on, it's not hard wired and as such has to work within the limitations of the ruby language and the developer's understanding when it was conceived. There are disconnections between what an attribute reports and the updated SU view, for example changing the rotation attribute will cancel out a previous input in any one of the others. Rotations involving groups can affect the size, the change seems to follow the changing boundary box.
Components seem to be more stable, but again misbehave when more than one axis is considered,
Despite the updates in Ruby there seems to be little done to fix these bugs, however there are workarounds to achieve the results you require.
The first important point, I would like you accept is that all onclicks need to be on the same level of nesting, there's no point placing an onclick event in a lower nesting than the other.
I generally use nested groups only for parts of an object, like an "I beam" made of top flange, web and bottom flange. Then the object (I beam), the sum of its parts, is then a component. Collections of components may be then held in a group.
So the second is that using dynamic groups can be more problematic, unless they are simple
So any animated object(s) should be a component and it is better to nest animated component(s) within another component, otherwise the rotation formula can be overridden when swapped or inserted.
At this point you may need to understand why attributes can be overridden, if they were not, then swapping a mouse with a elephant would mean their sizes would always match, etc. However you can match them, if the values are passed one level down and "current" is used in the parent if you want to, say have beam lengths to always match after a swap.
I am still trying to rationalise DCs intricacies myself. so most times I plug in data / methods until it works
Anyway, feel free to add any more problems, then can add some more observations