# Preserve boundary

**URL:** https://discourse.slicer.org/t/preserve-boundary/5481
**Category:** Feature requests
**Tags:** 3d-model
**Created:** [January 23, 2019, 11:11am UTC](https://discourse.slicer.org/t/preserve-boundary/5481 "2019-01-23T11:11:54Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![anandmulay3](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@anandmulay3](https://discourse.slicer.org/u/anandmulay3)
#### Post date: [January 23, 2019, 11:11am UTC](https://discourse.slicer.org/t/preserve-boundary/5481/1 "2019-01-23T11:11:54Z")

</div>

can we add a function which help us to preserve boundary while applying decimation on model .

---

<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: [January 23, 2019, 6:43pm UTC](https://discourse.slicer.org/t/preserve-boundary/5481/2 "2019-01-23T18:43:06Z")

</div>

There are a number of options to control what points are removed during decimation - see details in the filter’s documentation: [https://vtk.org/doc/nightly/html/classvtkDecimatePro.html](https://vtk.org/doc/nightly/html/classvtkDecimatePro.html)

Some of these options are exposed in Surface Toolbox module, but if you find additional options that would be useful to make adjustable by users then let us know.

---

<div class="post-metadata">

### Author: ![anandmulay3](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@anandmulay3](https://discourse.slicer.org/u/anandmulay3)
#### Post date: [January 24, 2019, 11:32am UTC](https://discourse.slicer.org/t/preserve-boundary/5481/3 "2019-01-24T11:32:05Z")

</div>

fantastic! Surface toolbox is the thing i was looking for , tested in slicer editor its working as expected.  
How can i call it using my scriptableModule script?

Edit: I got the code in reference , though you can drop me a snippet , may be it comes better than what i have now.

Thanks a ton

---

<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: [January 24, 2019, 2:05pm UTC](https://discourse.slicer.org/t/preserve-boundary/5481/4 "2019-01-24T14:05:47Z")

</div>

Surface toolbox is a Python scripted module, so just click “Edit” button to see/edit its source code (if you don’t see the button then enable Developer mode in application settings). If Edit does not bring up the source code then search SurfaceToolbox.py file manually.

---

<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: [March 21, 2023, 3:07am UTC](https://discourse.slicer.org/t/preserve-boundary/5481/5 "2023-03-21T03:07:27Z")

</div>


