Join curves only if they are coplanar

I was trying to build a script for cleaning contour. The contour lines I used are cut by certain roads and I want to rejoin those lines. Is there anyway to join curves with certain tolerance but only if the curves are co-planar?

Thanks!

Testing inversely may be better. First, join all your curves using Join Curvescomponent and then use Planarcomponent to check if the joined curves are planar curves.

1 Like