How to export segmentation to STL format?

How to export segmentation to STL format?