List stories for three towers in grasshopper and connect between floors

How to list stories for three different towers? I also want to name it into towers A, B, and C and the floors using numbers (0,1,2, etc) because I want to bridge the three towers from different floors.
obj plat.3dm (131.2 KB)
tower mesh.gh (22.8 KB)

Also, since the floors and three towers have been sorted out, is there an automated way to connect the center of the edge between two or three floors?

For example A5 → B7, A2 → B2 → C2

Hi,

is this what you are looking for?

Use this part of the script to choose the floors that you want to connect.

I hope this helps :sweat_smile:.

Towers.gh (30.5 KB)

1 Like

I see someone just answered. I’ve sent my answer anyway.

Here are some tips to get you started:

  • Try to separate your information. Putting all the points at the end of your script together makes things more difficult. Use List Item, panel etc. to check. Use simplify to make grafted lists easier to read in the panels
  • Your input towers are sorted from top to bottom, from bottom to top would be better. Also, after rebuilding the curves are not sorted anymore. You probably need to watch a tutorial on “sort list” to solve that
  • You could use “sort along curve” in the Vector tab where the guide curve is just a vertical line.

If I’d write more, It would be easier to write the script myself and i suppose that’s not the idea.

1 Like

Hi Fernando! Thank you so much for the script that you have provided. It is working as I expected, however, there is a problem when I change the input for the floor numbers that are greater than 10, I suppose the code only reads the first digit of the number. For instance, I try to input A11 but the point generated in A1 is the same as A12. But, if I type A21, the dot will appear on the second floor so it reads only the first digit. Is there any way to fix this?

Hi,

You are totally right, my mistake :sweat_smile:. Here you have it corrected and simpler than before.

Having said this, I am assuming that your towers are always going to have one letter, if they have two or something different in the name you will need to change the script, but it should be easy to do. It is just a matter of splitting the text.

Also, take into account that I am naming the first floor always with the number 0. If you start with 1, you will need to take that into account in the script. I just did it with 0 because it simplifies the whole process.

Towers.gh (28.0 KB)

And with this fix ( using the Clean Tree), you will always keep the tree structure organize. I had forgotten that you don’t always want to connect three floors :slightly_smiling_face:.

Towers.gh (26.5 KB)

With the previous script, it works too, but if you leave one of the panels of the floors empty, you get warnings in the Tree Branch components.

I hope it helps!