An other way is to use pcfind. But the setting with the radius is problematic. In my script I want to manipulate primitives. They can also be of different sizes and have different point arrangements on the inside. Therefore the pcfind radius should always be different
Finally, I always want access to the outer 4 corners.
what do you mean by outer 4 corners? do you have specific shapes in mind? if we limit ourselves to Polygon primitives, you will typically have 2+ point prims, so what are outer 4 points in a line? triangle? n-gon?