Can you explain?
you have a cloud of dots and you want create mechanical parts from it?
since you post it to 'python scripting and macros' i think you get a difficult job to automate this. The points don't know the relation with each other.
I'm not a python expert but as far as i know this method is not recommend...