GH+Tekla using 3D polyline

Hello,

I have a 3D polyline (purple one) which one was generated and imported from autocad.
I have steel columns with bent top, I want these columns to be always rotated in middle between angle of two closest vectors. It works on a 3D polyline I create in Rhino itself, but doesn’t work on imported one. I have inserted Rhino and DWG file in we transfer as it weights too much. Wetransfer Thank you for help
Could anyone help?

Fence.gh (25.7 KB)

We transfer file is not available

Maybe this will work: Wetransfer