Diagonal item weaving from multiple branches

hey everyone,
i have the typical data structure for multiple grids on surfaces in which the columns are different branches and the rows have same indices. Now i want to create a individual branch for all same colored rectangles shown in the picture below (Branch 0: red, Branch 1: orange, Branch 3: yellow etc.)
i could not figure out how to weave cull or treat the existing data to achieve this result and would highly appreciate any help from your side :slight_smile:


[241115_diagonal_branch_weaving.gh|attachment]
241115_diagonal_branch_weaving.gh (12.3 KB)

hello
you send an empty file. Not very useful !!!

You could look at this example that shows how to make a datatree with component.

sorry, not sure what went wrong but i reuploaded the file and will check the example

Very simple indeed !
I used a plugin to put color, but you don’t need it.
The trick is to change color in points and group ! So you can have near color it will also work.


color to data tree.gh (22.5 KB)

2 Likes

I don’t see any color !!

thanks @laurent_delrieu! the zic zac branches you send are already pretty close to my goal but the admired data structure is a little bit different:

f.e. the green surfaces {3;0}(0), {3;1}(3), {3;2}(6), {3;3}(9), {3;4}(12), {3;5}(15), {3;6}(18), {3;7}(21) or the orange ones {3;0}(15), {3;1}(18), {3;2}(21) shall become one single branch. This should work on multiple surfaces with different divisons. Even if understanding the rule i dont now how to applie it to create the correct branches - i hope you can help me out.

the picture above was taken in this rhino file
241115_diagonal_branch_weaving.3dm (788.8 KB)

Do you mean to explain that you are colour blind?

Not yet. I didnt see any color in the script provided.

1 Like

Oh. I see.

… I think that comes in hand with the fact that Pejo doesn’t know how to select the cells of his grid that have similar colour, i.e. how to get his diagonal sets/branches. The colors were probably selected by hand in the .3dm file.

The colours came from the rhino model i linked in the last replie. Migth be missleading but I only used them to illustrate the branch structure i am aiming for. The grasshopper file contains panels from which i try to create the new branch structure. I hope it is clear now.

This would order the surfaces by color.
OrderByColor.gh (14.3 KB)


btw you must have your .3dm-File open, I don’t know how to keep the display-colors, they get lost when internalising.

3 Likes

From your example, do you need independent diagonals to be separate branches, or can similar colours be merged? i.e. Do the reds of diagonal {3;0}(20) and {3;1}(23) need to be held separate from the red at {3;17}(1)?

That’s cool. But I think Pejo also needs to be able to assign the pattern via Grasshopper. This is useful for getting something already established.

1 Like

sorry it seams like i couldent correctly communicate my point so lets try again:


this surface is subdivided with lunch box (script below) - its data structure is indicated with the black tags.
241115_diagonal_branch_weaving.gh (14.6 KB)

starting from this subdivision i want to create a new data structure with diagonal branches like {3;0}(0), {3;1}(3), {3;2}(6), {3;3}(9), {3;4}(12), {3;5}(15), {3;6}(18), {3;7}(21) or {3;0}(15), {3;1}(18), {3;2}(21)

to give a more visual idea of the branches/pattern i try to achieve i uploaded this picture in which each colour represents one of the new branches i am aiming for. the colours should not be used in the code and also its not important to coloure the faces like that but should only show which panels form on data branch.

I hope i could make it more clear now :slight_smile:

It still doesn’t answer my question:

Or are the colours wholly irrelevant; you just want the diagonals?

They should be in different branches and the colours are whole irrelevant its only about the diagonal data structure

1 Like

I can do this, but I’m busy. Tomorrow.

1 Like

Would highly appreciate it!

i added a cull pattern to extract the relevant panles but the branches are still organized in columns…

241116_diagonal_branch_weaving.gh (16.4 KB)

I’m sure that the many more experienced scripters in this forum will look at this with bewilderment. But that’s because I am an idiot. At least it works:


241115_diagonal_branch_weaving.gh (32.3 KB)

If you need an explanation on how or why this works, I can deliver one later as time permits. Perhaps in that time someone will have given you a better solution.