Grasshopper

algorithmic modeling for Rhino

Hi All

I am trying to delete all the unique values in the list to just be left with pairs as so.

A 1

B 2

C 2             B 2

D 4            B 2

E 5             E 5

F 5             E 5

G 6

ANY IDEAS

thanks

luke

Views: 1307

Replies to This Discussion

hope it helps

I cant get it to work


could you please explain the working

can you attach the file?

If you are using double precision floating point numbers you can't rely on the equals component. You'll have to use an expression component with the following formula: abs(x-y) < 0.01

Actually you can rely on numbers not changing. What you should not do is compute two numbers via different algorithms and expect them to match up to the last digit. But if you don't perform any operations on floats then you can use Equals.

Of course in this case the 'duplicates' in the list might not be actual duplicates, they may already have some binary noise in them, in which case Vicente's warning ought to be heeded.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

So since it is going directly to equals what would be the issue? the key sorting?

The problem is how the numbers are generated in the first place, that part is cut out of the screenshot.

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