# Export volume (or segment?) to stl file with python

**URL:** <https://discourse.slicer.org/t/export-volume-or-segment-to-stl-file-with-python/25111>\
**Category:** Development\
**Tags:** python\
**Created:** [September 5, 2022, 10:51pm UTC](https://discourse.slicer.org/t/export-volume-or-segment-to-stl-file-with-python/25111 "2022-09-05T22:51:45Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ungi](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ungi/32/78573_2.png) [@ungi](https://discourse.slicer.org/u/ungi)\
**Post date:** [September 6, 2022, 2:58pm UTC](https://discourse.slicer.org/t/export-volume-or-segment-to-stl-file-with-python/25111/2 "2022-09-06T14:58:06Z")

</div>

Hi, segmentation nodes cannot be saved as STL directly. You need to first export the segmentation to model node: [Script repository — 3D Slicer documentation](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#export-model-nodes-from-segmentation-node)  
Then, model nodes can be saved as STL files.

---

_[View the full topic](https://discourse.slicer.org/t/export-volume-or-segment-to-stl-file-with-python/25111)._
