Calculation of tributary width on beams

I am trying to create a grasshopper script to calculate the tributary width of beams in a framed system, from a one-way spanning slab. In the image I’ve shown an example of a framed floor plate, and the tributary width on the primary beams that I’m after. I’ve given it a go but no luck, I get a width of 0. Attached is my GH script, would greatly appreciate some help and guidance with the process.

Thank you in advance!

Tributary width.gh (15.6 KB)

It looks you forgot to internalise the curves from Rhino in the shared GH file.