Grasshopper

algorithmic modeling for Rhino

remove a list of point from another list of point

hi !

I'd like to remove a list of point (LIST A), from another list of point (LIST B)

LIST B contain all point from LIST A, LIST A is made with an interactive set of data made by peoples moving in a place. (but not the subject here..)

Thing is, I've try to use the set difference component but it does not work properly...

LIST B is made of 9 points (x,y,z) (for now) LIST A is made of 25600 points (x,y,z)

And LIST C (LIST A - LIST B) is made of 25599 points... I don't know why... If anyone got an idea..

Regards

Views: 1593

Attachments:

Replies to This Discussion

Set Difference will only work if the points are really in the same location. If they're only kinda sorta in each others vicinity, they will not be recognised as identical points by the Set components.

I can't actually tell from your description whether the above is indeed the case, as you didn't post any data. But assuming I'm correct, there a few things you can try:

  • Take all points and round the coordinates to a few decimal places. This will make points that are near each other identical in most cases. In a few rare cases though, it'll actually push them apart. For example if you were to round the numbers 1.23499999999998 and 1.2350000000000003 to two decimal places you'd get 1.23 and 1.24.
  • Project your 6 points onto your 25600 points. If the projection distance is small, you keep the projected points, if it's large, you cull the projected points. Then you perform Set Difference on the remaining projection.
  • Project your 25600 points onto your 6 points. If the distance is small, cull the original point, if the distance is large, leave the point intact. This way you don't need Set Difference any more.

Thank's for answering that fast.

Thing is they really are same location... only Int multiple of 45, so 0/45/90 etc etc..

Well, even numbers that are supposed to be the same may differ in the least significant digits due to the inaccuracies of digital arithmetic. You'll need to post your data so I can see for myself.

Here you go, Some data are send by processing using udp, I'll post some here.

            {0;0}
0. 68;89;1
1. 68;84;1
2. 68;82;1
3. 69;81;2
4. 69;80;2
5. 70;74;1
6. 77;66;1
7. 78;69;1
8. 73;69;1
9. 72;68;1
10. 70;76;1
11. 69;78;1
12. 69;79;1
13. 68;83;1
14. 67;85;1
15. 67;86;1
16. 68;87;1
17. 68;88;1
18. 68;90;1
19. 69;91;1
20. 69;92;1
21. 70;94;2
22. 69;94;1

Attachments:

I have neither gHowl nor FireFly installed here. Can you internalise your points and only post that small isolated section of your file:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service