Pivot fonction

Hi,
This is my first post.
I have to orient packages in different positions so that a robot can palletize them.
I imagined a solution but I think there is a simpler way.
Pivot Horizontal-03.vcmx (854.7 KB)
I hope to use your answers to achieve the second movement.

Thank you in advance.