Grasshopper

algorithmic modeling for Rhino

compare 2 lists and replace items from 1 list with indexnumber of same points in other list

Hi all,

 

 

I'm preparing my script to retrieve all the information in a controlled way. (to insert in  ansys)

 

What I would like to do is the following: I've a 2 lists with collections of 3Dpoints. I would like to replace the 3Dpoints in the first list with the indexnumber of the identical 3Dpoint in the second list.

 

for example:

list 1 = (1,1,0) ; (1,2,0) ; (2,3,0)

list 2 = (5,5,5) ; (6,6,6) ; (7,7,7) ; (1,1,0) ; (1,2,0) ; (0,0,0) ; (2,3,0)

 

list 1 would than have to become = 3; 4; 6

 

any suggestions?

 

Nicolas

Views: 3200

Replies to This Discussion

Decompose the points and compare a grafted list A to list B and then using the Gate And Ternary Component, Flip Matrix and then Mass Addition you will be able to get a Flattened Boolean Cull Pattern.

Danny,

 

I rebuild your definition but couldn't get it to work. In the screenshot "Pt" is the collection that I need to replace with the indexnumbers of the duplicates in "NODES to".any ideas?

 

 

It's probably a tolerance thing. Use the Like component instead of the Equals
Is that the same as the similarity component? No luck with that last one.
sorry, mind block. Yes Similarity

I assumed that the percentage has to be as low as possible.

But It's still kind of strange... Grasshopper reduced the final list from 60 to 39 items.

can you post the files? or send them to dannyboyesiom at gmail com
winner winner chicken dinner! thanks man

    :]

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service