Grasshopper

algorithmic modeling for Rhino

I have list of poligon edges (represented by their middle points) This the yellow list on the figure on the left side. I have also a list edges also represented by their middle points. This is the green list on the right sied.

I need to create a third list, in which list the point are present in the right list are removed from the left list.

I indicated the identical ponts wirth an red arrow line.

Actually on the right list has always identical pair or pairs in the left list. But the number of leves in the identical branch is different.  In some cases it has also there leaves. Sometimes it has two, and somtimes it has just one leaf. AS you can see sometimes the order of the points in the right side are also not identical on the left side. I guess I have to compare distances and use dispatch, but i dont know how... Or cross reference is the solution? Please help!

Views: 564

Attachments:

Replies to This Discussion

Just a quick thought, you can merge these two dataTrees, and use [cull duplicates] and choose the option to be [cull all].

Didn't try myself, if you can attach your definition I can test it for you.

I cannot access Grasshopper at the moment to demonstrate this so if someone else whats to add the relevant images please do.

In the Sets Tab you will find a Set Panel which has mostly green icons in. These are the Grasshopper Set Components. Amongst these there will be one that will show all occurrences of List A that do not appear in List B

It's called Set Difference, and super easy to deploy:

Thanks David, Monday morning blues and my memory's not quite up to scratch :)

Hi Danny and David! Thanks a lot! It works great for the points.

I tried to use the same method for the original lines. But I got runtime errors. See image.

Is there a way to acquire the difference pattern and apply it for the lines too?

No. At present there is no way to use it on more complex TYPES like curves and surfaces.

It will only work on numbers, vectors, points, colours (Primitive Data Types)

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