Align the gripped object dynamically to the conveyor belt depending on its orientation

Hi there,

First of all i am not sure if this topic fits at Python Programming or is it actually possible to do it with the “Basic” Visual Components Functionality. However… My Task is it to get the Orientation from Grasped Object to aling them correctly to the Conveyor Belt. Based on the Orientation of the Grasped Object i need to rotate the Tool with the Object around -90° or +90°. To get a better idea of my task please look at the pictures below. It is no option to reorient the Objects with hardcoding because the Object Pattern is random.

Basicview
Right positon

Dont Forget i wont change the Points manually it should be calculated by the Robot.
Thank you

I know, you can realize it with scanners attached to the Tool but this is not the clean way

Can you share your file?