(Structural Frame) Beam rotation on surface

Hello everyone!

I need help.
I’m cannot rotated the beams (~150 piece) on the surface.
The forum solutions also tried but failed to solve.
The length of the beam segment given of intersections the curved surface and the (blue) planes.
What could be the solution?

Thank you in advance for your help!
(Sorry for my English!)