Looks ok, although I think the last ifs bias the droids towards the middle of an edge, such that 3 droids coming out at once would appear with ½ tile spacing (and more droids would come out with the usual 1 tile spacing). Haven't tested, though, might have misunderstood something.
Well, droids instantly move to a rally point anyway (default placement of which, by the way, could also use some rotating). Also, there are less structure vertices than adjacent tiles, so some cluttering is inevitable (pigeonhole problems), unless we actually put all exit points uniformly around the structure, but that would mean that normal exit point would be slightly misplaced, compared to the original game.
Also, for master it would probably make sense to add structure exit point parameter to structure stat files (?) so that eg. a modded factory could produce droids to the right by default