# Find non-overlapped curves(lines)

Hi,
I’m trying to find non overlapped lines like in the picture below,because the highlighted lines intersect with gray lines, the Does.intersect node is not a proper way I think,I want to get some fresh ideas.,

How do I filter black lines if its overlapped or not?

1 Like

Hello,
here is a possibility

edit:

Cordially
christian.stan

1 Like

Generally intersections would be the go here. I believe if you intersect a line with a line it returns the smaller line if they overlap exactly. You could intersect each curve on each other curve, then if the list of results doesnt contain any curves then you know that original curve isnt overlapping.

A looser but potentially faster method could be to get the midpoint of each curve then check its parameter on all curves. The sum of the results should equal 0.5 if the results are summed for a curve that only hits itself at its midpoint. This method assumes all overlaps are whole vs partial in nature.

2 Likes

Hi, Thank you for all of your suggenstion,Now I’m trying different approaches from your ideas. But still I have some overlapped lines in the result. I checked inputs, couldn’t find any miss. So, I just filtered these by vectors when the lines are parallel with other lines. I’m going to check this approach in different conditions.

2 Likes

@GavinCrump And thank you for all of your contents in Youtube and Github . I’m still learning but I couldn’t start this Dynamo task without your contents.

1 Like

Glad to have helped, see if I can help that bit more with this one. I found this approach works well. Cross product an intersection on the curves, and any result list with 1 line only will be a line that doesn’t overlap, as the only intersect it finds is itself. The midpoint parameter workflow might work in a similar manner also, but this one is easier to visually understand I think.

workflow.dyn (19.6 KB)

2 Likes