algorithmic modeling for Rhino
Hi Everyone,
I am a beginner to grasshopper I would like some help with a fast way with 2 task in matching and replacing points with corresponding values.
1) List 2 (Bottom list) is a series of points. I would like to rename them such that they are named R1....Ri while corresponding to each points
2) the points in each branch in List 1(Top list) are the 3 vertex defining each triangle surfaces. I would like to match every point in list 1 with list 2 and replace the index in list 1 with the corresponding Ri defined in step one
Thus hoping for a final output list for example like
{0;0}
1. R3
2. R28
3. R90
{0,1}
1. R92
2. R93
3. R20
...and so on
Thank you for helping
Tags:
Hallo Mark,
In the screenshot below, I have provided two possible ways in which you can achieve your goal. Each option has its own merits and demerits.
For instance, option 1 matches the points based on the co-ordinates, which means that unless list 1 is made up of the exact same points in List 2 (to the last decimal), the text-match will not work.
In option 2, the matching of points is done by finding the closest point from List 2 to each of the points in List 1.
Depending on what your situation is, I hope one of these methods will suit your needs.
Cheers,
Sridevi
Hey Sridevi
this is amazing! it works out perfectly.
I guess the VLOOKUP in Microsoft Excel is based on a similar formula.
Cheers,
Mark
Glad to hear that :)
I am not deeply familiar with Excel formula, so always nice to learn something new.
Cheers!
Welcome to
Grasshopper
© 2025 Created by Scott Davidson.
Powered by