Duplicated Lines not same lengths

Hi, I have multiple lines on the same place in grasshopper but not with the same lengths. Is there a possibility to delete the shorter ones?

Thank you!

Hello,

It should be possible, could you upload your lines internalized ?

230316_Duplines.gh (3.0 KB)

They aren’t duplicate lines, they are overlapping lines.

1 Like

This separates the longest line, but I expect you have multiple of those sets across a single file ?..
Do you need the object deleted in RH or simply filtered in GH ?

230316_Duplines.gh (6.1 KB)

1 Like


lines_overlap_2023Mar16a.gh (9.8 KB)

1 Like

My lines are like this…:
230316_Duplines.gh (5.9 KB)

Hah! Nothing like the data tree in your first example, which consisted of overlapping lines in a single branch. The lines in your second example (same file name but different geometry) are in disparate data trees where the relationships have not been established. That’s a different problem!

By the way, it’s better to internalize relevant points in a param instead of inside a component.

This is a test bench to show that the overlapping lines in your first example can be rotated arbitrarily and the algorithm still works but the resulting line flips ends at times:


lines_overlap_2023Mar16b.gh (16.8 KB)

1 Like


230316_Duplines_re.gh (13.0 KB)

2 Likes

Nice. I didn’t get it at first but well done. Seems to me there is something odd (incomplete?) about the geometry as given by @Sel ? This is your code, displayed in a different way:

Far from the simple example given at first…

1 Like

Agreed. This is really confusing, I could swear I DID ask for all those lines internalized…

2 Likes

Yeah, a rather annoying wild goose chase, eh. Poorly defined from the start.

By the way, your GH file didn’t have any lines internalized at all.

1 Like