The Shortest Walk component is very useful for urban analysis, I’ve been using it a lot lately. Hope it will be part of GH2.
I want to suggest one thing because I’m working with GIS data, which is not always dead accurate. For example lines that make up a node in a network of roads don’t exactly end in the same point. Which makes the component report “No walk found for line at position x, Are end points isolated?”
It would be useful to have some tolerance input, so even though the line ends are far apart by a few millimeters the component would compute the path.
@ShynnSup, Shortest walk doesn’t take into consideration intersections, but only lines that end up in the same point. Since i have around 9300 lines and some reach the same point and some don’t, how am I supposed to know which ones i should extend and which ones not? how am i supposed to know if the extension direction is correct towards the intersection point?
The component already uses tolerance. The tolerance value is the current Rhino document tolerance.
You can see this at this line of the published source:
Thanks,
Giulio
–
Giulio Piacentino
for Robert McNeel & Associates giulio@mcneel.com
Thanks,
This means that I have to tweak the document tolerance in order to get my result.
Or to change GH_Component.DocumentTolerance() to an adjustable variable which i can input in the Shortest Walk component. And this second solution,I think, might make the component more user friendly. That’s why I was suggesting it to you.
A workaround for now could be a script that can change the document tolerance before running the component, and another that will set it again to the old value – if another value is required – afterwards.
A Python script that contains this will do:
import Rhino
Rhino.RhinoDoc.ActiveDoc.ModelAbsoluteTolerance = x
x should be the input and can be better set to float.
Thanks,
Giulio
–
Giulio Piacentino
for Robert McNeel & Associates giulio@mcneel.com