the above definition uses the first planar face per brep.
(assuming there is one, and assuming that the uv-direction of the underlaying surfaces fits)
you might want to do some sorting here, to decide, which surface / plane to use.
using a plane to generate a boudingbox per object in the spacial direction of above plane
evalute the bounding box to get the points / create the lines.
does this help ?
Above approach does not answer the initial question how to sort / access / match the given Datatree.
Instead of fiddling with datatrees i prefer to have the geometry already generated in a readable order.
A boundingbox / evaluate Boundingbox will have a consistent order of faces.
Regarding readability, i do not mind to have a few components 3 times - for more complex definitions this might be a cluster.
I think it s a good practice to check the data-structure after each step / component and keep it simple but in a meaningful organisation.
Hi @magicteddy. Your help was lifesaving. I managed to solve the issue by using the component you suggested.
You also pointed at the problem with the data matching. I had the feeling that that might be the cause. This is the very thing that I keep struggling to understand with grasshopper. Could you please suggest a source where I could learn about the topic?
Data tree management is indeed a bit tricky but there are a few rules to keep in mind :
provide lists that have the same length, or trees with the same structure (i.e. same amount of branches, same branches numbers, and same amount of items per branch).
if you provide lists of different lenghts or trees that don’t match structure, the last item/branch only in repeated to match the longest list/tree, so in 99.9999% of cases this results in errors.
if you provide different structures (for instance an item and a list, or a list and a tree) to a component that has several as item inputs - and that is the vast majority -, then Grasshopper will repeat the weakest structure as many times as necessary to match the strongest structure : it will therefore create repetitions.
A great video there (although for the last minutes, I’m a bruteforce Simplify/Trim Tree guy instead of Shift Paths :D)
Hi @magicteddy and @Tom_P. You make so happy by providing such rich answers and valuable content. I can not check them all right now as you got me in the middle of a project, but they look really good and promising. I´ll get back to you in the future for sure.