Orientation of beams along the normals to the edges of the mesh

Hello Guys
I have a question about the application for placing beams on a mesh
namely how can you position the abc along the normals to the midpoints of the mesh edges?

I made a determination through the rotation angle but the beams are not correctly positioned?

VisualARQ q.gh (9.6 KB)
beam VisualARQ q.3dm (60.6 KB)

@AlexWer we are taking a look at your files and seeing why beams are not oriented correctly. I’ll get back to you when we find more out about this.

I am just a Grasshopper beginner.
I have measured the rotations differently, but this way it fails some of the time.
If you the expression for the rotation input of the beam options component to -x, a part of the beams fail to rotate the right way. If you clear the expression the rest of the beams fail.

I don’t know how to solve it.

VisualARQ q.gh (13.2 KB)

thank you very much for the answer
I could not connect the angle and direction of the section oration vector so that it correctly unfolded the profile along the normal
I will look forward to hearing from you

Hi AlexWer,
I’ve revised this old thread… The definition provided by @ME_Mark works fine apparently. I can say the Beam profile rotation depends on line vertices order: V1->V2 will rotate clockwise. V2->V1 will rotate counterclockwise. The definition should take this into account and provide the correct vertices order.