Grasshopper

algorithmic modeling for Rhino

hi,

 

a simple question.

basically i am wondering how i can find the different pts between 2 lists of point.

 

within the attach file there are 27 pts in total, with 6 duplicated points.

with rs.CullDuplicatePoints i  find 21 different points.

how i can find the duplicated ones  and put them in a list in python?

 

i've also tried the set method but it seems not working with points.

 

thanks in advance!

best

 

Views: 835

Attachments:

Replies to This Discussion

Hi Akihiro,

There's a nice method EpsilonEquals which checks if two points are equal within given tolerance.

Other than that a bit of flow control checking for duplicate pts indexes is needed.

Attachments:

hi djordje,

 

thanks for your reply. it seems your def works great!

i thought that there might be some python codes which works like module will simpilfy the process.

 

anyway, thanks!

Yes, it would be nice if Point3d.CullDuplicates method could return duplicate point indices too, but for some reason, that feature has not been implemented.

Like this

Attachments:

thanks for your reply.

it also works great!

and as what i can notice it seems like a different process from djordje's.

 

thans a lot!

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