Grasshopper

algorithmic modeling for Rhino

Hello,

I'm a beginner in using grasshopper and I'm trying to find a solution to a problem that seems so easy, but i can't find a good answer.

I have 2 lists of points: list A with more points and List B with fewer points. The points of list B are all in list A. I would like to have a List C with the points of List A that are not in List B.

List B is actually a list with points which divide a triangular surface with a random frequency.
The purpose is to have a list with points that are in between of all the points in List B.
So I created a List A with the points which divide the triangular surface with the double frequency. But than List A also has the points that are already in List B and I would like to exclude these points of B.

I can't find a tool in grasshopper that does that. Is there one?
I've also tried to write a programme in the Vb tool and it works for small frequencies, but if the frequency goes higher than three than it does strange things: some of the equal points are being treated as if they were different.

I believe that there is a simple solution but i've brainstormed too much on this topic that i can't think clearly anymore:)
Can anyone help me please?

Thank You!

Views: 914

Replies to This Discussion

I don't know a way to do that without VB (but there is a lot that I don't know). So you have list A which contains list B, and you are looking for A minus B. Here is a little VB function that will do that using the GUID (which are unique identifiers of the Rhino geometry). It outputs the items in list A that are not in list B.

Attachments:
Thank you for your answer!That is exactly what i need!

The only problem is that i can't open the attachment in grasshopper as a .ghx. I can only open or save it as a xml document and by doing so i don't understand the code or can't find the part that applies to the VB code.
I've tried to convert my list of points to ID (Guid) as shown in your picture. But there is a problem, an error appears with the message "data conversion failed from point to guid"..
What am i doing wrong?
Hi, I have the same problem with the xml doc thing - you just rename the extension to be .ghx and it will open. You can rename during the saving also.

As far as the data conversion error message - the definition I posted will only work if the points you are using are set as geometry parameters from original Rhino geometry. If your points have been output from other Grasshopper components, then they will not have a GUID, and the GUID was how I was doing it. Not sure what to tell you on that one. Maybe someone else has good idea. But I think everyone is with Family or on vacation right now.
Hi,

Indeed, the point lists I use are an output from other Grasshopper components.. It's a pity that your definition will not work in this case.
Thank you a lot anyway!

Hopefully someone else can provide a solution...

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