algorithmic modeling for Rhino
To complement the recent Exoskeleton wireframe thickening tool by David Stasiuk and myself,
I am also sharing this component for cleaning up messy wireframes or line networks.
You provide it with any list of lines and it turns them into a clean directed graph or network.
So it :
-Snaps together nearby points
-Removes duplicates, Overlapping lines and stray segments
-Splits lines at crossings and creates new nodes
-Keeps an optional set of input points fixed
It also outputs the topology information of the network, saying what connects to what:
For each point:
-A list of indexes for all the other points to which it is connected by a line
-A list of indexes of the lines which end at that point
-A list of indexes of the lines which start at that point
For each line:
-The index of its start point
-The index of its end point
and also, the simplified graph - with all nodes of valence 2 collapsed.