Problem with polylines

Tell me what could be the problem and how can I solve it?
There are two identical scripts, but it works with a rectangle. But it doesn’t work with a sleepy angles.

test1.3dm (80.3 KB) test1.gh (21.0 KB)

moreover, at some angles the script works …test1.3dm (83.1 KB) test1.gh (27.8 KB)

1 Like

Try this

test1 (1).gh (12.5 KB)

1 Like

thanks

thanks you