A script that would join a series of unjoinable curves

Sounds more difficult than it is (maybe) but I often run in to a situation where I have a sequence of curves like the file I’ve attached that you want to join in to a closed curve but that won’t join because the ends are out of tolerance-- forcing you to use the Match command step by step as you go around to bridge the gaps. Very time consuming. Is there any way to write a script that would overcome the tolerance and join the curves?Join this sequence of curves.3dm (106.2 KB)

Doesn’t look like the edges are out of tolerance here. If you run the projecttocplane command and then join you end up with a closed curve and a few tiny small open curves.

Oops, that’s the wrong file, siemen. This is the right file.

What I’m looking for is a script that would find the closest ends of a series of curves and connect them and then join them:) Join this sequence of curves.3dm (124.9 KB)

Hi Cosmas,

try this quick and dirty script, it joins the selection until only 1 curve remains while upping the tolerance in 15 steps up to a set maximum.

forced_curvejoin.py (510 Bytes)

-Willem

2 Likes

Thank you @Willem. It worked perfectly!!