Is there a method to randomly choose hatches of a particular color (in this case trees drawn in top view) and then randomize the selection of them, so that I can alter some of the colours to make slight variations
Maybe a grasshopper script or similar.
Thanks a lot
Hi @askesnaske, below is a python script to try.
RandomSampleTreeHatch.py (727 Bytes)
To control how many tree hatches it selects from the ones found with the same color as the input hatch you can change the number 0.5
in this line:
sample_objs = random.sample(objs, int(objs.Count * 0.5))
0.5
means 50 percent of the hatches with same color will remain selected.
_
c.