# Triangle max size in decimate filter

**URL:** https://discourse.paraview.org/t/triangle-max-size-in-decimate-filter/15131
**Category:** ParaView Support
**Created:** [July 26, 2024, 8:29pm UTC](https://discourse.paraview.org/t/triangle-max-size-in-decimate-filter/15131 "2024-07-26T20:29:11Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![alie89](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/c89c15/32.png) [@alie89](https://discourse.paraview.org/u/alie89)
#### Post date: [July 26, 2024, 8:29pm UTC](https://discourse.paraview.org/t/triangle-max-size-in-decimate-filter/15131/1 "2024-07-26T20:29:11Z")

</div>

Hello Paraview friends,

I am playing around with the decimate filter as I would like to downsample some surface meshes coming from CFD.

The filter is working, but I am struggling to get a good result as very often on flat surfaces a very large size triangles appear, doesn’t matter the level of reduction I use.

Thus, is there any way to avoid this issue or any particular trick some of you guys would like to share? Any way to set the max edge size of the triangle?

Many thanks!

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [July 27, 2024, 12:21pm UTC](https://discourse.paraview.org/t/triangle-max-size-in-decimate-filter/15131/2 "2024-07-27T12:21:12Z")

</div>

I’m afraid I don’t know of a way to limit the size of edges in the output mesh. The goal of the **Decimate** filter is to reduce the size of the mesh as much as possible while retaining as much of the original object shape as possible. Having large triangles fits within that goal quite well.

It sounds like you need some kind of surface remesher that offers finer control of the output. AFAIK ParaView does not have a filter that offers that level of control.

---

<div class="post-metadata">

### Author: ![alie89](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/c89c15/32.png) [@alie89](https://discourse.paraview.org/u/alie89)
#### Post date: [August 3, 2024, 6:14pm UTC](https://discourse.paraview.org/t/triangle-max-size-in-decimate-filter/15131/4 "2024-08-03T18:14:15Z")

</div>

Hi,

Thanks for the suggestion, indeed a remesher wuold likely be better for my task. Sorry for the late replay, I worked a bit on the problem and I managed to get a “better” decimated mesh using vtkQuadraticDecimation class (not wrapped in paraview i think). If you setRegularization(1e-5), you will get a way more uniform mesh avoind be triangles.

Cheers

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [August 5, 2024, 11:32am UTC](https://discourse.paraview.org/t/triangle-max-size-in-decimate-filter/15131/5 "2024-08-05T11:32:12Z")

</div>

Glad you found a solution. If you want to expose `vtkQuadraticDecimation` in ParaView for future easy use, you can wrap it as an XML plugin following [this Plugin Howto](https://www.paraview.org/paraview-docs/nightly/cxx/PluginHowto.html).
