Structural Member Rotate/align towards a Spline

Hi Everyone,

i am trying to figure out a way to solve this problem. i have a spline & i have got few structural members passing under it in transverse direction( perpendicular to spline when looked at from top view/plan view).
now by default the angle of rotation for these is kept at 90 so that the width portion of the member is facing upwards. however since the spline is like an arc these members needs to orient or rotate towards the spline . image shown below for default placement & manual rotation/arrangement:
script snapshot is also attached.

as you can see in above images they need to align or rotate such a way that they are facing towards the spline orientation, where as when i did via script they both seemed to orient in same angle . i am not sure how to control the directional vector to tell it to orient one on one side & other opposite side. these are just two members , but there are more members coming in btw at later stage & each needs to orient towards the spline properly. its like structural members aligned towards an arched surface if that makes things clear
Could anyone please suggest me what modifications can i make in the script to make it work or is there better way to do this?
Thank You


Sorry I don’t follow exactly, but is it something like this you’re after?

Thanks to Marcello.

Hope that helps,


Hi Mark,
apologies if its not clear, hope the images below make it much easier to understand. This is the output i am trying to get.

as you can see the bridge is not straight & has a bit of curvature & the transverse members basically need to align in such a way that they are always perpendicular to the curvature. the first two images are basically the bridge split into two segments , if that makes sense . kindly let me know in what way this could be achieved.
Thanks again

Amigo @sachin.menon buenas. what you are looking for are the functionalities of CoordinateSystem, Geometry.Transform, Curve.CoordinateSystemAtSegmentLength and other nodes I advise you to look for more information about it, I leave you some examples of how they work and hopefully give you some ideas.

Script in image is from Dynamo Office Hours by Jacob Small!!

1 Like

Hi Gilberto,
thanks for the info & assistance. i will try it out & see if that suits my requirements. in the mean time i have come up with a workflow .that seems to work a bit on say nurbcurves not on polyline though.

you can see i have managed to rotate the surface to be perpendicular to the spline, at later point i will rotate the element. However wondering is there an easier way to do this rotate element along its longer axis not the z axis .

Amigo @sachin.menon buenas, If I had known that drawing bridges is so simple, I would have studied architecture (je je je, just kiding :stuck_out_tongue_winking_eye:) this coordinate systems thing is tricky but it is really powerful, again I advise you to search more in the forum about this topic, I hope this idea helps you!