Forum

RhinoScript – function

first thing i would do is to take out everything out that i don't need or use (clean up the script).
you don't need rhino.pointcoordinates because rhino.curvestartpoint still gives you the pointcoordinates and not the identifier of a point. so you don't have to convert the point into coordinates.
if you want to work with funtions try to use the result/output of it.