List Searching - Grasshopper2024-03-29T12:24:22Zhttps://www.grasshopper3d.com/forum/topics/list-searching-1?feed=yes&xn_auth=noMeh, it's a working trip and…tag:www.grasshopper3d.com,2012-10-30:2985220:Comment:7165282012-10-30T22:28:21.978ZDavid Ruttenhttps://www.grasshopper3d.com/profile/DavidRutten
<p>Meh, it's a working trip and my train doesn't actually leave for another good 10 hours.</p>
<p></p>
<p>--</p>
<p>David Rutten</p>
<p>david@mcneel.com</p>
<p>Poprad, Slovakia</p>
<p></p>
<p>Meh, it's a working trip and my train doesn't actually leave for another good 10 hours.</p>
<p></p>
<p>--</p>
<p>David Rutten</p>
<p>david@mcneel.com</p>
<p>Poprad, Slovakia</p>
<p></p> OK I got the member index doi…tag:www.grasshopper3d.com,2012-10-30:2985220:Comment:7163462012-10-30T22:09:38.510ZWT4https://www.grasshopper3d.com/profile/WT4
<p>OK I got the member index doing what I wanted to do. Many thanks for your prompt response even though you are officially on a well deserved break. Congratulations on your award.</p>
<p><br/>William</p>
<p>OK I got the member index doing what I wanted to do. Many thanks for your prompt response even though you are officially on a well deserved break. Congratulations on your award.</p>
<p><br/>William</p> If you imagine a list of x,y,…tag:www.grasshopper3d.com,2012-10-30:2985220:Comment:7166102012-10-30T22:03:53.315ZWT4https://www.grasshopper3d.com/profile/WT4
If you imagine a list of x,y,z coordinates<br />
0,0,0<br />
0,2,3<br />
1,4,5<br />
.<br />
.<br />
3,4,5<br />
<br />
I want for example to determine the index position of the point coordinate, 1,4,5. In this case it is the 3rd from the top.
If you imagine a list of x,y,z coordinates<br />
0,0,0<br />
0,2,3<br />
1,4,5<br />
.<br />
.<br />
3,4,5<br />
<br />
I want for example to determine the index position of the point coordinate, 1,4,5. In this case it is the 3rd from the top. An index isn't something that…tag:www.grasshopper3d.com,2012-10-30:2985220:Comment:7165152012-10-30T22:03:31.246ZDavid Ruttenhttps://www.grasshopper3d.com/profile/DavidRutten
<p>An index isn't something that is assigned or stored. Items in a list are stored in a specific order, you use an index to access a specific item in a list.</p>
<p></p>
<p>There are two 'search' components in Grasshopper and they work in different ways. </p>
<p></p>
<p>[Sets.List.Item Index] will locate an item in a list. It will return the index at which the item appears or -1 if the item does not occur in the list. The comparison used is memory addresses. Meaning you must supply the <em>same…</em></p>
<p>An index isn't something that is assigned or stored. Items in a list are stored in a specific order, you use an index to access a specific item in a list.</p>
<p></p>
<p>There are two 'search' components in Grasshopper and they work in different ways. </p>
<p></p>
<p>[Sets.List.Item Index] will locate an item in a list. It will return the index at which the item appears or -1 if the item does not occur in the list. The comparison used is memory addresses. Meaning you must supply the <em>same item as is present in the list</em>. This means it works on all data types, but it often confuses people because they expect the number 5 to be equal to the number 5, regardless of where those two numbers are stored in memory.</p>
<p></p>
<p>If you're merely comparing <em>values</em> rather than specific items, you can use [Sets.Sets.Member Index], it only works on simple data types (numbers, booleans, points, vectors, but not on curves, meshes, breps) but it compares not the memory address, but the memory contents. So the value 5 really is identical to 5, no matter where it comes from.</p>
<p></p>
<p>Most of the time the [Member Index] component is the one you're after, but every now and again you need to figure out what permutations a list of values went through and in that case [Item Index] will save the day.</p>
<p></p>
<p>--</p>
<p>David Rutten</p>
<p>david@mcneel.com</p>
<p>Poprad, Slovakia</p> Hi WT4,
This probably exceed…tag:www.grasshopper3d.com,2012-10-30:2985220:Comment:7163412012-10-30T21:57:53.851Zdjordjehttps://www.grasshopper3d.com/profile/djordje
<p>Hi WT4,</p>
<p></p>
<p>This probably exceeds my beginning knowledge level, but it sounds like an interesting issue.<br/>What do you mean by "lost of coordinates"? List of points?</p>
<p>And that position of a point you are mentioning as a criteria? What exactly do you mean by point position? Particular value of x,y or z component of some point?</p>
<p>Hi WT4,</p>
<p></p>
<p>This probably exceeds my beginning knowledge level, but it sounds like an interesting issue.<br/>What do you mean by "lost of coordinates"? List of points?</p>
<p>And that position of a point you are mentioning as a criteria? What exactly do you mean by point position? Particular value of x,y or z component of some point?</p>