# Exported STL files from the segmentation has intersection/penetration

**URL:** <https://discourse.slicer.org/t/exported-stl-files-from-the-segmentation-has-intersection-penetration/6692>\
**Category:** Support\
**Tags:** segmentation, stl\
**Created:** [May 4, 2019, 7:26am UTC](https://discourse.slicer.org/t/exported-stl-files-from-the-segmentation-has-intersection-penetration/6692 "2019-05-04T07:26:30Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![Tekk\_ya](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/tekk_ya/32/3548_2.png) [@Tekk\_ya](https://discourse.slicer.org/u/Tekk_ya)\
**Post date:** [June 7, 2019, 4:33am UTC](https://discourse.slicer.org/t/exported-stl-files-from-the-segmentation-has-intersection-penetration/6692/22 "2019-06-07T04:33:45Z")

</div>

> [@lassoan](#):
>
> add some clearance between segments (using Margin effect),

do mean to add some empty space between the segments by shrinking the margin of the segments?

> [@lassoan](#):
>
> disable smoothing

would you please let me know in which step I should avoid smoothing?

> [@lassoan](#):
>
> or work with labelmaps instead of meshes.

I need to create a volumetric mesh for these geometries, therefore, I have to work with the meshes and I have no idea how can I use the labelmap to create the volumetric mesh.

---

<div class="post-metadata">

**Author:** ![Tekk\_ya](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/tekk_ya/32/3548_2.png) [@Tekk\_ya](https://discourse.slicer.org/u/Tekk_ya)\
**Post date:** [June 7, 2019, 4:41am UTC](https://discourse.slicer.org/t/exported-stl-files-from-the-segmentation-has-intersection-penetration/6692/23 "2019-06-07T04:41:17Z")

</div>

> [@cpinter](#):
>
> ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/e/3e5f87731f723625d915eaaf5b8667708d2d9864.png)

I thought that setting the smoothing factor to the zero only effects the 3D visualization and does not affect the exported geometries from the Slicer. Please correct me if I am wrong.

thank you in advance,

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [June 7, 2019, 12:32pm UTC](https://discourse.slicer.org/t/exported-stl-files-from-the-segmentation-has-intersection-penetration/6692/24 "2019-06-07T12:32:16Z")

</div>

It affects the surface model contained in the segmentation, which is both displayed, and saved to file.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 8, 2019, 7:35pm UTC](https://discourse.slicer.org/t/exported-stl-files-from-the-segmentation-has-intersection-penetration/6692/25 "2019-06-08T19:35:10Z")

</div>

> [@Tekk\_ya](#):
>
> I need to create a volumetric mesh for these geometries

You can use Segment Mesher extension to create volumetric mesh directly from segments. Cleaver method generates mesh from the labelmap representation (not from surface mesh) and creates a joint, multi-material tetrahedral mesh, with guaranteed no overlap or gap between materials (segments).

[Previous page](https://discourse.slicer.org/t/exported-stl-files-from-the-segmentation-has-intersection-penetration/6692.md?page=1)
