Grasshopper

algorithmic modeling for Rhino

Unexpected results from new cull duplicate component

It seems in the recent release the new cull duplicate component wont work on this tree, yet kangaroo's cull duplicate works, as well as plugging directly into polyline component which auto collapses 0 length segment. When I flatten the list then cull duplicate works. Have a look at the attached def, the problem is in purple. Kangaroo is needed.

Thanks.

directly to polyline

With kangaroo remove duplicates

with gh remove duplicate (notice all the overlapping lines specifically at top and bottom)

Views: 2643

Attachments:

Replies to This Discussion

Hi Michael,

I don't think the two component were meant to work in the same way. My component does not maintain list order of points. Since the 'Average' mode actually creates new points, it is not always possible to maintain list order.

If you want it to work in the same way as Daniel's component, try switching the culling mode to 'Leave One' and then sort your output points with the supplied index map:

I probably should do a better job of retaining list order as best as possible, I'll see about making it smarter in the future.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Ah I see the difference now, thanks. Yea maybe a more intuitive operation would be useful in the future or perhaps some "maintain order" option. Thanks again.

just curious if list maintaining is still on the menu for cull duplicate. 

Hi Michael-

This is something that I've wanted from time to time as well...an index map of which points were combined in the output.  So here's a quick bit of code that should do it...basically for each branch of points you put in, it will pump out a list of points that fall within a tolerance of each other (for now it just takes the first point identified in any unified group) and then a data branch whose appended index matches the new structure index, but which captures the original indices of all the points combined.

Hopefully this helps you out!

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service