Grasshopper

algorithmic modeling for Rhino

Hi everyone,

I have two groups of points, and I have connected them using Delaunay, I am trying to sort the curves into three sets of curves: 

1.  contains the curves that are connected only from points from the first group

 

2.  contains the curves that are connected only from points from the second group

3. contains the curves that are connected with points from both groups of points. 

any idea?

thank you in advance

Views: 783

Attachments:

Replies to This Discussion

This is a classic connectivity game (requires a mesh EV tree, the V List and the E List). Kinda the stuff that Sandbox does.

For a given edge in the EV Tree (branch index corresponds to E List index) we have the connected vertices indices (in the V List). The only thing remaining is to find (or "map") these vertices to the List1, List2 and ask 3 questions (if is in L1 and not in L2, if is not in L1 and in L2, if is in both).

See demo available on that matter.

Using code (the bad news) since the fastest Method available for "mapping" indices (via Point3dList) is not available as native component. This is critical for big number of points.

Using internalized demo points collections. Test it with big numbers to see the advantage.

Attachments:

Sorry: wrong question (for both) > wrong result.

Discard the V1.

Attachments:

thank you so much Peter :))

For BIG N of points this is the fasted stuff by some margin ... meaning discard V1A.

BTW: Do you speak C#? If so you can add more "query" questions.

Attachments:

Hi Peter

I am not really familiar with c#, so I think that your way is a bit hard for me, thank you for your help 

Never mind - nobody's perfect.

Get a slightly faster version (minus one stupid bug)

Attachments:

Hi.

You can draw new lines per group by using Delaunay Edges connectivity data("C" Output) 

Or check this as well.

Attachments:

Unlike your previous question, IMHO, what does it mean to make a code to find an answer to a question that has no reasonable standard of selection?

Just use the "list item".

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