Join curves

Hello.

I want to join some curves based on proximity.

If the distance from the start or the end point of the curve to another curve is lower than a threshold, I want to draw a new line and join with the previous one. Like this:

JoinCurves.gh (200.9 KB)

1 Like

You can easily solve it using CURVE PROXIMITY component. There you can also check the distance between two curves apart from getting the closest point between both curves.

Curve Proximity - Grasshopper Curve - Component for Grasshopper | Grasshopper Docs

Regards!

1 Like

I want the minimun distance from the start/end point to the rest of the curves, which is not the same as the minimun distance between the curves.

Nobody?

should your initial polylines be joined together again before applying the method you described?

because I guess it’s gonna create troubles in situations like these, where you have separate segments that look like disconnected pieces of polylines

1 Like

That could be solved with Polyline Collapse (Polyline Collapse - Grasshopper Curve - Component for Grasshopper | Grasshopper Docs), isn’t it?

JoinCurves Edited V0. Flexibility ExtendCurvegh.gh (222.9 KB)

1 Like

Perfect! Thank you so much