Today I’m playing a bit with some data to generate lines with a specific precise width.
I have pulled a list of numbers from an output with a domain between 0.2 and 2.0
Now what I want to do with this list is to have all the values that are close to a set of seven values, to be pulled towards those values.
So as an example:
0.4 becomes 0.35
1.7 becomes 2
1.2 becomes 1
0.8 becomes 0.7
Is there a function that can do this and leave the data in the tree intact? I have managed to tackle many challenges, but this is above my knowledge. So the desired end result is a list that only contains values that match values from the list (see image).
To make it easy I have attached the file with the data:
pulldata_1.gh (11.3 KB)
I hope someone knows how to achieve this, if anything’s unclear, let me know!