# How to convert segmentation to stl

**URL:** <https://discourse.slicer.org/t/how-to-convert-segmentation-to-stl/14244>\
**Category:** Development\
**Created:** [October 25, 2020, 10:03pm UTC](https://discourse.slicer.org/t/how-to-convert-segmentation-to-stl/14244 "2020-10-25T22:03:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aldoSanchez](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@aldoSanchez](https://discourse.slicer.org/u/aldoSanchez)\
**Post date:** [October 25, 2020, 10:03pm UTC](https://discourse.slicer.org/t/how-to-convert-segmentation-to-stl/14244/1 "2020-10-25T22:03:46Z")

</div>

hi  
what I’m trying to do is to use this conversion by code:

ExportSegmentsClosedSurfaceRepresentationToStlFiles

but I just don’t understand how.

I also want to mersh the segmentations  
like in the img.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/c/dcad2ab781fa74fb58d692bf0418da02456c235c.png)
