Grasshopper

algorithmic modeling for Rhino

Hi GH community,

As stated in the title, I want to remove duplicate branches (sharing the same pair of numbers) and leaving on one. Please see image for reference: Thanks in advance. 

BR,

Homar

Views: 2203

Attachments:

Replies to This Discussion

Hi,

well it is a rather unorthodox way. This only works with integers. If you really want to use this method with other data, you would need to convert it to lists of integers first.

The integer list (like a phone number) is converted to a path (first and last name). By doing this all lists containing the same items (same first name) will end up with the same path (imagine it like a phone-book searching for Paul). Now you only want one of them (call any guy named Paul) so you just take the first item. To now get the original data (the phone number) you split the original tree.

It is a little tricky to describe. Is it clear now?

Best, phillip

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service