# How to control mesh size on the boundary

**URL:** <https://discourse.slicer.org/t/how-to-control-mesh-size-on-the-boundary/27140>\
**Category:** Support\
**Created:** [January 9, 2023, 9:32pm UTC](https://discourse.slicer.org/t/how-to-control-mesh-size-on-the-boundary/27140 "2023-01-09T21:32:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZSoltani](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/zsoltani/32/17166_2.png) [@ZSoltani](https://discourse.slicer.org/u/ZSoltani)\
**Post date:** [January 9, 2023, 9:32pm UTC](https://discourse.slicer.org/t/how-to-control-mesh-size-on-the-boundary/27140/1 "2023-01-09T21:32:10Z")

</div>

HI ALL,

After segmentation and exporting the volume, I need to mesh it using Gmsh. My problem is that in the stl fine, the size of triangles on the outer surface of the volume is so small (even on the flat surfaces). So even though in Gmsh I changed the size of volume elements to a courser value, it keeps the size of boundary surface elements the same as the stl input file (see the attached image)

 ![Screenshot from 2023-01-09 10-30-15](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/6/567c23a5faa571c7b0cdff6a55d8fc3f06d27656.jpeg)

I appreciate any suggestion to solve this.

Thank you.

Zahra

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [January 9, 2023, 9:53pm UTC](https://discourse.slicer.org/t/how-to-control-mesh-size-on-the-boundary/27140/2 "2023-01-09T21:53:36Z")

</div>

Hi @ZSoltani - Try using the Surface Toolbox to reduce the complexity of the surface mesh.

[https://slicer.readthedocs.io/en/latest/user\_guide/modules/surfacetoolbox.html#uniform-remeshing](https://slicer.readthedocs.io/en/latest/user_guide/modules/surfacetoolbox.html#uniform-remeshing)

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/2/529209e8e675dec5f2ce10b827ac28c173723d4d.png)

---

<div class="post-metadata">

**Author:** ![ZSoltani](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/zsoltani/32/17166_2.png) [@ZSoltani](https://discourse.slicer.org/u/ZSoltani)\
**Post date:** [January 10, 2023, 3:53pm UTC](https://discourse.slicer.org/t/how-to-control-mesh-size-on-the-boundary/27140/3 "2023-01-10T15:53:00Z")

</div>

Thank you @pieper! That was very helpful. Below is the image after applying this technique.

 ![Screenshot from 2023-01-10 05-51-33](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/d/ed4dc99fc7ab91a361fd2646208ff556602e3e5b.png)

Thanks,

Zahra
