Very easy if you treat the icos as a Mesh and then use the Mesh Connectivity Trees (FF, EF, FE etc etc). If you want an entry level C# take on that (with various “loft” options) notify. Obviously any valid and manifold Mesh can been used for that kind of stuff.
BTW: A Conn Tree (of type int) is a thing that co-relates items (by index) in one or two Lists
To be honest this is a preparation for a model in beegraphy. There’s no connectivity trees there. But I will try it nevertheless to understand more of polyhedra topology.
If you are up for it I would be very grateful for a c# script. In beegraphy it might be possible to translate that to a typescript plugin. I already made an icosahedron plugin using typescript as a foundation for this model.
There’s a built in component called Brep Topology, that gives me the faces that share a common edge. But wich edge? The component doesn’t give a list of those edges.
The Icosahedron has 20 faces and 30 edges, and to use the EF info I need a list of the 30 edges.
The component Deconstruct Brep will give me 3 edges for every face, that is 60 edges.
I suppose the answer is buried somewhere in the topology info.
in the case of Edge|Face topology, it creates a data structure like:
{index_of_Edge} (index_of_Faces_in_common_through_that_Edge)
30 edges means 30 branches are created, and for each branch (indicating Edge index) you get the two indexes of the common faces
you can chose to either manipulate just the indexes, or for instance connect a list item to the deconstruct brep and manipulate the faces directly, for instance asking which faces are connected to Edge 0:
You are 100% correct. I had connected my DeBrep wrong.
So now I can use this to find the correct lines to loft for a single branch (see image).
Now comes the next problem. I want to find the lines closest to an edge.
But there are 30 edges and the lines are grouped by faces, so there are 20 groups of lines.
Maybe I just need to take a long walk (for a couple of days or so) but right now my head threatens to explode.
Maybe I can rearrange the red and yellow lines by checking which ones that are closest to an edge. It just feels weird to check every line when I already now which 3 lines that are closest. polyhedron_pattern5.gh (41.1 KB)
I mean it is rather brute force, and I don’t know how well it will hold up to a generalization across different base polyhedra, but given that the distance between the correct pairing of red and yellow loft lines will have a consistent ranking against all other possible pairings, you can find that rank (here 6th longest length) and sort the loft lines by that:
Of course, I imagine it’d be slow, because your comparing all possible pairings. I don’t know how people get these millisecond execution measurements under their components?