Need help translating simple def for recurison purposes. (Code/Anemone/Hoopsnake)

Hello everyone,

I have a set of contour lines and I am needing to construct and “edge” from these contour lines. This edge must be continuous in the z axis, contours are not. The idea is simple:

  1. Find closets points between curves,
  2. Shatter the curves (if process starts form top to bottom, some curves are reshattered, meaning they are first shattered at their first closest point, but then for the curve below there is another closet point, and so the curve is shattered again)
  3. Divide and interpolate
  4. Rebuild

Edge Generation.gh (50.8 KB)

Thanks in advance for the help.

… what?

Can you elaborate some more? I haven’t understand…
Instead of the specific case, can you explain what you want to achieve?
Are those contour lines?

Yes, they are contour lines.
What I meant is that horizontal contour lines are planar in xy plane. But I need a line connecting these contour lines in the z axis. This line takes a portion of the original contour curve and then jumps into the one below, and so on.

I had a quick look yesterday evening, but was too tired to try :see_no_evil: I will do it as soon I‘m home from work, but anyways, I don‘t think this will be the solution to your initial problem, trying to get the edge of the cliff. But let‘s see

just used some clearer curves. but it’s you splitting script, so it should also work on yours.

Edge Generation_re.gh (16.4 KB)

Edit:
Better you turn of pipe with your curves.

Thank you Tim!