Grasshopper

algorithmic modeling for Rhino

I have a list of data (pair of integer) referred the image below.

I would like to filter them into different group. Thank you for your help.

Views: 5301

Replies to This Discussion

Well...here's a way to start.  I'm not sure exactly what output you're looking for, as splitting these lists out will just give you something like the same values broken into data paths they resemble.  But you can do it...I've added in a little extra here so that you can get the index of the matching pairs from the original lists.

A good way to get those unique matches between two number groups when they are sequential is to use two series components...the first gives you all unique values, and the second steps from each unique value to the end of the list.  This particular definition would be simpler to write in a script, but this works too.

Attachments:

Hi David,

You solve the problem all the way. Actually I need the index number together with the pair.

Thank you for your kindness.

Best!!!


Dear David,

Thank you for your help.  I followed all the steps yet cull pattern list is empty (second last steps). Please refer the below jpeg.

I wonder why and couldn't figure it out?  Culling patterns has 61120 values and List to cull has 955 values.  I am still Gh beginner and thank you much for your help.

Best Regards.


 

no problem!  glad to help you out.  it looks like a really simple little issue...your strings aren't formatted exactly the same...so the ones coming from your set are x & "," & y and the ones from your formula below are x & ", " & y...it's that space after your comma in the second one that's causing them to all come back unequal.

One other thing I'd highly recommend is that you change your settings to display fancy wires...this is super helpful for the rapid identification of item/list/data flow through your definition.

Wow, you are the expert!  

Thank you so much for your time and help.

Best Regards.

Thank you for your reply.

Sorry if I didn't verify the problem clearly. Actually I have a list (pair numbers) and I just need to filter out different pairs into individual lists.  

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