How to delete both lines if the lines are exact the same on the same position(as an duplicate)?


I was wondering how i could delete lines if there are mutiple lines coming together in one line. I know i can remove duplicates, but i want to delete all of them and not all but one. Does someone know how?



_SelDupAll _Delete

SOrry, i made a wrong thread, its meant to be in grasshopper to delete all in grasshopper.

you mean the same position with different lengths ?

Yes, or same lenghts on the same position.

Kangaroo2 - removeDuplicateLines?

the same lenghts use


Yes, i know that one is there and i have used that one, but i want to delete them both. So if there are two dups, delete them both.

i don’t understand you ? you want remove duplicates with the original lines?
can you share a simple definition

Yes, i want those duplicates deleted and the original as well. Here is an example. THere are 6 lines in total and it makes 3 at the end, but i want the one deleted as well as the (7.1 KB)

i really don’t understand why you need that
if you already know this curves just hide them all without need to find duplicates or simply remove them all from the definition or rhino file

1 Like

if you mean some curves are duplicated and some curves are not
you can do this to show unique curves
the red lines are duplicated (12.2 KB)

1 Like

That only works for length uniqueness, not position. Here is an approach that works for position as well, and ignores line direction (as the kangaroo duplicate lines component does). It relies on Tree Frog rather than Lunchbox.

extract unique (9.6 KB)

you can simply replace length by point in curve

that also doesn’t work if you have two curves that share a midpoint but are not identical - different length, or rotated.

yes that’s also don’t work in your script if the lengths are different

for different lengths i used other approach

if the lengths are different they’re not duplicates :laughing:

that’s what you said :wink: (10.5 KB)