Hello good people!
As I am still a noobie with GH I was searching for a way to place colors on a large set of buildings based on their height. I want to split them into 6 different groups and give them their unique color, so they are easily readable.
I want to divide them into groups with heights between
1 and 9,
9 and 12,
12 and 16,
16 and 21,
21 and 28
and everything above 28
I started something of a script, but I can’t really get what I really need out of it. Can you please help me out? I will appreciate it a lot! Thank you in advance!
Building heights.gh (18.4 KB)
You didn’t internalize your geometry.
Here’s an example with a couple concepts that might be applicable.
Re_Building heights.gh (9.4 KB)
Thank you both so much!
I had problems exchanging the lines with the mesh to test it, which is totally my fault, thank you very much!
I connected it to the meshes and it worked, sorry that I didn’t internalize the geometry from the beginning.
Do you think that there is a way to assign custom colors?
Here is the reworked version
Building heights new.gh (21.7 KB)
Yes, but the geometry you provided (six “buildings”) is not adequate for testing.
I used them to test it, if the script maps the heights correctly. Here is a larger part, I hope it is okay like this.
Building heights_Reworked.gh (888.3 KB)
First, I needed to modify version ‘A’ so the branches correspond to the list of domains, smallest to tallest. This required rebuilding the data tree by selecting branches:
Then I replaced ColorB (Color Branches) with a list of custom colors:
And finally I used the first 100 (out of 675) of your buildings:
Here is an image showing all of them:
Thank you so much! I have to be honest I would have never figured it out!
I guess I’ll need some spare time to carefully study the script
Here is a MUCH SIMPLER model: Simple is not always obvious.
Just another way, based on @Joseph_Oster 's last proposal:
Thank you both so much for your great help!