Network of curves to single curve

I would like to change planar network of curves to single curve like on pictures below (done by hand in rhino).


First one is simple. In second case one line must be doubled to make it with single curve. Third example has one instersection but can be done with single curve. I wonder if it can be done in grasshopper for any curve network. I’ve found this topic and tried to adapt it but not sure how shortest walk component works.

…or maybe it can be done different way…?
I would be greatful for any tips.

It is not exactly what you want, but the logic could, I hope, be used a bit


2 Likes

You must search for Chinese Postman problem !! It seems not exactly the same problem as the postman must return but he must inspect all roads.
https://www-m9.ma.tum.de/graph-algorithms/directed-chinese-postman/index_en.html

1 Like

Thanks. As I thought it wouldn’t be so easy. This is closest but as you noticed postman doesn’t has to return.


Is it possible to make it work as GH component?

I’ve also found this. It has EulerianPath component… but website with documentation doesn’t work anymore. Maybe someone has copy of it?