Your code is probably too complex for us mortals , well it is for me , there I said it... Still it's impressive even if it's not stable (yet). Looks like the leader part itself is working but the circle part is not. Maybe you could try to use ssget with 2-point fence instead of crossing , once with polar 0 degrees and once polar 0.5pi and then someting like vla-intersectWith , find midpoint between intersection. (don't think I have ever programmed something with vla-intersectWith myself or maybe I have but Altzheimer)
Anyways , maybe create a better / simpler test environment with very simple squares where all coordinates are known , and print or place breakpoint / watch for all values and coordinates so you know exactly what values you should expect to see. And once you got this working move on to more complex figures. I expected more response for your thread so maybe my reaction triggers more (/ more intelligent) people to have a look at your code because I think its worth it.
I know I have seen something simular on this site but can't find it. Dont know the right english words to search for , markers , leaders with circle, autonumber parts?
hope you will get more reactions but sometimes its very hard to follow someone elses code / thoughts / logic you know , hell I sometimes have trouble deciphering my own code after a while. Good luck.