Create a mesh in python script

Once again, thanks @lassoan. Your generosity makes me blush.
Little problem however, nothing happen by the smoothing parameter.

Then, how save this volume segmented (after Model Maker) in .stl format in python?
Thanks in advance!