How to Decimate an stl file in Paraview

As some contenders seem to have issues with exporting stl files with a reasonable file size from their favorite CAD programs this post will give a simple process on how to reduce the file size of the stl files.

First you have to load your stl file into Paraview. MantiumDecimate_01As representation of the stl file chose Solid Color and then Surface With Edges. This stl files has so many triangles that it appears all blue. If you open the information tab has 544770 points and uses 45MB of memory.

Next find the Decimate filter in the filters. Switch on the Surface With Edges option once more and start playing with the sliders, keep hitting Apply:

MantiumDecimate_02It can be seen that rather flat surfaces now get represented with less triangles while the curved surfaces keep a higher resolution.

The info tab reveals that the file size has been reduced:

MantiumDecimate_03While this is not the nicest way to reduce the file size of stl files, it is at least very simple. In this case after 2 minutes of work we went from 544770 points to 76269, not bad. The last step is saving the data as stl.

Posted in CFD, CFD Tricks and tagged .