Help Cleaning and linking a trace SOP

Hi all, I need help cleaning up the trace SOP jitters / jumpers
Ive got a demo / sample TOX here with some example texture loops.

Ideally the lines would form simple loops / connections to the end that dont jump all the way across…

Like a distance threshold or something. I tried blending a cycle CHOP… Im not as well versed with the SOP tricks.

Any help is greatly appreciated.

trace_clean_join_help.tox (660 KB)

You must to have the final outline with sop ?
If yes, maybe the file I have attached would help you.

Update:
check also the “Solution_adv.toe”, its contain the option to have better control on the points.

Hope it will help you.
trace_clean_join_Maybe_Solution_adv.toe (664 KB)
trace_clean_join_Maybe_Solution.toe (663 KB)

Thank you Barakooda’

This is pretty much exactly what I had in mind.

Question:

In the advanced version, can you elaborate on how that may help even further? (beyond the sort and add sops)

Would I alter the data even more with eval dats to find alterate loop points?