Make a Continuous Line

Problem_single_Curve.gh (12.2 KB)

Hi everyone,

I’m trying to convert these individual curves into one continuous polyline. I’m not sure what the problem is with my script, but it seems to create redundant lines between some of the points.

I would really appreciate any suggestions on how I could improve the script or fix this issue. Thank you!

Hello

simple answer : you can’t

Try to do it by hand on this, and then you will surely understand.

BUT if you accept to pass 2 or more times it is possible to do, use tools using Graph theory.

https://www.food4rhino.com/en/app/leafvein

Here I did some experiment using my tool in Nautilus , in red paths that are traversed 2 times

They are a bit special as there are some discrepancy in the lines, the travel has an increased length of 25%

So there will be a component in Nautilus for that, it has an option to choose the beginning and to also to be closed (come back)

Nautilus 2.1.2 has now a component to make a continuous path, you can choose the start (with an index) and you can choose to come back to start. If useful I can add an indicator (boolean or integer) saying if curve was already used.

Problem_single_Curve_LD.gh (13.7 KB)

Also you can note that it is also possible to go up if path was already used.

Will it find a trail if one exists?

It can but there is no research of optimum

The OP has asked the same question 3 times now. Perhaps with your solution, it won’t come again.

I appreciate your help, you help me a lot with this script, actually it solved most of the problems I have regard to make a single-continuous line.