s.wac
(S Wac)
November 21, 2019, 2:55pm
#1
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.

No problem it is very similar to what I proposed in the other discussion.
First put the curves
Choose the number of spheres (1000 seems OK, 4000 points on my PC gives 5 min of calculations)
Toggle Kangaroo to TRUE, adapt the diameter if needed. If OK toggle to FALSE.
[image]
Choose an attractor point
Now you can open the DAM
Adapt the Graph Mapper in order to tweak the shape of the curve. As there is no dam double click on Graph Mapper to modify it.
[image]
[image]
You will need Kang…
…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

1 Like

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

if anyone is still interested in the problem:
i’ve managed to import networkx library (version 2.0.dev_20160927182259) into rhino6 and gh and implemented some of the codes to solve the route inspection problem from the very detailed tutorial from here:
thanks @DanielPiker @AndersDeleuran @PeterFotiadis
1 Like

s.wac
(S Wac)
November 22, 2019, 8:19am
#4
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?

s.wac
(S Wac)
November 22, 2019, 1:30pm
#5
I’ve also found this. It has EulerianPath component… but website with documentation doesn’t work anymore. Maybe someone has copy of it?