Grasshopper

algorithmic modeling for Rhino

[Solved] Lines between points that belong to different groups

Hello guys,

I want to draw (all the possible) lines between points only when they belong to different groups, and not when they belongs to the same group.
I've put circles in the screenshot only to clarify this, so no lines that start and end in the same circle.

How can I do this?

Thank you very much for your help

Views: 579

Replies to This Discussion

as a newbe I'd say to do like in the image.

each Point component holds each group of points. (Set Multiple Points right clicking the Point component)

notice that I've used the graft option in some of the input in the Lines components.

Thank you Sergio Marelli (Grazie :P ) for the answer, but if the amount of points and groups is large, your solution may be inconvenient.

I think this solve the problem in a faster way, hope it may be useful for someone.

Attachments:

I found a little error. This is better.

Attachments:

Actually your solution has the same issue as Sergio as in if you have a large amount of groups you will need a large amount of pt components and entwine inputs. Try this solution. 

Attachments:

Very interesting solution Michael Pryor, but i put circles in the drawing only to clarify my question.

Also the entwine part is superfluous if, like in my case, one have points in groups already set in input.

However your algorithm is beautiful and clear and inspire me some other things. Thank you very much!

Here are a couple of approaches that should work as well...the second one ensures that there are no duplicates:

Attachments:

Great! Thank you David Stasiuk :)

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