my wish for this year is for grasshopper to have (eventually?) a sorting algorithm for components like what we see in the image below. no coal please :)
I've looked into yEd a number of times, it's impressive, but also fiendishly expensive. So if you have a webpage or a paper somewhere that discusses how to do this, I'd love to know.
I assume implementing this kind of functionality into GH will/would take a lot of time...
So, what about a little work around, just to play with it and analyzie the potential of this feature:
1. Take a GHX:
2. Import it to yED using a custom XSL file (which would extract only some items: component locations,inputs,outputs and wire connection data):
3. Use yED's automatic layouting tools to rearrange the components:
4. Export the graph to XML and use the data to modify the original GHX by replacing component coordinates:
The above is only a simulation.
I have almost no knowledge of XML/XSL, so I won't be investigating this further, but maybe someone in the forum would like to give it a try.
Permalink Reply by taz on November 16, 2009 at 9:08am
Jacek,
That's a very simple but powerful example. Nice work.
I think one of the nice features of a sorting algorithm is that it would be capable of making near horizontal connections exactly horizontal. Can you achieve this with a yEd roundtrip?
just wondering how this would react to the 'wireless' connectors that we often use for complex definitions, and also when we purposely arrange our components in a manner as to make visual sense.. sort of like clustering things on the canvas (not using GH cluster, but just keeping components close together) based on the geometry they create (say facade, roof, structure, etc. etc.).
Not meaning to discourage, but just implying that the algorithmic implication would be adding more and more functionality and making it smarter to understand/specify deliberate eccentricities in the layout.