The script https://gist.github.com/zeffii/5671824 creates a polysphere, but allows the user to set how spherical it is and how many subdivisions it has and its radius as parameters.
The problem is the sphere has doubles along all sides as a result of the way the geometry is created. Doubles are no good for sculpting -- and sculpting is the reason for the polysphere.
I would like to know if there is a way to automatically run remove_doubles(threshold=1.0e-5) just once, on the newly created object when the script is finished. (by finished i mean you can no longer adjust parameters)
edit:
I guess my alternative will be to construct the mesh without doubles in the first place, which is going to be a bit of a mind-bender or delete the mesh on each parameter adjustment and remove doubles too on each adjustment.
edit2
I reluctantly went for the delete / create / remove doubles combo, the script does work as desired from the point of view of the user. Script is here
bpy.types.Opthat cleans up like a destructor and nothing can execute afterreturn. – iKlsR May 29 '13 at 19:27remove_doubles. – zeffii May 29 '13 at 19:40when the user is happy with the settings.Is confusing, this makes it sound like its a user interaction to remove doubles as a part of the tool. Please try be clearer next time. – ideasman42 May 31 '13 at 20:47