Rotate sections [SOLVED]

Hi!

I am struggling with rotating the sections correctly. My thought is to use the LocalY value in some way. However, I am not able to figure out how it should be used. Any tips?

I would like to rotate the elements like drawn here (drawn in red while the current rotation of the elements also are shown):

Grasshopper:

The LocalY axis input is a vector that define the direction/orientation of your section.