How to Get Part Edges to Show in Paraview or ParaFOAM

Paraview is a very powerful tool for post-processing and displaying data, especially from FE or CFD simulations. But because it typically acts on the mesh without the underlying geometry, it doesn’t inherently know about the edges of parts or volumes. In this post, I run through the steps to detect the edges and draw them as a wireframe.

solidnoedges

The figure above is how Paraview shows a  body when you load it. (Click on the images to show them full size.)

To get the edges to show, we make a copy of the geometry, filter the copy to get the surfaces, then filter the surfaces to get the edges.

The first step is to make a copy.  Do this by highlighting the geometry and applying the “Transform” filter. Set the translations and rotations all to zero and the scaling factors all to unity so as to make the copy in place.

makecopyBe sure to hit “Apply.” Now, select the copy we just made (“Transform1” in the pipeline of our example) and apply the filter “Extract Surfaces.”

getsurfacesThe final step is apply a filter to get the edges. Highlight the result of the extract-surface filter (“ExtractSurface1” in the our example) and apply the filter “Extract Edges.” Once you hit “Apply,” you should see the edges of your model rendered as lines as in the figure below.

getedges30deg You’ll notice that in the figure above edges are showing where surfaces meet at 45 and 90 degrees, but the gentler bends (15 degrees in this case) are not detected. To detect these, we need to adjust the “Feature Angle” property in the “Extract Edges.” In the figure below, it has been set to 12.5 degrees, and the filter reapplied.

getedges12deg I find that rendering the edges a solid color is very helpful in many visualizations, and what I’ve shown here is just the tip of the iceberg.