Sorting in grasshopper of (overlapping)superimposed lines

grasshopper
unhandled

(Foxman) #1

Hello everyone,
I’m trying to build a definition for sorting overlaid lines
the task is as follows there are green lines and on them are superimposed red lines (see screenshot)
you need to form a list of red lines so that on the list branches there are only those lines that lie on their green lines?

tried to make a universal definition with the help of minimal distance, but this approach does not always work

overlapping lines.3dm (24.2 KB)
overlapping lines.gh (2.8 KB)


#2

Like this?

overlapping lines_re.gh (12.9 KB)


(Foxman) #3

Thank you so much HS_Kim
I tried in other ways not through the shortest distance to the line
maybe what kind of plug-ins do it?
or is there another way?


#4

Why do you need to find a plugin for this? If you’d like to get the same result using other means, then Just do collision test if you want. But, in this case you can use Extend Curveto shorten the line length a little bit to avoid to be detected by two different underlying lines simultaneously at the corners…

overlapping lines_rev2.gh (10.8 KB)


(Foxman) #5

Thank you so much HS_Kim
very interesting approach